test_class.declarator: cbf
test_class.modifier: public
test_class.original_string: public VarCountingBloomFilter cbf;
test_class.type: VarCountingBloomFilter
test_class.var_name: cbf
test_class.declarator: MAX_FAILURE_RATE = 0.1
test_class.modifier: static final
test_class.original_string: static final double MAX_FAILURE_RATE = 0.1;
test_class.type: double
test_class.var_name: MAX_FAILURE_RATE
test_class.declarator: spec = BloomCalculations.computeBucketsAndK(MAX_FAILURE_RATE)
test_class.modifier: public static final
test_class.original_string: public static final BloomCalculations.BloomSpecification spec = BloomCalculations.computeBucketsAndK(MAX_FAILURE_RATE);
test_class.type: BloomCalculations.BloomSpecification
test_class.var_name: spec
test_class.declarator: ELEMENTS = 10000
test_class.modifier: static final
test_class.original_string: static final int ELEMENTS = 10000;
test_class.type: int
test_class.var_name: ELEMENTS
test_class.declarator: EXP = 4
test_class.modifier: static final
test_class.original_string: static final int EXP = 4;
test_class.type: int
test_class.var_name: EXP
test_class.declarator: MAX_COUNT = (int) (Math.pow(2, EXP) - 1)
test_class.modifier: static final
test_class.original_string: static final int MAX_COUNT = (int) (Math.pow(2, EXP) - 1);
test_class.type: int
test_class.var_name: MAX_COUNT
test_class.file: ml/streaminer/src/test/java/org/streaminer/stream/membership/VarCountingBloomFilterTest.java
test_class.identifier: VarCountingBloomFilterTest
test_case.body: @Test
      public void testMerge() {
          cbf.clear();
          
          cbf.add("a");
          cbf.add("a");
  
          VarCountingBloomFilter cbf2 = new VarCountingBloomFilter(ELEMENTS, spec.bucketsPerElement, EXP);
          cbf2.add("a");
          cbf2.add("a");
  
          cbf.merge(cbf2);
          assertEquals(4, cbf.maxBucket());
      }
