test_class.file: tool/formula/src/test/java/org/openscience/cdk/formula/IsotopePatternTest.java
test_class.identifier: IsotopePatternTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void testClone() throws Exception {
          IsotopePattern spExp = new IsotopePattern();
          spExp.setMonoIsotope(new IsotopeContainer(156.07770, 1));
          spExp.addIsotope(new IsotopeContainer(157.07503, 0.0004));
          spExp.addIsotope(new IsotopeContainer(157.08059, 0.0003));
          spExp.addIsotope(new IsotopeContainer(158.08135, 0.002));
          spExp.setCharge(1);
  
          IsotopePattern clone = (IsotopePattern) spExp.clone();
          Assert.assertEquals(156.07770, clone.getMonoIsotope().getMass(), 0.001);
          Assert.assertEquals(156.07770, clone.getIsotopes().get(0).getMass(), 0.001);
          Assert.assertEquals(157.07503, clone.getIsotopes().get(1).getMass(), 0.001);
          Assert.assertEquals(157.08059, clone.getIsotopes().get(2).getMass(), 0.001);
          Assert.assertEquals(158.08135, clone.getIsotopes().get(3).getMass(), 0.001);
  
          Assert.assertEquals(1, clone.getMonoIsotope().getIntensity(), 0.001);
          Assert.assertEquals(1, clone.getIsotopes().get(0).getIntensity(), 0.001);
          Assert.assertEquals(0.0004, clone.getIsotopes().get(1).getIntensity(), 0.001);
          Assert.assertEquals(0.0003, clone.getIsotopes().get(2).getIntensity(), 0.001);
          Assert.assertEquals(0.002, clone.getIsotopes().get(3).getIntensity(), 0.001);
  
          Assert.assertEquals(1, clone.getCharge(), 0.001);
  
      }
test_case.class_method_signature: IsotopePatternTest.testClone()
test_case.full_signature: @Test public void testClone()
test_case.identifier: testClone
test_case.invocations: setMonoIsotope addIsotope addIsotope addIsotope setCharge clone assertEquals getMass getMonoIsotope assertEquals getMass get getIsotopes assertEquals getMass get getIsotopes assertEquals getMass get getIsotopes assertEquals getMass get getIsotopes assertEquals getIntensity getMonoIsotope assertEquals getIntensity get getIsotopes assertEquals getIntensity get getIsotopes assertEquals getIntensity get getIsotopes assertEquals getIntensity get getIsotopes assertEquals getCharge
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testClone()
focal_class.declarator: isotopeCList = new ArrayList<IsotopeContainer>()
focal_class.modifier: private
focal_class.original_string: private List<IsotopeContainer> isotopeCList = new ArrayList<IsotopeContainer>();
focal_class.type: List<IsotopeContainer>
focal_class.var_name: isotopeCList
focal_class.declarator: monoIsotopePosition
focal_class.modifier: private
focal_class.original_string: private int                    monoIsotopePosition;
focal_class.type: int
focal_class.var_name: monoIsotopePosition
focal_class.declarator: chargI       = 0
focal_class.modifier: private
focal_class.original_string: private double                 chargI       = 0;
focal_class.type: double
focal_class.var_name: chargI
focal_class.file: tool/formula/src/main/java/org/openscience/cdk/formula/IsotopePattern.java
focal_class.identifier: IsotopePattern
focal_class.class_method_signature: IsotopePattern.IsotopePattern()
focal_class.full_signature: public  IsotopePattern()
focal_class.identifier: IsotopePattern
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  IsotopePattern()
focal_class.class_method_signature: IsotopePattern.setMonoIsotope(IsotopeContainer isoContainer)
focal_class.full_signature: public void setMonoIsotope(IsotopeContainer isoContainer)
focal_class.identifier: setMonoIsotope
focal_class.modifiers: public
focal_class.parameters: (IsotopeContainer isoContainer)
focal_class.return: void
focal_class.signature: void setMonoIsotope(IsotopeContainer isoContainer)
focal_class.class_method_signature: IsotopePattern.addIsotope(IsotopeContainer isoContainer)
focal_class.full_signature: public void addIsotope(IsotopeContainer isoContainer)
focal_class.identifier: addIsotope
focal_class.modifiers: public
focal_class.parameters: (IsotopeContainer isoContainer)
focal_class.return: void
focal_class.signature: void addIsotope(IsotopeContainer isoContainer)
focal_class.class_method_signature: IsotopePattern.getMonoIsotope()
focal_class.full_signature: public IsotopeContainer getMonoIsotope()
focal_class.identifier: getMonoIsotope
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: IsotopeContainer
focal_class.signature: IsotopeContainer getMonoIsotope()
focal_class.class_method_signature: IsotopePattern.getIsotopes()
focal_class.full_signature: public List<IsotopeContainer> getIsotopes()
focal_class.identifier: getIsotopes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<IsotopeContainer>
focal_class.signature: List<IsotopeContainer> getIsotopes()
focal_class.class_method_signature: IsotopePattern.getIsotope(int position)
focal_class.full_signature: public IsotopeContainer getIsotope(int position)
focal_class.identifier: getIsotope
focal_class.modifiers: public
focal_class.parameters: (int position)
focal_class.return: IsotopeContainer
focal_class.signature: IsotopeContainer getIsotope(int position)
focal_class.class_method_signature: IsotopePattern.getNumberOfIsotopes()
focal_class.full_signature: public int getNumberOfIsotopes()
focal_class.identifier: getNumberOfIsotopes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumberOfIsotopes()
focal_class.class_method_signature: IsotopePattern.setCharge(double charge)
focal_class.full_signature: public void setCharge(double charge)
focal_class.identifier: setCharge
focal_class.modifiers: public
focal_class.parameters: (double charge)
focal_class.return: void
focal_class.signature: void setCharge(double charge)
focal_class.class_method_signature: IsotopePattern.getCharge()
focal_class.full_signature: public double getCharge()
focal_class.identifier: getCharge
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getCharge()
focal_class.class_method_signature: IsotopePattern.clone()
focal_class.full_signature: @Override public Object clone()
focal_class.identifier: clone
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Object
focal_class.signature: Object clone()
focal_method.body: @Override
      public Object clone() throws CloneNotSupportedException {
          IsotopePattern isoClone = new IsotopePattern();
          IsotopeContainer isoHighest = getMonoIsotope();
          for (IsotopeContainer isoContainer : isotopeCList) {
              if (isoHighest.equals(isoContainer))
                  isoClone.setMonoIsotope((IsotopeContainer) isoContainer.clone());
              else
                  isoClone.addIsotope((IsotopeContainer) isoContainer.clone());
          }
          isoClone.setCharge(getCharge());
          return isoClone;
      }
focal_method.class_method_signature: IsotopePattern.clone()
focal_method.full_signature: @Override public Object clone()
focal_method.identifier: clone
focal_method.invocations: getMonoIsotope equals setMonoIsotope clone addIsotope clone setCharge getCharge
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: Object
focal_method.signature: Object clone()