nus-yam/ex-repair huggingface dataset:
Program: 180622
Project: 180622
Buggy source:
/** 
 * Tests even 3 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven3Parity(){
  final int LOWER_SUCCESS=99;
  final int UPPER_SUCCESS=100;
  final EvenParity model=new EvenParity(getEvolver(),3);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests even 3 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven3Parity(){
  final int LOWER_SUCCESS=99;
  final int UPPER_SUCCESS=100;
  final EvenParity model=new EvenParity(getEvolver(),3);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180623
Project: 180623
Buggy source:
/** 
 * Tests standard setup except: - Program selector of TournamentSelector (size 7) Expecting success rate between 40% and 50%.
 */
@Test public void testEven4ParityTournament7Selection(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new TournamentSelector(evolver,7));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Program selector of TournamentSelector (size 7) Expecting success rate between 40% and 50%.
 */
@Test public void testEven4ParityTournament7Selection(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new TournamentSelector(evolver,7));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180624
Project: 180624
Buggy source:
/** 
 * Tests even 5 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven5Parity(){
  final int LOWER_SUCCESS=0;
  final int UPPER_SUCCESS=0;
  final EvenParity model=new EvenParity(getEvolver(),5);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests even 5 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven5Parity(){
  final int LOWER_SUCCESS=0;
  final int UPPER_SUCCESS=0;
  final EvenParity model=new EvenParity(getEvolver(),5);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180625
Project: 180625
Buggy source:
/** 
 * Tests standard setup except: - Crossover operator of OnePointCrossover Expecting success rate between 40% and 50%.
 */
