test_class.file: ml/streaminer/src/test/java/org/streaminer/stream/membership/DLeftCountingBloomFilterTest.java
test_class.identifier: DLeftCountingBloomFilterTest
test_case.body: @Test
      public void test() throws NoSuchAlgorithmException {
          MessageDigest md = MessageDigest.getInstance("SHA-1");
          
          byte[] b = md.digest("testf".getBytes());
          
          String hex = byteArrayToHexString(b);
          
          System.out.println("Byte size: " + b.length);
          System.out.println("Hex: " + hex);
          
          DLeftCountingBloomFilter filter = new DLeftCountingBloomFilter(8, 32);
          
          long bits = filter.getBits(b, 5, 0);
          System.out.println("Bits: " + bits);
      }
test_case.class_method_signature: DLeftCountingBloomFilterTest.test()
test_case.full_signature: @Test public void test()
test_case.identifier: test
test_case.invocations: getInstance digest getBytes byteArrayToHexString println println getBits println
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test()
focal_class.declarator: HASH_BYTES = 20
focal_class.modifier: private static final
focal_class.original_string: private static final int HASH_BYTES = 20;
focal_class.type: int
focal_class.var_name: HASH_BYTES
focal_class.declarator: BUCKET_HEIGHT = 8
focal_class.modifier: private static final
focal_class.original_string: private static final int BUCKET_HEIGHT = 8;
focal_class.type: int
focal_class.var_name: BUCKET_HEIGHT
focal_class.declarator: FINGERPRINT_BITS = 13
focal_class.modifier: private static final
focal_class.original_string: private static final int FINGERPRINT_BITS = 13;
focal_class.type: int
focal_class.var_name: FINGERPRINT_BITS
focal_class.declarator: width
focal_class.modifier: private
focal_class.original_string: private int width;
focal_class.type: int
focal_class.var_name: width
focal_class.declarator: height
focal_class.modifier: private
focal_class.original_string: private int height;
focal_class.type: int
focal_class.var_name: height
focal_class.declarator: bits
focal_class.modifier: private
focal_class.original_string: private long bits;
focal_class.type: long
focal_class.var_name: bits
focal_class.declarator: buckets
focal_class.modifier: private
focal_class.original_string: private Bucket[][] buckets;
focal_class.type: Bucket[][]
focal_class.var_name: buckets
focal_class.file: ml/streaminer/src/main/java/org/streaminer/stream/membership/DLeftCountingBloomFilter.java
focal_class.identifier: DLeftCountingBloomFilter
focal_class.class_method_signature: DLeftCountingBloomFilter.DLeftCountingBloomFilter(int d, int b)
focal_class.full_signature: public  DLeftCountingBloomFilter(int d, int b)
focal_class.identifier: DLeftCountingBloomFilter
focal_class.modifiers: public
focal_class.parameters: (int d, int b)
focal_class.signature:  DLeftCountingBloomFilter(int d, int b)
focal_class.class_method_signature: DLeftCountingBloomFilter.getTargets(byte[] hash)
focal_class.full_signature: private void getTargets(byte[] hash)
focal_class.identifier: getTargets
focal_class.modifiers: private
focal_class.parameters: (byte[] hash)
focal_class.return: void
focal_class.signature: void getTargets(byte[] hash)
focal_class.class_method_signature: DLeftCountingBloomFilter.getBits(byte[] input, long numBits, int pos)
focal_class.full_signature: protected long getBits(byte[] input, long numBits, int pos)
focal_class.identifier: getBits
focal_class.modifiers: protected
focal_class.parameters: (byte[] input, long numBits, int pos)
focal_class.return: long
focal_class.signature: long getBits(byte[] input, long numBits, int pos)
focal_method.body: protected long getBits(byte[] input, long numBits, int pos) {
          long value = 0;
          long postBits = pos % 8;
          int i = pos/8;
          long start = postBits > numBits ? numBits : postBits;
          
          if (start != 0) {
              value = input[i++] & (0xFF >> (8 - start));
              numBits -= start;
          }
          while (numBits >= 8) {
              value = (value << 8) | input[i++];
              numBits -= 8;
          }
          if (numBits != 0) {
              long last = (input[i] >> (8 - numBits));
              value = (value << numBits) | last;
          }
          return value;
      }
focal_method.class_method_signature: DLeftCountingBloomFilter.getBits(byte[] input, long numBits, int pos)
focal_method.full_signature: protected long getBits(byte[] input, long numBits, int pos)
focal_method.identifier: getBits
focal_method.modifiers: protected
focal_method.parameters: (byte[] input, long numBits, int pos)
focal_method.return: long
focal_method.signature: long getBits(byte[] input, long numBits, int pos)