test_class.declarator: smiles = new SmilesParser(SilentChemObjectBuilder.getInstance())
test_class.modifier: static
test_class.original_string: static SmilesParser   smiles = new SmilesParser(SilentChemObjectBuilder.getInstance());
test_class.type: SmilesParser
test_class.var_name: smiles
test_class.declarator: molecule
test_class.modifier: static
test_class.original_string: static IAtomContainer molecule;
test_class.type: IAtomContainer
test_class.var_name: molecule
test_class.file: descriptor/cip/src/test/java/org/openscience/cdk/geometry/cip/rules/MassNumberRuleTest.java
test_class.identifier: MassNumberRuleTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testOrder() {
          VisitedAtoms visitedAtoms = new VisitedAtoms();
          ILigand ligand1 = new Ligand(molecule, visitedAtoms, molecule.getAtom(1), molecule.getAtom(4));
          ILigand ligand2 = new Ligand(molecule, visitedAtoms, molecule.getAtom(1), molecule.getAtom(3));
          ILigand ligand3 = new Ligand(molecule, visitedAtoms, molecule.getAtom(1), molecule.getAtom(2));
          ILigand ligand4 = new Ligand(molecule, visitedAtoms, molecule.getAtom(1), molecule.getAtom(0));
          List<ILigand> ligands = new ArrayList<ILigand>();
          ligands.add(ligand1);
          ligands.add(ligand2);
          ligands.add(ligand3);
          ligands.add(ligand4);
  
          Collections.sort(ligands, new MassNumberRule());
          Assert.assertNotNull(ligands.get(0));
          Assert.assertEquals("H", ligands.get(0).getLigandAtom().getSymbol());
          Assert.assertEquals("H", ligands.get(1).getLigandAtom().getSymbol());
          Assert.assertEquals(2, ligands.get(1).getLigandAtom().getMassNumber().intValue());
          Assert.assertEquals("C", ligands.get(2).getLigandAtom().getSymbol());
          Assert.assertEquals("C", ligands.get(3).getLigandAtom().getSymbol());
          Assert.assertEquals(13, ligands.get(3).getLigandAtom().getMassNumber().intValue());
      }
test_case.class_method_signature: MassNumberRuleTest.testOrder()
test_case.full_signature: @Test public void testOrder()
test_case.identifier: testOrder
test_case.invocations: getAtom getAtom getAtom getAtom getAtom getAtom getAtom getAtom add add add add sort assertNotNull get assertEquals getSymbol getLigandAtom get assertEquals getSymbol getLigandAtom get assertEquals intValue getMassNumber getLigandAtom get assertEquals getSymbol getLigandAtom get assertEquals getSymbol getLigandAtom get assertEquals intValue getMassNumber getLigandAtom get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOrder()
focal_class.declarator: logger = LoggingToolFactory.createLoggingTool(MassNumberRule.class)
focal_class.original_string: ILoggingTool   logger = LoggingToolFactory.createLoggingTool(MassNumberRule.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.declarator: factory
focal_class.original_string: IsotopeFactory factory;
focal_class.type: IsotopeFactory
focal_class.var_name: factory
focal_class.file: descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/rules/MassNumberRule.java
focal_class.identifier: MassNumberRule
focal_class.interfaces: implements ISequenceSubRule<ILigand>
focal_class.class_method_signature: MassNumberRule.compare(ILigand ligand1, ILigand ligand2)
focal_class.full_signature: @Override public int compare(ILigand ligand1, ILigand ligand2)
focal_class.identifier: compare
focal_class.modifiers: @Override public
focal_class.parameters: (ILigand ligand1, ILigand ligand2)
focal_class.return: int
focal_class.signature: int compare(ILigand ligand1, ILigand ligand2)
focal_class.class_method_signature: MassNumberRule.ensureFactory()
focal_class.full_signature: private void ensureFactory()
focal_class.identifier: ensureFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void ensureFactory()
focal_class.class_method_signature: MassNumberRule.getMassNumber(ILigand ligand)
focal_class.full_signature: private Integer getMassNumber(ILigand ligand)
focal_class.identifier: getMassNumber
focal_class.modifiers: private
focal_class.parameters: (ILigand ligand)
focal_class.return: Integer
focal_class.signature: Integer getMassNumber(ILigand ligand)
focal_method.body: private Integer getMassNumber(ILigand ligand) {
          Integer massNumber = ligand.getLigandAtom().getMassNumber();
          if (massNumber != null) return massNumber;
          if (factory == null) return 0;
          return factory.getMajorIsotope(ligand.getLigandAtom().getSymbol()).getMassNumber();
      }
focal_method.class_method_signature: MassNumberRule.getMassNumber(ILigand ligand)
focal_method.full_signature: private Integer getMassNumber(ILigand ligand)
focal_method.identifier: getMassNumber
focal_method.invocations: getMassNumber getLigandAtom getMassNumber getMajorIsotope getSymbol getLigandAtom
focal_method.modifiers: private
focal_method.parameters: (ILigand ligand)
focal_method.return: Integer
focal_method.signature: Integer getMassNumber(ILigand ligand)