@Test public void testEven4ParityOnePointCrossover(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setCrossover(new OnePointCrossover(evolver));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Crossover operator of OnePointCrossover Expecting success rate between 40% and 50%.
 */
@Test public void testEven4ParityOnePointCrossover(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setCrossover(new OnePointCrossover(evolver));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180626
Project: 180626
Buggy source:
/** 
 * Tests standard setup except: - Program selector of LinearRankSelector Expecting success rate between 40% and 50%.
 */
@Test public void testEven4ParityLinearRankSelection(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new LinearRankSelector(evolver));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Program selector of LinearRankSelector Expecting success rate between 40% and 50%.
 */
@Test public void testEven4ParityLinearRankSelection(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new LinearRankSelector(evolver));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180627
Project: 180627
Buggy source:
/** 
 * Tests standard setup except: - Mutation operator of SinglePointMutation Expecting success rate between % and %.
 */
@Test public void testEven4ParitySinglePointMutation(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setMutation(new SinglePointMutation(evolver));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Mutation operator of SinglePointMutation Expecting success rate between % and %.
 */
@Test public void testEven4ParitySinglePointMutation(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setMutation(new SinglePointMutation(evolver));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180628
Project: 180628
Buggy source:
/** 
 * Tests even 4 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven4Parity(){
  final int LOWER_SUCCESS=40;
  final int UPPER_SUCCESS=50;
  final EvenParity model=new EvenParity(getEvolver(),4);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests even 4 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven4Parity(){
  final int LOWER_SUCCESS=40;
  final int UPPER_SUCCESS=50;
  final EvenParity model=new EvenParity(getEvolver(),4);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180629
Project: 180629
Buggy source:
/** 
 * Tests 11-bit multiplexer with standard setup except: - Population size of 4000 - Program selector of FitnessProportionateSelector with over-selection Expecting success rate between % and %.
 */
@Test public void testMultiplexer11Bit(){
  final int LOWER_SUCCESS=35;
  final int UPPER_SUCCESS=45;
  Evolver evolver=getEvolver();
  final Multiplexer model=new Multiplexer(evolver,11);
  setupModel(model);
  model.setProgramSelector(new FitnessProportionateSelector(evolver));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests 11-bit multiplexer with standard setup except: - Population size of 4000 - Program selector of FitnessProportionateSelector with over-selection Expecting success rate between % and %.
 */
@Test public void testMultiplexer11Bit(){
  final int LOWER_SUCCESS=35;
  final int UPPER_SUCCESS=45;
  Evolver evolver=getEvolver();
  final Multiplexer model=new Multiplexer(evolver,11);
  setupModel(model);
  model.setProgramSelector(new FitnessProportionateSelector(evolver));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180630
Project: 180630
Buggy source:
/** 
 * Tests 6-bit multiplexer with standard setup. Expecting success rate between % and %.
 */
@Test public void testMultiplexer6Bit(){
  final int LOWER_SUCCESS=37;
  final int UPPER_SUCCESS=47;
  final Multiplexer model=new Multiplexer(getEvolver(),6);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests 6-bit multiplexer with standard setup. Expecting success rate between % and %.
 */
@Test public void testMultiplexer6Bit(){
  final int LOWER_SUCCESS=37;
  final int UPPER_SUCCESS=47;
  final Multiplexer model=new Multiplexer(getEvolver(),6);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180631
Project: 180631
Buggy source:
/** 
 * Tests quartic symbolic regression with standard setup. Expecting success rate between % and %.
 */
@Test public void testQuartic(){
  final int LOWER_SUCCESS=45;
  final int UPPER_SUCCESS=55;
  final QuarticRegression model=new QuarticRegression(getEvolver(),20);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests quartic symbolic regression with standard setup. Expecting success rate between % and %.
 */
@Test public void testQuartic(){
  final int LOWER_SUCCESS=45;
  final int UPPER_SUCCESS=55;
  final QuarticRegression model=new QuarticRegression(getEvolver(),20);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180632
Project: 180632
Buggy source:
/** 
 * Tests Santa Fe trail with standard setup. Koza's success rate: 16% (p202). OR: 14%/50%/46% with full/grow/RH+H (p599). Expecting success rate between 12% and 20%.
 */
@Test public void testSantaFeTrail(){
  final int LOWER_SUCCESS=12;
  final int UPPER_SUCCESS=20;
  final SantaFeTrail model=new SantaFeTrail(getEvolver(),600);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests Santa Fe trail with standard setup. Koza's success rate: 16% (p202). OR: 14%/50%/46% with full/grow/RH+H (p599). Expecting success rate between 12% and 20%.
 */
@Test public void testSantaFeTrail(){
  final int LOWER_SUCCESS=12;
  final int UPPER_SUCCESS=20;
  final SantaFeTrail model=new SantaFeTrail(getEvolver(),600);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180633
Project: 180633
Buggy source:
/** 
 * Tests even 3 parity with standard setup. Koza's success rate: 100% (p531). Expecting success rate between 99% and 100%.
 */
@Test public void testEven3Parity(){
  final int LOWER_SUCCESS=99;
  final int UPPER_SUCCESS=100;
  final EvenParity model=new EvenParity(getEvolver(),3);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests even 3 parity with standard setup. Koza's success rate: 100% (p531). Expecting success rate between 99% and 100%.
 */
@Test public void testEven3Parity(){
  final int LOWER_SUCCESS=99;
  final int UPPER_SUCCESS=100;
  final EvenParity model=new EvenParity(getEvolver(),3);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,true);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180634
Project: 180634
Buggy source:
/** 
 * Tests standard setup except: - Program selector of TournamentSelector (size 7) Expecting success rate between 90% and 100%.
 */
@Test public void testEven4ParityTournament7Selection(){
  final int LOWER_SUCCESS=90;
  final int UPPER_SUCCESS=100;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new TournamentSelector(evolver,7));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Program selector of TournamentSelector (size 7) Expecting success rate between 90% and 100%.
 */
@Test public void testEven4ParityTournament7Selection(){
  final int LOWER_SUCCESS=90;
  final int UPPER_SUCCESS=100;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new TournamentSelector(evolver,7));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180635
Project: 180635
Buggy source:
private void setupModel(final EvenParity model){
  Evolver evolver=getEvolver();
  model.setNoRuns(100);
  model.setPopulationSize(4000);
  model.setNoGenerations(51);
  model.setCrossoverProbability(0.9);
  model.setMutationProbability(0.0);
  model.setReproductionProbability(0.1);
  model.setCrossover(new KozaCrossover(evolver));
  model.setMaxDepth(16);
  model.setMaxInitialDepth(5);
  model.setInitialiser(new RampedHalfAndHalfInitialiser(evolver,1,false));
  model.setPoolSelector(null);
  model.setProgramSelector(new FitnessProportionateSelector(evolver,true));
  model.setNoElites(0);
  model.setTerminationFitness(0.0);
}

Fixed version (ground truth):
private void setupModel(final EvenParity model){
  Evolver evolver=getEvolver();
  model.setNoRuns(100);
  model.setPopulationSize(4000);
  model.setNoGenerations(51);
  model.setCrossoverProbability(0.9);
  model.setMutationProbability(0.0);
  model.setReproductionProbability(0.1);
  model.setCrossover(new KozaCrossover(evolver));
  model.setMaxDepth(16);
  model.setMaxInitialDepth(5);
  model.setInitialiser(new RampedHalfAndHalfInitialiser(evolver,1,false));
  model.setPoolSelector(null);
  model.setProgramSelector(new FitnessProportionateSelector(evolver,true));
  model.setNoElites(1);
  model.setTerminationFitness(0.0);
}
Program: 180636
Project: 180636
Buggy source:
/** 
 * Tests standard setup except: - Reproduction probability of 0.0 - Mutation probability of 0.1 - Mutation operator of PointMutation Expecting success rate between 90% and 100%.
 */
@Test public void testEven4ParityPointMutation(){
  final int LOWER_SUCCESS=90;
  final int UPPER_SUCCESS=100;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setMutationProbability(0.1);
  model.setReproductionProbability(0.0);
  model.setMutation(new PointMutation(evolver));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Reproduction probability of 0.0 - Mutation probability of 0.1 - Mutation operator of PointMutation Expecting success rate between 90% and 100%.
 */
@Test public void testEven4ParityPointMutation(){
  final int LOWER_SUCCESS=90;
  final int UPPER_SUCCESS=100;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setMutationProbability(0.1);
  model.setReproductionProbability(0.0);
  model.setMutation(new PointMutation(evolver));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180637
Project: 180637
Buggy source:
/** 
 * Tests even 5 parity with standard setup. Expecting success rate between 70% and 80%.
 */
@Test public void testEven5Parity(){
  final int LOWER_SUCCESS=70;
  final int UPPER_SUCCESS=80;
  final EvenParity model=new EvenParity(getEvolver(),5);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests even 5 parity with standard setup. Expecting success rate between 70% and 80%.
 */
@Test public void testEven5Parity(){
  final int LOWER_SUCCESS=70;
  final int UPPER_SUCCESS=80;
  final EvenParity model=new EvenParity(getEvolver(),5);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180638
Project: 180638
Buggy source:
/** 
 * Tests standard setup except: - Crossover operator of SubtreeCrossover Expecting success rate between 70% and 80%.
 */
@Test public void testEven4ParitySubtreeCrossover(){
  final int LOWER_SUCCESS=70;
  final int UPPER_SUCCESS=80;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setCrossover(new SubtreeCrossover(evolver));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Crossover operator of SubtreeCrossover Expecting success rate between 70% and 80%.
 */
@Test public void testEven4ParitySubtreeCrossover(){
  final int LOWER_SUCCESS=70;
  final int UPPER_SUCCESS=80;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setCrossover(new SubtreeCrossover(evolver));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180639
Project: 180639
Buggy source:
/** 
 * Tests standard setup except: - Crossover operator of OnePointCrossover - Mutation operator of SubtreeMutation (because one-point crossover needs mutation). - Reproduction probability of 0.0 - Mutation probability of 0.3 - Crossover probability of 0.7 - Program selector of TournamentSelector 7. Expecting success rate between 10% and 20%.
 */
@Test public void testEven4ParityOnePointCrossover(){
  final int LOWER_SUCCESS=10;
  final int UPPER_SUCCESS=20;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setCrossover(new OnePointCrossover(evolver));
  model.setMutation(new SubtreeMutation(evolver));
  model.setProgramSelector(new TournamentSelector(evolver,7));
  model.setMutationProbability(0.3);
  model.setReproductionProbability(0.0);
  model.setCrossoverProbability(0.7);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Crossover operator of OnePointCrossover - Mutation operator of SubtreeMutation (because one-point crossover needs mutation). - Reproduction probability of 0.0 - Mutation probability of 0.3 - Crossover probability of 0.7 - Program selector of TournamentSelector 7. Expecting success rate between 10% and 20%.
 */
@Test public void testEven4ParityOnePointCrossover(){
  final int LOWER_SUCCESS=10;
  final int UPPER_SUCCESS=20;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setCrossover(new OnePointCrossover(evolver));
  model.setMutation(new SubtreeMutation(evolver));
  model.setProgramSelector(new TournamentSelector(evolver,7));
  model.setMutationProbability(0.3);
  model.setReproductionProbability(0.0);
  model.setCrossoverProbability(0.7);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180640
Project: 180640
Buggy source:
/** 
 * Tests standard setup except: - Program selector of LinearRankSelector Expecting success rate between 0% and 0%.
 */
@Test public void testEven4ParityLinearRankSelection(){
  final int LOWER_SUCCESS=0;
  final int UPPER_SUCCESS=0;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new LinearRankSelector(evolver));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Program selector of LinearRankSelector Expecting success rate between 0% and 0%.
 */
@Test public void testEven4ParityLinearRankSelection(){
  final int LOWER_SUCCESS=0;
  final int UPPER_SUCCESS=0;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new LinearRankSelector(evolver));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180641
Project: 180641
Buggy source:
/** 
 * Tests even 4 parity with standard setup. Koza's success rate: 45% (p531). Expecting success rate between 85% and 95%.
 */
@Test public void testEven4Parity(){
  final int LOWER_SUCCESS=85;
  final int UPPER_SUCCESS=95;
  final EvenParity model=new EvenParity(getEvolver(),4);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests even 4 parity with standard setup. Koza's success rate: 45% (p531). Expecting success rate between 85% and 95%.
 */
@Test public void testEven4Parity(){
  final int LOWER_SUCCESS=85;
  final int UPPER_SUCCESS=95;
  final EvenParity model=new EvenParity(getEvolver(),4);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,true);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180642
Project: 180642
Buggy source:
/** 
 * Tests standard setup except: - Reproduction probability of 0.0 - Mutation probability of 0.1 - Mutation operator of SubtreeMutation Expecting success rate between 85% and 95%.
 */
@Test public void testEven4ParitySubtreeMutation(){
  final int LOWER_SUCCESS=85;
  final int UPPER_SUCCESS=95;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setMutationProbability(0.1);
  model.setReproductionProbability(0.0);
  model.setMutation(new SubtreeMutation(evolver));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Reproduction probability of 0.0 - Mutation probability of 0.1 - Mutation operator of SubtreeMutation Expecting success rate between 85% and 95%.
 */
@Test public void testEven4ParitySubtreeMutation(){
  final int LOWER_SUCCESS=85;
  final int UPPER_SUCCESS=95;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setMutationProbability(0.1);
  model.setReproductionProbability(0.0);
  model.setMutation(new SubtreeMutation(evolver));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180643
Project: 180643
Buggy source:
/** 
 * Tests 11-bit multiplexer with standard setup except: - Population size of 4000 - Program selector of FitnessProportionateSelector with over-selection Expecting success rate between 90% and 100%.
 */
@Test public void testMultiplexer11Bit(){
  final int LOWER_SUCCESS=90;
  final int UPPER_SUCCESS=100;
  Evolver evolver=getEvolver();
  final Multiplexer model=new Multiplexer(evolver,11);
  setupModel(model);
  model.setPopulationSize(4000);
  model.setProgramSelector(new FitnessProportionateSelector(evolver,true));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests 11-bit multiplexer with standard setup except: - Population size of 4000 - Program selector of FitnessProportionateSelector with over-selection Expecting success rate between 90% and 100%.
 */
@Test public void testMultiplexer11Bit(){
  final int LOWER_SUCCESS=90;
  final int UPPER_SUCCESS=100;
  Evolver evolver=getEvolver();
  final Multiplexer model=new Multiplexer(evolver,11);
  setupModel(model);
  model.setPopulationSize(4000);
  model.setProgramSelector(new FitnessProportionateSelector(evolver,true));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180644
Project: 180644
Buggy source:
/** 
 * Tests 6-bit multiplexer with standard setup. Koza's success rate: 63% (p572). OR: 28% (p195). Expecting success rate between 37% and 47%.
 */
@Test public void testMultiplexer6Bit(){
  final int LOWER_SUCCESS=37;
  final int UPPER_SUCCESS=47;
  final Multiplexer model=new Multiplexer(getEvolver(),6);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests 6-bit multiplexer with standard setup. Koza's success rate: 63% (p572). OR: 28% (p195). Expecting success rate between 37% and 47%.
 */
@Test public void testMultiplexer6Bit(){
  final int LOWER_SUCCESS=37;
  final int UPPER_SUCCESS=47;
  final Multiplexer model=new Multiplexer(getEvolver(),6);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180645
Project: 180645
Buggy source:
/** 
 * Tests quartic symbolic regression with standard setup. Koza's success rate: 23% (p586). OR 35% (p203). Expecting success rate between 45% and 55%.
 */
@Test public void testQuartic(){
  final int LOWER_SUCCESS=45;
  final int UPPER_SUCCESS=55;
  final QuarticRegression model=new QuarticRegression(getEvolver(),20);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests quartic symbolic regression with standard setup. Koza's success rate: 23% (p586). OR 35% (p203). Expecting success rate between 45% and 55%.
 */
@Test public void testQuartic(){
  final int LOWER_SUCCESS=45;
  final int UPPER_SUCCESS=55;
  final QuarticRegression model=new QuarticRegression(getEvolver(),20);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180646
Project: 180646
Buggy source:
/** 
 * Tests Santa Fe trail with standard setup. Expecting success rate between % and %.
 */
@Test public void testSantaFeTrail(){
  final int LOWER_SUCCESS=0;
  final int UPPER_SUCCESS=0;
  final AntTrail model=new SantaFeTrail(getEvolver(),600);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests Santa Fe trail with standard setup. Expecting success rate between % and %.
 */
@Test public void testSantaFeTrail(){
  final int LOWER_SUCCESS=0;
  final int UPPER_SUCCESS=0;
  final AntTrail model=new SantaFeTrail(getEvolver(),600);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180647
Project: 180647
Buggy source:
/** 
 * Tests even 3 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven3Parity(){
  final int LOWER_SUCCESS=99;
  final int UPPER_SUCCESS=100;
  final EvenParity model=new EvenParity(getEvolver(),3);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests even 3 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven3Parity(){
  final int LOWER_SUCCESS=99;
  final int UPPER_SUCCESS=100;
  final EvenParity model=new EvenParity(getEvolver(),3);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180648
Project: 180648
Buggy source:
/** 
 * Tests standard setup except: - Program selector of TournamentSelector (size 7) Expecting success rate between 40% and 50%.
 */
@Test public void testEven4ParityTournament7Selection(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new TournamentSelector(evolver,7));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Program selector of TournamentSelector (size 7) Expecting success rate between 40% and 50%.
 */
@Test public void testEven4ParityTournament7Selection(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new TournamentSelector(evolver,7));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180649
Project: 180649
Buggy source:
/** 
 * Tests even 5 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven5Parity(){
  final int LOWER_SUCCESS=0;
  final int UPPER_SUCCESS=0;
  final EvenParity model=new EvenParity(getEvolver(),5);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests even 5 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven5Parity(){
  final int LOWER_SUCCESS=0;
  final int UPPER_SUCCESS=0;
  final EvenParity model=new EvenParity(getEvolver(),5);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180650
Project: 180650
Buggy source:
/** 
 * Tests standard setup except: - Program selector of LinearRankSelector Expecting success rate between 40% and 50%.
 */
@Test public void testEven4ParityLinearRankSelection(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new LinearRankSelector(evolver));
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests standard setup except: - Program selector of LinearRankSelector Expecting success rate between 40% and 50%.
 */
@Test public void testEven4ParityLinearRankSelection(){
  final int LOWER_SUCCESS=50;
  final int UPPER_SUCCESS=50;
  Evolver evolver=getEvolver();
  final EvenParity model=new EvenParity(evolver,4);
  setupModel(model);
  model.setProgramSelector(new LinearRankSelector(evolver));
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180651
Project: 180651
Buggy source:
/** 
 * Tests even 4 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven4Parity(){
  final int LOWER_SUCCESS=40;
  final int UPPER_SUCCESS=50;
  final EvenParity model=new EvenParity(getEvolver(),4);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}

Fixed version (ground truth):
/** 
 * Tests even 4 parity with standard setup. Expecting success rate between % and %.
 */
@Test public void testEven4Parity(){
  final int LOWER_SUCCESS=40;
  final int UPPER_SUCCESS=50;
  final EvenParity model=new EvenParity(getEvolver(),4);
  setupModel(model);
  final int noSuccess=getNoSuccesses(model,false,false);
  assertBetween("String_Node_Str",LOWER_SUCCESS,UPPER_SUCCESS,noSuccess);
}
Program: 180652
Project: 180652
Buggy source:
/** 
 * Returns true if the given collection contains an element which represents a class which is the same as or is a sub type of the given class.
 * @param collection the collection to seach for a class that is assignablefrom amongst.
 * @param cls the class that is being searched against the given collection.
 * @return true if the given collection contains a Class which is the sameas or a subtype of the given class parameter. It returns false otherwise.
 */
public static boolean containsSub(final Class<?>[] collection,final Class<?> cls){
  for (  final Class<?> c : collection) {
    if (ClassUtils.isAssignable(cls,c)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Returns true if the given collection contains an element which represents a class which is the same as or is a sub type of the given class.
 * @param collection the collection to seach for a class that is assignablefrom amongst.
 * @param cls the class that is being searched against the given collection.
 * @return true if the given collection contains a Class which is the sameas or a subtype of the given class parameter. It returns false otherwise.
 */
public static boolean containsSub(final Class<?>[] collection,final Class<?> cls){
  for (  final Class<?> c : collection) {
    if (ClassUtils.isAssignable(c,cls)) {
      return true;
    }
  }
  return false;
}
Program: 180653
Project: 180653
Buggy source:
public static boolean containsSuper(final Class<?>[] collection,final Class<?> cls){
  for (  final Class<?> c : collection) {
    if (ClassUtils.isAssignable(c,cls)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean containsSuper(final Class<?>[] collection,final Class<?> cls){
  for (  final Class<?> c : collection) {
    if (ClassUtils.isAssignable(cls,c)) {
      return true;
    }
  }
  return false;
}
Program: 180654
Project: 180654
Buggy source:
/** 
 * Returns whichever class is the super class of the other, or null if neither are a super class of the other.
 * @return
 */
public static Class<?> getSuper(final boolean autobox,final Class<?>... classes){
  outer:   for (  final Class<?> cls1 : classes) {
    for (    final Class<?> cls2 : classes) {
      if (!ClassUtils.isAssignable(cls2,cls2,autobox)) {
        continue outer;
      }
    }
    return cls1;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns whichever class is the super class of the other, or null if neither are a super class of the other.
 * @return
 */
public static Class<?> getSuper(final boolean autobox,final Class<?>... classes){
  outer:   for (  final Class<?> cls1 : classes) {
    for (    final Class<?> cls2 : classes) {
      if (!ClassUtils.isAssignable(cls2,cls1,autobox)) {
        continue outer;
      }
    }
    return cls1;
  }
  return null;
}
Program: 180655
Project: 180655
Buggy source:
public static boolean allSub(final Class<?>[] collection,final Class<?> cls){
  for (  final Class<?> c : collection) {
    if (!ClassUtils.isAssignable(cls,c)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public static boolean allSub(final Class<?>[] collection,final Class<?> cls){
  for (  final Class<?> c : collection) {
    if (!ClassUtils.isAssignable(c,cls)) {
      return false;
    }
  }
  return true;
}
Program: 180656
Project: 180656
Buggy source:
public static boolean allSuper(final Class<?>[] collection,final Class<?> cls){
  for (  final Class<?> c : collection) {
    if (!ClassUtils.isAssignable(c,cls)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public static boolean allSuper(final Class<?>[] collection,final Class<?> cls){
  for (  final Class<?> c : collection) {
    if (!ClassUtils.isAssignable(cls,c)) {
      return false;
    }
  }
  return true;
}
Program: 180657
Project: 180657
Buggy source:
private Node getNodeTree(Class<?> requiredType,int currentDepth){
  List<Node> validNodes=getValidNodes(depth - currentDepth,requiredType);
  if (validNodes.isEmpty()) {
    throw new IllegalStateException("String_Node_Str");
  }
  final int randomIndex=rng.nextInt(validNodes.size());
  Node root=validNodes.get(randomIndex).newInstance();
  int arity=root.getArity();
  if (arity > 0) {
    Class<?>[][] argTypeSets=getPossibleArgTypes(arity,validDepthTypes[depth - currentDepth]);
    List<Class<?>[]> validArgTypeSets=new ArrayList<Class<?>[]>();
    for (    Class<?>[] argTypes : argTypeSets) {
      Class<?> type=root.getReturnType(argTypes);
      if (type != null && requiredType.isAssignableFrom(type)) {
        validArgTypeSets.add(argTypes);
      }
    }
    if (validArgTypeSets.isEmpty()) {
      throw new IllegalStateException("String_Node_Str");
    }
    Class<?>[] argTypes=validArgTypeSets.get(rng.nextInt(validArgTypeSets.size()));
    for (int i=0; i < arity; i++) {
      root.setChild(i,getNodeTree(argTypes[i],currentDepth + 1));
    }
  }
  return root;
}

Fixed version (ground truth):
private Node getNodeTree(Class<?> requiredType,int currentDepth){
  List<Node> validNodes=getValidNodes(depth - currentDepth,requiredType);
  if (validNodes.isEmpty()) {
    throw new IllegalStateException("String_Node_Str");
  }
  final int randomIndex=rng.nextInt(validNodes.size());
  Node root=validNodes.get(randomIndex).newInstance();
  int arity=root.getArity();
  if (arity > 0) {
    Class<?>[][] argTypeSets=getPossibleArgTypes(arity,validDepthTypes[depth - currentDepth - 1]);
    List<Class<?>[]> validArgTypeSets=new ArrayList<Class<?>[]>();
    for (    Class<?>[] argTypes : argTypeSets) {
      Class<?> type=root.getReturnType(argTypes);
      if (type != null && requiredType.isAssignableFrom(type)) {
        validArgTypeSets.add(argTypes);
      }
    }
    if (validArgTypeSets.isEmpty()) {
      throw new IllegalStateException("String_Node_Str");
    }
    Class<?>[] argTypes=validArgTypeSets.get(rng.nextInt(validArgTypeSets.size()));
    for (int i=0; i < arity; i++) {
      root.setChild(i,getNodeTree(argTypes[i],currentDepth + 1));
    }
  }
  return root;
}
Program: 180658
Project: 180658
Buggy source:
/** 
 * Builds a grown node tree with a maximum depth as given. The nodes that form the tree will be randomly selected from the nodes provided as the syntax attribute.
 * @param maxDepth The maximum depth of the node tree to be grown, wherethe depth is the number of nodes from the root.
 * @return The root node of a randomly generated node tree.
 */
public Node getGrownNodeTree(final int maxDepth){
  if (rng == null) {
    throw new IllegalStateException("String_Node_Str");
  }
 else   if (maxDepth < 0) {
    throw new IllegalStateException("String_Node_Str");
  }
 else   if (terminals.isEmpty()) {
    throw new IllegalStateException("String_Node_Str");
  }
  final int randomIndex=rng.nextInt(syntax.size());
  final Node root=syntax.get(randomIndex).clone();
  this.fillChildren(root,0,maxDepth);
  return root;
}

Fixed version (ground truth):
/** 
 * Builds a grown node tree with a maximum depth as given. The nodes that form the tree will be randomly selected from the nodes provided as the syntax attribute.
 * @param maxDepth The maximum depth of the node tree to be grown, wherethe depth is the number of nodes from the root.
 * @return The root node of a randomly generated node tree.
 */
public Node getGrownNodeTree(final int maxDepth){
  if (rng == null) {
    throw new IllegalStateException("String_Node_Str");
  }
 else   if (maxDepth < 0) {
    throw new IllegalStateException("String_Node_Str");
  }
 else   if (terminals.isEmpty()) {
    throw new IllegalStateException("String_Node_Str");
  }
  Node root;
  if (maxDepth == 0) {
    final int randomIndex=rng.nextInt(terminals.size());
    root=terminals.get(randomIndex).clone();
  }
 else {
    final int randomIndex=rng.nextInt(syntax.size());
    root=syntax.get(randomIndex).clone();
    this.fillChildren(root,0,maxDepth);
  }
  return root;
}
Program: 180659
Project: 180659
Buggy source:
public Node parse(final String source) throws MalformedProgramException {
  if (source == null) {
    return null;
  }
  final int openingBracket=source.indexOf('(');
  String identifier=null;
  List<String> args=null;
  if (openingBracket == -1) {
    identifier=source;
    args=new ArrayList<String>();
  }
 else {
    identifier=source.substring(0,openingBracket);
    final int closingBracket=source.lastIndexOf(')');
    final String argumentStr=source.substring(openingBracket + 1,closingBracket);
    args=splitArguments(argumentStr);
  }
  Node node=initialiseFunction(identifier);
  if (node == null) {
    node=parseTerminal(identifier);
  }
  if ((node == null) || (node.getArity() != args.size())) {
    throw new MalformedProgramException();
  }
 else {
    for (int i=0; i < args.size(); i++) {
      node.setChild(i,parse(args.get(i)));
    }
  }
  return node;
}

Fixed version (ground truth):
public Node parse(final String source) throws MalformedProgramException {
  if (source == null) {
    return null;
  }
  final int openingBracket=source.indexOf('(');
  String identifier=null;
  List<String> args=null;
  boolean terminal=false;
  if (openingBracket == -1) {
    identifier=source;
    args=new ArrayList<String>();
    terminal=true;
  }
 else {
    identifier=source.substring(0,openingBracket);
    final int closingBracket=source.lastIndexOf(')');
    final String argumentStr=source.substring(openingBracket + 1,closingBracket);
    args=splitArguments(argumentStr);
  }
  Node node;
  if (terminal) {
    node=parseTerminal(identifier);
  }
 else {
    node=initialiseFunction(identifier);
  }
  if ((node == null) || (node.getArity() != args.size())) {
    throw new MalformedProgramException();
  }
 else {
    for (int i=0; i < args.size(); i++) {
      node.setChild(i,parse(args.get(i)));
    }
  }
  return node;
}
Program: 180660
Project: 180660
Buggy source:
/** 
 * Compare an object for equality. If the given object is a Node then it may be equal if each Node in the tree is equal. Equality of individual Nodes is dependant on the specific node type but typically will be whether they are the same type and have the same children for function nodes and whether they have the same value or are the same variable for terminal nodes.
 * @param obj an object to be compared for equivalence.
 * @return true if this node tree is the same as the obj argument;false otherwise.
 */
@Override public boolean equals(final Object obj){
  boolean equal=true;
  if (obj instanceof Node) {
    final Node n=(Node)obj;
    if (n.getArity() != this.getArity()) {
      equal=false;
    }
 else     if (n.getIdentifier() != this.getIdentifier()) {
      equal=false;
    }
 else {
      for (int i=0; (i < n.getArity()) && equal; i++) {
        final Node thatChild=n.getChild(i);
        final Node thisChild=this.getChild(i);
        if ((thisChild != null) ^ (thatChild != null)) {
          equal=false;
        }
 else {
          equal=(((thisChild == null) && (thatChild == null)) || thisChild.equals(thatChild));
        }
      }
    }
  }
 else {
    equal=false;
  }
  return equal;
}

Fixed version (ground truth):
/** 
 * Compare an object for equality. If the given object is a Node then it may be equal if each Node in the tree is equal. Equality of individual Nodes is dependant on the specific node type but typically will be whether they are the same type and have the same children for function nodes and whether they have the same value or are the same variable for terminal nodes.
 * @param obj an object to be compared for equivalence.
 * @return true if this node tree is the same as the obj argument;false otherwise.
 */
@Override public boolean equals(final Object obj){
  boolean equal=true;
  if (obj instanceof Node) {
    final Node n=(Node)obj;
    if (n.getArity() != this.getArity()) {
      equal=false;
    }
 else     if (!this.getIdentifier().equals(n.getIdentifier())) {
      equal=false;
    }
 else {
      for (int i=0; (i < n.getArity()) && equal; i++) {
        final Node thatChild=n.getChild(i);
        final Node thisChild=this.getChild(i);
        if ((thisChild != null) ^ (thatChild != null)) {
          equal=false;
        }
 else {
          equal=(((thisChild == null) && (thatChild == null)) || thisChild.equals(thatChild));
        }
      }
    }
  }
 else {
    equal=false;
  }
  return equal;
}
Program: 180661
Project: 180661
Buggy source:
/** 
 * Tests that the eval method can handle multiple simple expressions.
 */
public void testMultiEval() throws MalformedProgramException {
  final Interpreter interpreter=new EpoxInterpreter();
  String expression="String_Node_Str";
  String[] args={"String_Node_Str","String_Node_Str"};
  Object[][] values={{true,3},{false,4}};
  Object[] result=interpreter.eval(expression,args,values);
  assertEquals("String_Node_Str",true,result[0]);
  assertEquals("String_Node_Str",false,result[1]);
  expression="String_Node_Str";
  args=new String[]{"String_Node_Str"};
  values=new Object[][]{{1.0},{2.0}};
  result=interpreter.eval(expression,args,values);
  assertEquals("String_Node_Str",3.0,result[0]);
  assertEquals("String_Node_Str",6.0,result[1]);
}

Fixed version (ground truth):
/** 
 * Tests that the eval method can handle multiple simple expressions.
 */
public void testMultiEval() throws MalformedProgramException {
  final Interpreter interpreter=new EpoxInterpreter();
  String expression="String_Node_Str";
  String[] args={"String_Node_Str","String_Node_Str"};
  Object[][] values={{true,3.0},{false,4.0}};
  Object[] result=interpreter.eval(expression,args,values);
  assertEquals("String_Node_Str",true,result[0]);
  assertEquals("String_Node_Str",false,result[1]);
  expression="String_Node_Str";
  args=new String[]{"String_Node_Str"};
  values=new Object[][]{{1.0},{2.0}};
  result=interpreter.eval(expression,args,values);
  assertEquals("String_Node_Str",3.0,result[0]);
  assertEquals("String_Node_Str",6.0,result[1]);
}
Program: 180662
Project: 180662
Buggy source:
/** 
 * Evaluating a <code>ModuloFunction</code> involves dividing the evaluated first child, by the second child with the result being the remainder.
 */
@Override public Double evaluate(){
  final double c1=((Double)getChild(0).evaluate()).doubleValue();
  final double c2=((Double)getChild(1).evaluate()).doubleValue();
  return c1 % c2;
}

Fixed version (ground truth):
/** 
 * Evaluating a <code>ModuloFunction</code> involves dividing the evaluated first child, by the second child with the result being the remainder. If the second child evaluates to <code>0</code>, then the result will be  whatever the first child evaluated to.
 */
@Override public Double evaluate(){
  final double c1=((Double)getChild(0).evaluate()).doubleValue();
  final double c2=((Double)getChild(1).evaluate()).doubleValue();
  if (c2 == 0) {
    return c1;
  }
 else {
    return c1 % c2;
  }
}
Program: 180663
Project: 180663
Buggy source:
/** 
 * The actual function we are trying to evolve.
 */
@Override public double getCorrectResult(final double x){
  return x + x * x + x * x * x;
}

Fixed version (ground truth):
/** 
 * The actual function we are trying to evolve.
 */
@Override public double getCorrectResult(final double x){
  return x + x * x + x * x * x + x * x * x* x;
}
Program: 180664
Project: 180664
Buggy source:
/** 
 * The actual function we are trying to evolve.
 */
@Override public double getCorrectResult(final double x){
  return x + x * x + x * x * x;
}

Fixed version (ground truth):
/** 
 * The actual function we are trying to evolve.
 */
@Override public double getCorrectResult(final double x){
  return x + x * x + x * x * x + x * x * x* x;
}
Program: 180665
Project: 180665
Buggy source:
/** 
 * The actual function we are trying to evolve.
 */
@Override public double getCorrectResult(final double x){
  return x + x * x + x * x * x;
}

Fixed version (ground truth):
/** 
 * The actual function we are trying to evolve.
 */
@Override public double getCorrectResult(final double x){
  return x + x * x + x * x * x + x * x * x* x;
}