test_class.file: java/src/test/java/net/auxesia/ChromosomeTest.java
test_class.identifier: ChromosomeTest
test_case.body: @Test
  	public void testCompareTo() {
  		Chromosome c1 = new Chromosome("Hello, world!");
  		assertEquals(0, c1.getFitness());
  	
  		Chromosome c2 = new Chromosome("H5p&J;!l<X\\7l");
  		assertEquals(399, c2.getFitness());
  		
  		Chromosome c3 = new Chromosome("Vc;fx#QRP8V\\$");
  		assertEquals(297, c3.getFitness());
  
  		Chromosome c4 = new Chromosome("t\\O`E_Jx$n=NF");
  		assertEquals(415, c4.getFitness());
  		
  		assertEquals(0, c1.compareTo(c1));
  		assertTrue(c1.compareTo(c2) < 0);
  		assertTrue(c1.compareTo(c3) < 0);
  		assertTrue(c1.compareTo(c4) < 0);
  		
  		assertEquals(0, c2.compareTo(c2));
  		assertTrue(c2.compareTo(c1) > 0);
  		assertTrue(c2.compareTo(c3) > 0);
  		assertTrue(c2.compareTo(c4) < 0);
  
  		assertEquals(0, c3.compareTo(c3));
  		assertTrue(c3.compareTo(c1) > 0);
  		assertTrue(c3.compareTo(c2) < 0);
  		assertTrue(c3.compareTo(c4) < 0);
  		
  		assertEquals(0, c4.compareTo(c4));
  		assertTrue(c4.compareTo(c1) > 0);
  		assertTrue(c4.compareTo(c2) > 0);
  		assertTrue(c4.compareTo(c3) > 0);
  	}
test_case.class_method_signature: ChromosomeTest.testCompareTo()
test_case.full_signature: @Test public void testCompareTo()
test_case.identifier: testCompareTo
test_case.invocations: assertEquals getFitness assertEquals getFitness assertEquals getFitness assertEquals getFitness assertEquals compareTo assertTrue compareTo assertTrue compareTo assertTrue compareTo assertEquals compareTo assertTrue compareTo assertTrue compareTo assertTrue compareTo assertEquals compareTo assertTrue compareTo assertTrue compareTo assertTrue compareTo assertEquals compareTo assertTrue compareTo assertTrue compareTo assertTrue compareTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCompareTo()
focal_class.declarator: gene
focal_class.modifier: private final
focal_class.original_string: private final String gene;
focal_class.type: String
focal_class.var_name: gene
focal_class.declarator: fitness
focal_class.modifier: private final
focal_class.original_string: private final int fitness;
focal_class.type: int
focal_class.var_name: fitness
focal_class.declarator: TARGET_GENE = "Hello, world!".toCharArray()
focal_class.modifier: private static final
focal_class.original_string: private static final char[] TARGET_GENE = "Hello, world!".toCharArray();
focal_class.type: char[]
focal_class.var_name: TARGET_GENE
focal_class.declarator: rand = new Random(System.currentTimeMillis())
focal_class.modifier: private static final
focal_class.original_string: private static final Random rand = new Random(System.currentTimeMillis());
focal_class.type: Random
focal_class.var_name: rand
focal_class.file: java/src/main/java/net/auxesia/Chromosome.java
focal_class.identifier: Chromosome
focal_class.interfaces: implements Comparable<Chromosome>
focal_class.class_method_signature: Chromosome.Chromosome(String gene)
focal_class.full_signature: public  Chromosome(String gene)
focal_class.identifier: Chromosome
focal_class.modifiers: public
focal_class.parameters: (String gene)
focal_class.signature:  Chromosome(String gene)
focal_class.class_method_signature: Chromosome.getGene()
focal_class.full_signature: public String getGene()
focal_class.identifier: getGene
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getGene()
focal_class.class_method_signature: Chromosome.getFitness()
focal_class.full_signature: public int getFitness()
focal_class.identifier: getFitness
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getFitness()
focal_class.class_method_signature: Chromosome.calculateFitness(String gene)
focal_class.full_signature: private static int calculateFitness(String gene)
focal_class.identifier: calculateFitness
focal_class.modifiers: private static
focal_class.parameters: (String gene)
focal_class.return: int
focal_class.signature: int calculateFitness(String gene)
focal_class.class_method_signature: Chromosome.mutate()
focal_class.full_signature: public Chromosome mutate()
focal_class.identifier: mutate
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Chromosome
focal_class.signature: Chromosome mutate()
focal_class.class_method_signature: Chromosome.mate(Chromosome mate)
focal_class.full_signature: public Chromosome[] mate(Chromosome mate)
focal_class.identifier: mate
focal_class.modifiers: public
focal_class.parameters: (Chromosome mate)
focal_class.return: Chromosome[]
focal_class.signature: Chromosome[] mate(Chromosome mate)
focal_class.class_method_signature: Chromosome.generateRandom()
focal_class.full_signature: static Chromosome generateRandom()
focal_class.identifier: generateRandom
focal_class.modifiers: static
focal_class.parameters: ()
focal_class.return: Chromosome
focal_class.signature: Chromosome generateRandom()
focal_class.class_method_signature: Chromosome.compareTo(Chromosome c)
focal_class.full_signature: @Override public int compareTo(Chromosome c)
focal_class.identifier: compareTo
focal_class.modifiers: @Override public
focal_class.parameters: (Chromosome c)
focal_class.return: int
focal_class.signature: int compareTo(Chromosome c)
focal_class.class_method_signature: Chromosome.equals(Object o)
focal_class.full_signature: @Override public boolean equals(Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(Object o)
focal_class.class_method_signature: Chromosome.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_method.body: @Override
  	public int compareTo(Chromosome c) {
  		if (fitness < c.fitness) {
  			return -1;
  		} else if (fitness > c.fitness) {
  			return 1;
  		}
  		
  		return 0;
  	}
focal_method.class_method_signature: Chromosome.compareTo(Chromosome c)
focal_method.full_signature: @Override public int compareTo(Chromosome c)
focal_method.identifier: compareTo
focal_method.modifiers: @Override public
focal_method.parameters: (Chromosome c)
focal_method.return: int
focal_method.signature: int compareTo(Chromosome c)