test_class.declarator: standAlone = false
test_class.original_string: boolean standAlone = false;
test_class.type: boolean
test_class.var_name: standAlone
test_class.file: descriptor/fingerprint/src/test/java/org/openscience/cdk/similarity/TanimotoTest.java
test_class.identifier: TanimotoTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void method2() throws CDKException {
          ICountFingerprint fp1 = new IntArrayCountFingerprint(new HashMap<String, Integer>() {
  
              {
                  put("A", 3);
              }
          });
          ICountFingerprint fp2 = new IntArrayCountFingerprint(new HashMap<String, Integer>() {
  
              {
                  put("A", 4);
              }
          });
          Assert.assertEquals(0.75, Tanimoto.method2(fp1, fp2), 0.001);
      }
test_case.class_method_signature: TanimotoTest.method2()
test_case.full_signature: @Test public void method2()
test_case.identifier: method2
test_case.invocations: put put assertEquals method2
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void method2()
focal_class.file: descriptor/fingerprint/src/main/java/org/openscience/cdk/similarity/Tanimoto.java
focal_class.identifier: Tanimoto
focal_class.class_method_signature: Tanimoto.Tanimoto()
focal_class.full_signature: private  Tanimoto()
focal_class.identifier: Tanimoto
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Tanimoto()
focal_class.class_method_signature: Tanimoto.calculate(BitSet bitset1, BitSet bitset2)
focal_class.full_signature: public static float calculate(BitSet bitset1, BitSet bitset2)
focal_class.identifier: calculate
focal_class.modifiers: public static
focal_class.parameters: (BitSet bitset1, BitSet bitset2)
focal_class.return: float
focal_class.signature: float calculate(BitSet bitset1, BitSet bitset2)
focal_class.class_method_signature: Tanimoto.calculate(IBitFingerprint fingerprint1, IBitFingerprint fingerprint2)
focal_class.full_signature: public static double calculate(IBitFingerprint fingerprint1, IBitFingerprint fingerprint2)
focal_class.identifier: calculate
focal_class.modifiers: public static
focal_class.parameters: (IBitFingerprint fingerprint1, IBitFingerprint fingerprint2)
focal_class.return: double
focal_class.signature: double calculate(IBitFingerprint fingerprint1, IBitFingerprint fingerprint2)
focal_class.class_method_signature: Tanimoto.calculate(double[] features1, double[] features2)
focal_class.full_signature: public static float calculate(double[] features1, double[] features2)
focal_class.identifier: calculate
focal_class.modifiers: public static
focal_class.parameters: (double[] features1, double[] features2)
focal_class.return: float
focal_class.signature: float calculate(double[] features1, double[] features2)
focal_class.class_method_signature: Tanimoto.calculate(Map<String, Integer> features1, Map<String, Integer> features2)
focal_class.full_signature: public static float calculate(Map<String, Integer> features1, Map<String, Integer> features2)
focal_class.identifier: calculate
focal_class.modifiers: public static
focal_class.parameters: (Map<String, Integer> features1, Map<String, Integer> features2)
focal_class.return: float
focal_class.signature: float calculate(Map<String, Integer> features1, Map<String, Integer> features2)
focal_class.class_method_signature: Tanimoto.calculate(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.full_signature: public static double calculate(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.identifier: calculate
focal_class.modifiers: public static
focal_class.parameters: (ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.return: double
focal_class.signature: double calculate(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.class_method_signature: Tanimoto.method1(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.full_signature: public static double method1(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.identifier: method1
focal_class.modifiers: public static
focal_class.parameters: (ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.return: double
focal_class.signature: double method1(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.class_method_signature: Tanimoto.method2(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.full_signature: public static double method2(ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.identifier: method2
focal_class.modifiers: public static
focal_class.parameters: (ICountFingerprint fp1, ICountFingerprint fp2)
focal_class.return: double
focal_class.signature: double method2(ICountFingerprint fp1, ICountFingerprint fp2)
focal_method.body: public static double method2(ICountFingerprint fp1, ICountFingerprint fp2) {
  
          long maxSum = 0, minSum = 0;
          int i = 0, j = 0;
          while (i < fp1.numOfPopulatedbins() || j < fp2.numOfPopulatedbins()) {
              Integer hash1 = i < fp1.numOfPopulatedbins() ? fp1.getHash(i) : null;
              Integer hash2 = j < fp2.numOfPopulatedbins() ? fp2.getHash(j) : null;
              Integer count1 = i < fp1.numOfPopulatedbins() ? fp1.getCount(i) : null;
              Integer count2 = j < fp2.numOfPopulatedbins() ? fp2.getCount(j) : null;
  
              if (count2 == null || (hash1 != null && hash1 < hash2)) {
                  maxSum += count1;
                  i++;
                  continue;
              }
              if (count1 == null || (hash2 != null && hash1 > hash2)) {
                  maxSum += count2;
                  j++;
                  continue;
              }
  
              if (hash1.equals(hash2)) {
                  maxSum += Math.max(count1, count2);
                  minSum += Math.min(count1, count2);
                  i++;
                  j++;
              }
          }
          return ((double) minSum) / maxSum;
      }
focal_method.class_method_signature: Tanimoto.method2(ICountFingerprint fp1, ICountFingerprint fp2)
focal_method.full_signature: public static double method2(ICountFingerprint fp1, ICountFingerprint fp2)
focal_method.identifier: method2
focal_method.invocations: numOfPopulatedbins numOfPopulatedbins numOfPopulatedbins getHash numOfPopulatedbins getHash numOfPopulatedbins getCount numOfPopulatedbins getCount equals max min
focal_method.modifiers: public static
focal_method.parameters: (ICountFingerprint fp1, ICountFingerprint fp2)
focal_method.return: double
focal_method.signature: double method2(ICountFingerprint fp1, ICountFingerprint fp2)