test_class.file: tool/smarts/src/test/java/org/openscience/cdk/smarts/SmartsFragmentExtractorTest.java
test_class.identifier: SmartsFragmentExtractorTest
test_case.body: @Test
      public void methylExact() throws Exception {
          String smarts = generate("CC(C)CCC",
                                   SmartsFragmentExtractor.MODE_EXACT,
                                   makeSeq(0,1));
          assertThat(smarts, is("[CH3v4X4+0]"));
      }
test_case.class_method_signature: SmartsFragmentExtractorTest.methylExact()
test_case.full_signature: @Test public void methylExact()
test_case.identifier: methylExact
test_case.invocations: generate makeSeq assertThat is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void methylExact()
focal_class.declarator: MODE_JCOMPOUNDMAPPER = 1
focal_class.modifier: public static final
focal_class.original_string: public static final int MODE_JCOMPOUNDMAPPER = 1;
focal_class.type: int
focal_class.var_name: MODE_JCOMPOUNDMAPPER
focal_class.declarator: MODE_EXACT = 2
focal_class.modifier: public static final
focal_class.original_string: public static final int MODE_EXACT = 2;
focal_class.type: int
focal_class.var_name: MODE_EXACT
focal_class.declarator: mol
focal_class.modifier: private final
focal_class.original_string: private final IAtomContainer mol;
focal_class.type: IAtomContainer
focal_class.var_name: mol
focal_class.declarator: atomAdj
focal_class.modifier: private final
focal_class.original_string: private final int[][] atomAdj, bondAdj;
focal_class.type: int[][]
focal_class.var_name: atomAdj
focal_class.declarator: deg
focal_class.modifier: private final
focal_class.original_string: private final int[] deg;
focal_class.type: int[]
focal_class.var_name: deg
focal_class.declarator: aexpr
focal_class.modifier: private final
focal_class.original_string: private final String[] aexpr;
focal_class.type: String[]
focal_class.var_name: aexpr
focal_class.declarator: bexpr
focal_class.modifier: private final
focal_class.original_string: private final String[] bexpr;
focal_class.type: String[]
focal_class.var_name: bexpr
focal_class.declarator: avisit
focal_class.modifier: private final
focal_class.original_string: private final int[] avisit;
focal_class.type: int[]
focal_class.var_name: avisit
focal_class.declarator: rbnds
focal_class.modifier: private final
focal_class.original_string: private final int[] rbnds;
focal_class.type: int[]
focal_class.var_name: rbnds
focal_class.declarator: rnums
focal_class.modifier: private final
focal_class.original_string: private final int[] rnums;
focal_class.type: int[]
focal_class.var_name: rnums
focal_class.declarator: numVisit
focal_class.modifier: private
focal_class.original_string: private       int   numVisit;
focal_class.type: int
focal_class.var_name: numVisit
focal_class.declarator: mode = MODE_EXACT
focal_class.modifier: private
focal_class.original_string: private int mode = MODE_EXACT;
focal_class.type: int
focal_class.var_name: mode
focal_class.file: tool/smarts/src/main/java/org/openscience/cdk/smarts/SmartsFragmentExtractor.java
focal_class.identifier: SmartsFragmentExtractor
focal_class.class_method_signature: SmartsFragmentExtractor.SmartsFragmentExtractor(IAtomContainer mol)
focal_class.full_signature: public  SmartsFragmentExtractor(IAtomContainer mol)
focal_class.identifier: SmartsFragmentExtractor
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer mol)
focal_class.signature:  SmartsFragmentExtractor(IAtomContainer mol)
focal_class.class_method_signature: SmartsFragmentExtractor.setMode(int mode)
focal_class.full_signature: public void setMode(int mode)
focal_class.identifier: setMode
focal_class.modifiers: public
focal_class.parameters: (int mode)
focal_class.return: void
focal_class.signature: void setMode(int mode)
focal_class.class_method_signature: SmartsFragmentExtractor.generate(int[] atomIdxs)
focal_class.full_signature: public String generate(int[] atomIdxs)
focal_class.identifier: generate
focal_class.modifiers: public
focal_class.parameters: (int[] atomIdxs)
focal_class.return: String
focal_class.signature: String generate(int[] atomIdxs)
focal_class.class_method_signature: SmartsFragmentExtractor.markRings(int idx, int bprev)
focal_class.full_signature: private void markRings(int idx, int bprev)
focal_class.identifier: markRings
focal_class.modifiers: private
focal_class.parameters: (int idx, int bprev)
focal_class.return: void
focal_class.signature: void markRings(int idx, int bprev)
focal_class.class_method_signature: SmartsFragmentExtractor.encodeExpr(int idx, int bprev, StringBuilder sb)
focal_class.full_signature: private void encodeExpr(int idx, int bprev, StringBuilder sb)
focal_class.identifier: encodeExpr
focal_class.modifiers: private
focal_class.parameters: (int idx, int bprev, StringBuilder sb)
focal_class.return: void
focal_class.signature: void encodeExpr(int idx, int bprev, StringBuilder sb)
focal_class.class_method_signature: SmartsFragmentExtractor.chooseRingNumber()
focal_class.full_signature: private int chooseRingNumber()
focal_class.identifier: chooseRingNumber
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int chooseRingNumber()
focal_class.class_method_signature: SmartsFragmentExtractor.releaseRingNumber(int rnum)
focal_class.full_signature: private void releaseRingNumber(int rnum)
focal_class.identifier: releaseRingNumber
focal_class.modifiers: private
focal_class.parameters: (int rnum)
focal_class.return: void
focal_class.signature: void releaseRingNumber(int rnum)
focal_class.class_method_signature: SmartsFragmentExtractor.encodeAtomExpr(int atmIdx)
focal_class.full_signature: private String encodeAtomExpr(int atmIdx)
focal_class.identifier: encodeAtomExpr
focal_class.modifiers: private
focal_class.parameters: (int atmIdx)
focal_class.return: String
focal_class.signature: String encodeAtomExpr(int atmIdx)
focal_class.class_method_signature: SmartsFragmentExtractor.encodeBondExpr(int bondIdx, int beg, int end)
focal_class.full_signature: private String encodeBondExpr(int bondIdx, int beg, int end)
focal_class.identifier: encodeBondExpr
focal_class.modifiers: private
focal_class.parameters: (int bondIdx, int beg, int end)
focal_class.return: String
focal_class.signature: String encodeBondExpr(int bondIdx, int beg, int end)
focal_method.body: public String generate(int[] atomIdxs) {
  
          if (atomIdxs == null)
              throw new NullPointerException("No atom indexes provided");
          if (atomIdxs.length == 0)
              return null; // makes sense?
  
          // special case
          if (atomIdxs.length == 1 && mode == MODE_EXACT)
              return aexpr[atomIdxs[0]];
  
          // initialize traversal information
          Arrays.fill(rbnds, 0);
          Arrays.fill(avisit, 0);
          for (int atmIdx : atomIdxs)
              avisit[atmIdx] = -1;
  
          // first visit marks ring information
          numVisit = 1;
          for (int atomIdx : atomIdxs) {
              if (avisit[atomIdx] < 0)
                  markRings(atomIdx, -1);
          }
  
          // reset visit flags and generate
          numVisit = 1;
          for (int atmIdx : atomIdxs)
              avisit[atmIdx] = -1;
  
          // second pass builds the expression
          StringBuilder sb = new StringBuilder();
          for (int i = 0; i < atomIdxs.length; i++) {
              if (avisit[atomIdxs[i]] < 0) {
                  if (i > 0) sb.append('.');
                  encodeExpr(atomIdxs[i], -1, sb);
              }
          }
  
          return sb.toString();
      }
focal_method.class_method_signature: SmartsFragmentExtractor.generate(int[] atomIdxs)
focal_method.full_signature: public String generate(int[] atomIdxs)
focal_method.identifier: generate
focal_method.invocations: fill fill markRings append encodeExpr toString
focal_method.modifiers: public
focal_method.parameters: (int[] atomIdxs)
focal_method.return: String
focal_method.signature: String generate(int[] atomIdxs)