Program: 61617
Project: 61617
Buggy source:
/** 
 * Process a generation i: loops over all instances
 * @param generation
 * @return
 * @throws Exception
 */
public boolean processGenerations(int generation) throws Exception {
  log.info("String_Node_Str" + generation);
  boolean foundSolution=false;
  List<ProgramVariant> temporalInstances=new ArrayList<ProgramVariant>();
  currentStat.numberGenerations++;
  for (  ProgramVariant parentVariant : variants) {
    log.debug("String_Node_Str" + parentVariant);
    ProgramVariant newVariant=createNewProgramVariant(parentVariant,generation);
    if (newVariant == null) {
      continue;
    }
    processCreatedVariant(newVariant,generation);
    if (newVariant.getCompilation().compiles()) {
      temporalInstances.add(newVariant);
      foundSolution|=newVariant.isSolution();
    }
    reverseOperationInModel(newVariant,generation);
    if (foundSolution && ConfigurationProperties.getPropertyBool("String_Node_Str")) {
      break;
    }
  }
  variants=populationControler.selectProgramVariantsForNextGeneration(variants,temporalInstances,this.solutions,ConfigurationProperties.getPropertyInt("String_Node_Str"));
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    ProgramVariant parentNew=this.variantFactory.createProgramVariantFromAnother(originalVariant,generation);
    parentNew.getOperations().clear();
    parentNew.setParent(null);
    if (variants.size() != 0) {
      variants.remove(variants.size() - 1);
    }
    variants.add(parentNew);
  }
  return foundSolution;
}

Fixed version (ground truth):
/** 
 * Process a generation i: loops over all instances
 * @param generation
 * @return
 * @throws Exception
 */
public boolean processGenerations(int generation) throws Exception {
  log.info("String_Node_Str" + generation);
  boolean foundSolution=false;
  List<ProgramVariant> temporalInstances=new ArrayList<ProgramVariant>();
  currentStat.numberGenerations++;
  for (  ProgramVariant parentVariant : variants) {
    log.debug("String_Node_Str" + parentVariant);
    this.saveOriginalVariant(parentVariant);
    ProgramVariant newVariant=createNewProgramVariant(parentVariant,generation);
    this.saveModifVariant(parentVariant);
    if (newVariant == null) {
      continue;
    }
    processCreatedVariant(newVariant,generation);
    if (newVariant.getCompilation().compiles()) {
      temporalInstances.add(newVariant);
      foundSolution|=newVariant.isSolution();
    }
    reverseOperationInModel(newVariant,generation);
    this.validateReversedOriginalVariant(newVariant);
    if (foundSolution && ConfigurationProperties.getPropertyBool("String_Node_Str")) {
      break;
    }
  }
  variants=populationControler.selectProgramVariantsForNextGeneration(variants,temporalInstances,this.solutions,ConfigurationProperties.getPropertyInt("String_Node_Str"));
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    ProgramVariant parentNew=this.variantFactory.createProgramVariantFromAnother(originalVariant,generation);
    parentNew.getOperations().clear();
    parentNew.setParent(null);
    if (variants.size() != 0) {
      variants.remove(variants.size() - 1);
    }
    variants.add(parentNew);
  }
  return foundSolution;
}