test_case.class_method_signature: VarCountingBloomFilterTest.testMerge()
test_case.full_signature: @Test public void testMerge()
test_case.identifier: testMerge
test_case.invocations: clear add add add add merge assertEquals maxBucket
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMerge()
focal_class.declarator: hasher = new MurmurHash()
focal_class.modifier: private static final
focal_class.original_string: private static final MurmurHash hasher = new MurmurHash();
focal_class.type: MurmurHash
focal_class.var_name: hasher
focal_class.declarator: maxCount = 15
focal_class.modifier: private
focal_class.original_string: private long maxCount = 15;
focal_class.type: long
focal_class.var_name: maxCount
focal_class.declarator: bucketsPerWord = 16
focal_class.modifier: private
focal_class.original_string: private int bucketsPerWord = 16;
focal_class.type: int
focal_class.var_name: bucketsPerWord
focal_class.declarator: exp
focal_class.modifier: private
focal_class.original_string: private int exp;
focal_class.type: int
focal_class.var_name: exp
focal_class.declarator: hashCount
focal_class.modifier: private
focal_class.original_string: private int hashCount;
focal_class.type: int
focal_class.var_name: hashCount
focal_class.declarator: numNonZero
focal_class.modifier: private
focal_class.original_string: private int numNonZero;
focal_class.type: int
focal_class.var_name: numNonZero
focal_class.declarator: numBuckets
focal_class.modifier: private
focal_class.original_string: private int numBuckets;
focal_class.type: int
focal_class.var_name: numBuckets
focal_class.declarator: buckets
focal_class.modifier: private
focal_class.original_string: private long[] buckets;
focal_class.type: long[]
focal_class.var_name: buckets
focal_class.file: ml/streaminer/src/main/java/org/streaminer/stream/membership/VarCountingBloomFilter.java
focal_class.identifier: VarCountingBloomFilter
focal_class.interfaces: implements IFilter<String>
focal_class.class_method_signature: VarCountingBloomFilter.VarCountingBloomFilter(int numElements, int bucketsPerElement, int exp)
focal_class.full_signature: public  VarCountingBloomFilter(int numElements, int bucketsPerElement, int exp)
focal_class.identifier: VarCountingBloomFilter
focal_class.modifiers: public
focal_class.parameters: (int numElements, int bucketsPerElement, int exp)
focal_class.signature:  VarCountingBloomFilter(int numElements, int bucketsPerElement, int exp)
focal_class.class_method_signature: VarCountingBloomFilter.clear()
focal_class.full_signature: public void clear()
focal_class.identifier: clear
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: VarCountingBloomFilter.merge(VarCountingBloomFilter cbf)
focal_class.full_signature: public void merge(VarCountingBloomFilter cbf)
focal_class.identifier: merge
focal_class.modifiers: public
focal_class.parameters: (VarCountingBloomFilter cbf)
focal_class.return: void
focal_class.signature: void merge(VarCountingBloomFilter cbf)
focal_class.class_method_signature: VarCountingBloomFilter.membershipTest(String item)
focal_class.full_signature: public boolean membershipTest(String item)
focal_class.identifier: membershipTest
focal_class.modifiers: public
focal_class.parameters: (String item)
focal_class.return: boolean
focal_class.signature: boolean membershipTest(String item)
focal_class.class_method_signature: VarCountingBloomFilter.add(String item)
focal_class.full_signature: public void add(String item)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (String item)
focal_class.return: void
focal_class.signature: void add(String item)
focal_class.class_method_signature: VarCountingBloomFilter.delete(String item)
focal_class.full_signature: public void delete(String item)
focal_class.identifier: delete
focal_class.modifiers: public
focal_class.parameters: (String item)
focal_class.return: void
focal_class.signature: void delete(String item)
focal_class.class_method_signature: VarCountingBloomFilter.getPercentNonZero()
focal_class.full_signature: public double getPercentNonZero()
focal_class.identifier: getPercentNonZero
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getPercentNonZero()
focal_class.class_method_signature: VarCountingBloomFilter.getBucket(int i)
focal_class.full_signature: private Bucket getBucket(int i)
focal_class.identifier: getBucket
focal_class.modifiers: private
focal_class.parameters: (int i)
focal_class.return: Bucket
focal_class.signature: Bucket getBucket(int i)
focal_class.class_method_signature: VarCountingBloomFilter.buckets()
focal_class.full_signature: private int buckets()
focal_class.identifier: buckets
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int buckets()
focal_class.class_method_signature: VarCountingBloomFilter.emptyBuckets()
focal_class.full_signature: protected int emptyBuckets()
focal_class.identifier: emptyBuckets
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int emptyBuckets()
focal_class.class_method_signature: VarCountingBloomFilter.maxBucket()
focal_class.full_signature: protected int maxBucket()
focal_class.identifier: maxBucket
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int maxBucket()
focal_class.class_method_signature: VarCountingBloomFilter.getHashBuckets(String key)
focal_class.full_signature: private int[] getHashBuckets(String key)
focal_class.identifier: getHashBuckets
focal_class.modifiers: private
focal_class.parameters: (String key)
focal_class.return: int[]
focal_class.signature: int[] getHashBuckets(String key)
focal_class.class_method_signature: VarCountingBloomFilter.getHashBuckets(String key, int hashCount, int max)
focal_class.full_signature: private static int[] getHashBuckets(String key, int hashCount, int max)
focal_class.identifier: getHashBuckets
focal_class.modifiers: private static
focal_class.parameters: (String key, int hashCount, int max)
focal_class.return: int[]
focal_class.signature: int[] getHashBuckets(String key, int hashCount, int max)
focal_method.body: public void merge(VarCountingBloomFilter cbf) {
          assert cbf != null;
          assert buckets.length == cbf.buckets.length;
          assert hashCount == cbf.hashCount;
          
          for ( int i = 0; i < buckets(); ++i )
          {
              Bucket b = new Bucket(i);
              Bucket b2 = cbf.getBucket(i);
              long merged = b.value + b2.value;
              b.set(merged > maxCount ? maxCount : merged);
          }
      }
focal_method.class_method_signature: VarCountingBloomFilter.merge(VarCountingBloomFilter cbf)
focal_method.full_signature: public void merge(VarCountingBloomFilter cbf)
focal_method.identifier: merge
focal_method.invocations: buckets getBucket set
focal_method.modifiers: public
focal_method.parameters: (VarCountingBloomFilter cbf)
focal_method.return: void
focal_method.signature: void merge(VarCountingBloomFilter cbf)