test_class.file: descriptor/fingerprint/src/test/java/org/openscience/cdk/fingerprint/SubstructureFingerprinterTest.java
test_class.identifier: SubstructureFingerprinterTest
test_class.superclass: extends AbstractFixedLengthFingerprinterTest
test_case.body: @Test
      @Override
      public void testBug706786() throws Exception {
  
          IAtomContainer superStructure = bug706786_1();
          IAtomContainer subStructure = bug706786_2();
  
          addImplicitHydrogens(superStructure);
          addImplicitHydrogens(subStructure);
  
          // SMARTS is now correct and D will include H atoms, CDK had this wrong
          // for years (had it has non-H count). Whilst you can set the optional
          // SMARTS flavor CDK_LEGACY this is not correct
          AtomContainerManipulator.suppressHydrogens(superStructure);
          AtomContainerManipulator.suppressHydrogens(subStructure);
  
          IFingerprinter fpr = getBitFingerprinter();
          IBitFingerprint superBits = fpr.getBitFingerprint(superStructure);
          IBitFingerprint subBits = fpr.getBitFingerprint(subStructure);
  
          assertThat(superBits.asBitSet(),
                  is(asBitSet(0, 11, 13, 17, 40, 48, 136, 273, 274, 278, 286, 294, 299, 301, 304, 306)));
          assertThat(subBits.asBitSet(), is(asBitSet(1, 17, 273, 274, 278, 294, 306)));
      }
test_case.class_method_signature: SubstructureFingerprinterTest.testBug706786()
test_case.full_signature: @Test @Override public void testBug706786()
test_case.identifier: testBug706786
test_case.invocations: bug706786_1 bug706786_2 addImplicitHydrogens addImplicitHydrogens suppressHydrogens suppressHydrogens getBitFingerprinter getBitFingerprint getBitFingerprint assertThat asBitSet is asBitSet assertThat asBitSet is asBitSet
test_case.modifiers: @Test @Override public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBug706786()
focal_class.declarator: keys = new ArrayList<>()
focal_class.modifier: private
focal_class.original_string: private List<Key> keys = new ArrayList<>();
focal_class.type: List<Key>
focal_class.var_name: keys
focal_class.file: descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/SubstructureFingerprinter.java
focal_class.identifier: SubstructureFingerprinter
focal_class.interfaces: implements IFingerprinter
focal_class.class_method_signature: SubstructureFingerprinter.SubstructureFingerprinter(String[] smarts)
focal_class.full_signature: public  SubstructureFingerprinter(String[] smarts)
focal_class.identifier: SubstructureFingerprinter
focal_class.modifiers: public
focal_class.parameters: (String[] smarts)
focal_class.signature:  SubstructureFingerprinter(String[] smarts)
focal_class.class_method_signature: SubstructureFingerprinter.SubstructureFingerprinter()
focal_class.full_signature: public  SubstructureFingerprinter()
focal_class.identifier: SubstructureFingerprinter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  SubstructureFingerprinter()
focal_class.class_method_signature: SubstructureFingerprinter.setSmarts(String[] smarts)
focal_class.full_signature: private void setSmarts(String[] smarts)
focal_class.identifier: setSmarts
focal_class.modifiers: private
focal_class.parameters: (String[] smarts)
focal_class.return: void
focal_class.signature: void setSmarts(String[] smarts)
focal_class.class_method_signature: SubstructureFingerprinter.getBitFingerprint(IAtomContainer atomContainer)
focal_class.full_signature: @Override public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)
focal_class.identifier: getBitFingerprint
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: IBitFingerprint
focal_class.signature: IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)
focal_class.class_method_signature: SubstructureFingerprinter.getCountFingerprint(IAtomContainer atomContainer)
focal_class.full_signature: @Override public ICountFingerprint getCountFingerprint(IAtomContainer atomContainer)
focal_class.identifier: getCountFingerprint
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: ICountFingerprint
focal_class.signature: ICountFingerprint getCountFingerprint(IAtomContainer atomContainer)
focal_class.class_method_signature: SubstructureFingerprinter.getRawFingerprint(IAtomContainer iAtomContainer)
focal_class.full_signature: @Override public Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer)
focal_class.identifier: getRawFingerprint
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer iAtomContainer)
focal_class.return: Map<String, Integer>
focal_class.signature: Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer)
focal_class.class_method_signature: SubstructureFingerprinter.getSize()
focal_class.full_signature: @Override public int getSize()
focal_class.identifier: getSize
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getSize()
focal_class.class_method_signature: SubstructureFingerprinter.getSubstructure(int bitIndex)
focal_class.full_signature: public String getSubstructure(int bitIndex)
focal_class.identifier: getSubstructure
focal_class.modifiers: public
focal_class.parameters: (int bitIndex)
focal_class.return: String
focal_class.signature: String getSubstructure(int bitIndex)
focal_class.superclass: extends AbstractFingerprinter
focal_method.body: @Override
      public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer) throws CDKException {
          if (keys.isEmpty()) {
              throw new CDKException("No substructures were defined");
          }
  
          SmartsPattern.prepare(atomContainer);
          BitSet fingerPrint = new BitSet(keys.size());
          for (int i = 0; i < keys.size(); i++) {
              if (keys.get(i).pattern.matches(atomContainer))
                  fingerPrint.set(i, true);
          }
          return new BitSetFingerprint(fingerPrint);
      }
focal_method.class_method_signature: SubstructureFingerprinter.getBitFingerprint(IAtomContainer atomContainer)
focal_method.full_signature: @Override public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)
focal_method.identifier: getBitFingerprint
focal_method.invocations: isEmpty prepare size size matches get set
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer atomContainer)
focal_method.return: IBitFingerprint
focal_method.signature: IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)