nus-yam/ex-repair huggingface dataset:
Program: 61450
Project: 61450
Buggy source:
/** 
 * Load extensions point that are used for all approaches. For the moment it loads only the "patch priorization point""
 * @throws Exception
 */
private boolean loadCommonExtensionPoints(AstorCoreEngine astorCore){
  String patchpriority=ConfigurationProperties.getProperty("String_Node_Str");
  if (patchpriority != null && !patchpriority.trim().isEmpty()) {
    SolutionVariantSortCriterion priorizStrategy=null;
    try {
      priorizStrategy=(SolutionVariantSortCriterion)PlugInLoader.loadPlugin(ExtensionPoints.SOLUTION_SORT_CRITERION);
      astorCore.setPatchSortCriterion(priorizStrategy);
      return true;
    }
 catch (    Exception e) {
      log.error(e);
    }
  }
  List<ReportResults> outputs=new ArrayList<>();
  astorCore.setOutputResults(outputs);
  String outputproperty=ConfigurationProperties.getProperty("String_Node_Str");
  if (outputproperty != null && !outputproperty.trim().isEmpty()) {
    String[] outprocess=outputproperty.split("String_Node_Str");
    try {
      for (      String outp : outprocess) {
        ReportResults outputresult=(ReportResults)PlugInLoader.loadPlugin(outp,ExtensionPoints.OUTPUT_RESULTS._class);
        outputs.add(outputresult);
      }
      return true;
    }
 catch (    Exception e) {
      log.error(e);
    }
  }
 else {
    outputs.add(new StandardOutputReport());
    outputs.add(new PatchJSONStandarOutput());
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Load extensions point that are used for all approaches. For the moment it loads only the "patch priorization point""
 * @throws Exception
 */
private boolean loadCommonExtensionPoints(AstorCoreEngine astorCore){
  String patchpriority=ConfigurationProperties.getProperty("String_Node_Str");
  if (patchpriority != null && !patchpriority.trim().isEmpty()) {
    SolutionVariantSortCriterion priorizStrategy=null;
    try {
      priorizStrategy=(SolutionVariantSortCriterion)PlugInLoader.loadPlugin(ExtensionPoints.SOLUTION_SORT_CRITERION);
      astorCore.setPatchSortCriterion(priorizStrategy);
    }
 catch (    Exception e) {
      log.error(e);
    }
  }
  List<ReportResults> outputs=new ArrayList<>();
  astorCore.setOutputResults(outputs);
  String outputproperty=ConfigurationProperties.getProperty("String_Node_Str");
  if (outputproperty != null && !outputproperty.trim().isEmpty()) {
    String[] outprocess=outputproperty.split("String_Node_Str");
    try {
      for (      String outp : outprocess) {
        ReportResults outputresult=(ReportResults)PlugInLoader.loadPlugin(outp,ExtensionPoints.OUTPUT_RESULTS._class);
        outputs.add(outputresult);
      }
    }
 catch (    Exception e) {
      log.error(e);
    }
  }
 else {
    outputs.add(new StandardOutputReport());
    outputs.add(new PatchJSONStandarOutput());
  }
  return true;
}
Program: 61452
Project: 61452
Buggy source:
public boolean copyOriginalBin(String inDirs,String mutatorIdentifier) throws IOException {
  boolean copied=false;
  for (  String inDir : inDirs.split(File.pathSeparator)) {
    if (inDir != null) {
      File original=new File(inDir);
      File dest=new File(getOutDirWithPrefix(mutatorIdentifier));
      dest.mkdirs();
      FileUtils.copyDirectory(original,dest);
      copied=true;
    }
  }
  return copied;
}

Fixed version (ground truth):
public boolean copyOriginalBin(String inDirs,String mutatorIdentifier) throws IOException {
  if (inDirs == null) {
    logger.debug("String_Node_Str");
    return false;
  }
  boolean copied=false;
  for (  String inDir : inDirs.split(File.pathSeparator)) {
    if (inDir != null) {
      File original=new File(inDir);
      File dest=new File(getOutDirWithPrefix(mutatorIdentifier));
      dest.mkdirs();
      FileUtils.copyDirectory(original,dest);
      copied=true;
    }
  }
  return copied;
}
Program: 61454
Project: 61454
Buggy source:
private void addToFolder(List<String> path,String[] possibleTestSrcFolders,boolean onlyOne){
  for (  String possibleSrc : possibleTestSrcFolders) {
    File fSrc=new File(possibleSrc);
    if (fSrc.exists()) {
      path.add(possibleSrc);
      if (onlyOne)       break;
    }
  }
}

Fixed version (ground truth):
private void addToFolder(List<String> pathResults,String[] possibleTestSrcFolders,String originalProjectRoot,boolean onlyOne) throws IOException {
  boolean added=false;
  for (  String possibleSrc : possibleTestSrcFolders) {
    File fSrc=new File(File.separator + possibleSrc).getAbsoluteFile();
    if (Files.exists(fSrc.toPath())) {
      if (!pathResults.contains(fSrc.getAbsolutePath())) {
        pathResults.add(fSrc.getAbsolutePath());
        added=true;
      }
    }
 else {
      File fSrcRelative=new File(originalProjectRoot + File.separator + possibleSrc);
      if (Files.isDirectory(fSrcRelative.toPath())) {
        if (!pathResults.contains(fSrcRelative.getAbsolutePath())) {
          pathResults.add(fSrcRelative.getAbsolutePath());
          added=true;
        }
      }
    }
    if (onlyOne && added)     break;
  }
}
Program: 61455
Project: 61455
Buggy source:
private List<String> determineSourceFolders(boolean srcWithMain,String originalProjectRoot){
  final boolean onlyOneFolder=true;
  List<String> sourceFolders=new ArrayList<>();
  String paramSrc=ConfigurationProperties.getProperty("String_Node_Str");
  String paramTestSrc=ConfigurationProperties.getProperty("String_Node_Str");
  String[] srcs=paramSrc.split(File.pathSeparator);
  addToFolder(sourceFolders,srcs,!onlyOneFolder);
  String[] possibleSrcFolders=new String[]{(originalProjectRoot + File.separator + "String_Node_Str"),(originalProjectRoot + File.separator + "String_Node_Str"),(originalProjectRoot + File.separator + "String_Node_Str")};
  addToFolder(sourceFolders,possibleSrcFolders,onlyOneFolder);
  String[] srcTs=paramTestSrc.split(File.pathSeparator);
  addToFolder(sourceFolders,srcTs,!onlyOneFolder);
  String[] possibleTestSrcFolders=new String[]{(originalProjectRoot + File.separator + "String_Node_Str"),(originalProjectRoot + File.separator + "String_Node_Str"),(originalProjectRoot + File.separator + "String_Node_Str")};
  addToFolder(sourceFolders,possibleTestSrcFolders,onlyOneFolder);
  return sourceFolders;
}

Fixed version (ground truth):
private List<String> determineSourceFolders(boolean srcWithMain,String originalProjectRoot) throws IOException {
  final boolean onlyOneFolder=true;
  List<String> sourceFolders=new ArrayList<>();
  String paramSrc=ConfigurationProperties.getProperty("String_Node_Str");
  String paramTestSrc=ConfigurationProperties.getProperty("String_Node_Str");
  String[] srcs=paramSrc.split(File.pathSeparator);
  addToFolder(sourceFolders,srcs,originalProjectRoot,!onlyOneFolder);
  String[] possibleSrcFolders=new String[]{(originalProjectRoot + File.separator + "String_Node_Str"),(originalProjectRoot + File.separator + "String_Node_Str"),(originalProjectRoot + File.separator + "String_Node_Str")};
  addToFolder(sourceFolders,possibleSrcFolders,originalProjectRoot,onlyOneFolder);
  String[] srcTs=paramTestSrc.split(File.pathSeparator);
  addToFolder(sourceFolders,srcTs,originalProjectRoot,!onlyOneFolder);
  String[] possibleTestSrcFolders=new String[]{(originalProjectRoot + File.separator + "String_Node_Str"),(originalProjectRoot + File.separator + "String_Node_Str"),(originalProjectRoot + File.separator + "String_Node_Str")};
  addToFolder(sourceFolders,possibleTestSrcFolders,originalProjectRoot,onlyOneFolder);
  return sourceFolders;
}
Program: 61457
Project: 61457
Buggy source:
private String getDependencies(File projectLocation,File dirLibs){
  String dep="String_Node_Str";
  System.out.println(dirLibs);
  for (  File depend : dirLibs.listFiles()) {
    if (!depend.isDirectory())     log.debug(depend.getName());
    dep+=depend.getAbsolutePath() + File.pathSeparator;
  }
  dep+=projectLocation.getAbsolutePath() + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator;
  dep+=File.pathSeparator + projectLocation.getAbsolutePath() + File.separator+ "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator;
  dep+=File.pathSeparator + projectLocation.getAbsolutePath() + File.separator+ "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator+ "String_Node_Str";
  log.debug("String_Node_Str" + dep);
  return dep;
}

Fixed version (ground truth):
public static String getDependencies(File projectLocation,File dirLibs){
  String dep="String_Node_Str";
  System.out.println(dirLibs);
  for (  File depend : dirLibs.listFiles()) {
    if (!depend.isDirectory())     log.debug(depend.getName());
    dep+=depend.getAbsolutePath() + File.pathSeparator;
  }
  dep+=projectLocation.getAbsolutePath() + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator;
  dep+=File.pathSeparator + projectLocation.getAbsolutePath() + File.separator+ "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator;
  dep+=File.pathSeparator + projectLocation.getAbsolutePath() + File.separator+ "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator+ "String_Node_Str";
  log.debug("String_Node_Str" + dep);
  return dep;
}
Program: 61458
Project: 61458
Buggy source:
public void setupLogging(){
  String patternLayout="String_Node_Str";
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    patternLayout="String_Node_Str";
  }
 else {
    patternLayout=ConfigurationProperties.getProperty("String_Node_Str");
  }
  Logger.getRootLogger().getLoggerRepository().resetConfiguration();
  ConsoleAppender console=new ConsoleAppender();
  console.setLayout(new PatternLayout(patternLayout));
  console.activateOptions();
  Logger.getRootLogger().addAppender(console);
  String loglevelSelected=ConfigurationProperties.properties.getProperty("String_Node_Str");
  if (loglevelSelected != null)   LogManager.getRootLogger().setLevel(Level.toLevel(loglevelSelected));
  if (ConfigurationProperties.hasProperty("String_Node_Str")) {
    FileAppender fa=new FileAppender();
    String filePath=ConfigurationProperties.getProperty("String_Node_Str");
    File fileLog=new File(filePath);
    fileLog.mkdirs();
    fa.setName("String_Node_Str");
    fa.setFile(fileLog.getAbsolutePath());
    fa.setLayout(new PatternLayout(patternLayout));
    fa.setThreshold(LogManager.getRootLogger().getLevel());
    fa.setAppend(true);
    fa.activateOptions();
    Logger.getRootLogger().addAppender(fa);
    this.log.info("String_Node_Str" + filePath);
  }
}

Fixed version (ground truth):
public void setupLogging() throws IOException {
  String patternLayout="String_Node_Str";
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    patternLayout="String_Node_Str";
  }
 else {
    patternLayout=ConfigurationProperties.getProperty("String_Node_Str");
  }
  Logger.getRootLogger().getLoggerRepository().resetConfiguration();
  ConsoleAppender console=new ConsoleAppender();
  console.setLayout(new PatternLayout(patternLayout));
  console.activateOptions();
  Logger.getRootLogger().addAppender(console);
  String loglevelSelected=ConfigurationProperties.properties.getProperty("String_Node_Str");
  if (loglevelSelected != null)   LogManager.getRootLogger().setLevel(Level.toLevel(loglevelSelected));
  if (ConfigurationProperties.hasProperty("String_Node_Str")) {
    FileAppender fa=new FileAppender();
    String filePath=ConfigurationProperties.getProperty("String_Node_Str");
    File fileLog=new File(filePath);
    if (!fileLog.exists()) {
      fileLog.getParentFile().mkdirs();
      fileLog.createNewFile();
    }
    fa.setName("String_Node_Str");
    fa.setFile(fileLog.getAbsolutePath());
    fa.setLayout(new PatternLayout(patternLayout));
    fa.setThreshold(LogManager.getRootLogger().getLevel());
    fa.setAppend(true);
    fa.activateOptions();
    Logger.getRootLogger().addAppender(fa);
    this.log.info("String_Node_Str" + filePath);
  }
}
Program: 61460
Project: 61460
Buggy source:
public static Stats createStat(){
  if (currentStat == null) {
    currentStat=new Stats();
  }
  return currentStat;
}

Fixed version (ground truth):
public static Stats createStat(){
  currentStat=new Stats();
  return currentStat;
}
Program: 61461
Project: 61461
Buggy source:
public List<CtCodeElement> getNotExhaustedBaseElements(ModificationPoint modificationPoint,AstorOperator operationType){
  String type=null;
  if (operationType instanceof ReplaceOp) {
    type=modificationPoint.getCodeElement().getClass().getSimpleName();
  }
  List<CtCodeElement> elements=null;
  if (type == null) {
    elements=this.ingredientSpace.getIngredients(modificationPoint.getCodeElement());
  }
 else {
    elements=this.ingredientSpace.getIngredients(modificationPoint.getCodeElement(),type);
  }
  List<CtCodeElement> uniques=new ArrayList<>(elements);
  String key=getKey(modificationPoint,operationType);
  List<CtElement> exhaustives=this.exhaustTemplates.get(key);
  if (exhaustives != null) {
    boolean removed=uniques.removeAll(exhaustives);
  }
  return uniques;
}

Fixed version (ground truth):
public List<CtCodeElement> getNotExhaustedBaseElements(ModificationPoint modificationPoint,AstorOperator operationType){
  String type=null;
  if (operationType instanceof ReplaceOp) {
    type=modificationPoint.getCodeElement().getClass().getSimpleName();
  }
  List<CtCodeElement> elements=null;
  if (type == null) {
    elements=this.ingredientSpace.getIngredients(modificationPoint.getCodeElement());
  }
 else {
    elements=this.ingredientSpace.getIngredients(modificationPoint.getCodeElement(),type);
  }
  if (elements == null)   return null;
  List<CtCodeElement> uniques=new ArrayList<>(elements);
  String key=getKey(modificationPoint,operationType);
  List<CtElement> exhaustives=this.exhaustTemplates.get(key);
  if (exhaustives != null) {
    boolean removed=uniques.removeAll(exhaustives);
  }
  return uniques;
}
Program: 61463
Project: 61463
Buggy source:
@Override public List<CtCodeElement> getNotExhaustedBaseElements(ModificationPoint modificationPoint,AstorOperator operationType){
  List<CtCodeElement> elements=super.getNotExhaustedBaseElements(modificationPoint,operationType);
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    log.debug("String_Node_Str" + modificationPoint);
    ExpressionTypeIngredientSpace space=(ExpressionTypeIngredientSpace)this.getIngredientSpace();
    elements2String=new ArrayList<>();
    for (    CtCodeElement cm : elements) {
      elements2String.add(cm.toString());
    }
    MapList mp=new MapList<>();
    mp.putAll(space.linkTemplateElements);
    mp.keySet().removeIf(e -> !elements2String.contains(e));
    probs=mp.getProb();
  }
  return elements;
}

Fixed version (ground truth):
@Override public List<CtCodeElement> getNotExhaustedBaseElements(ModificationPoint modificationPoint,AstorOperator operationType){
  List<CtCodeElement> elements=super.getNotExhaustedBaseElements(modificationPoint,operationType);
  if (elements == null) {
    return null;
  }
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    log.debug("String_Node_Str" + modificationPoint);
    ExpressionTypeIngredientSpace space=(ExpressionTypeIngredientSpace)this.getIngredientSpace();
    elements2String=new ArrayList<>();
    for (    CtCodeElement cm : elements) {
      elements2String.add(cm.toString());
    }
    MapList mp=new MapList<>();
    mp.putAll(space.linkTemplateElements);
    mp.keySet().removeIf(e -> !elements2String.contains(e));
    probs=mp.getProb();
  }
  return elements;
}
Program: 61464
Project: 61464
Buggy source:
@Override public int compare(CtVariable v1,CtVariable v2){
  String s1=v1.getSimpleName();
  String s2=v2.getSimpleName();
  Double p1=(Double)manager.getNgglobal().ngrams[1].getProbabilies().get(s1);
  Double p2=(Double)manager.getNgglobal().ngrams[1].getProbabilies().get(s2);
  if (p1 == null) {
    logger.error("String_Node_Str" + s1);
    return 1;
  }
  if (p2 == null) {
    logger.error("String_Node_Str" + s2);
    return -1;
  }
  return Double.compare(p2,p1);
}

Fixed version (ground truth):
@Override public int compare(CtVariable v1,CtVariable v2){
  String s1=v1.getSimpleName();
  String s2=v2.getSimpleName();
  Double p1=(Double)manager.getNgglobal().ngrams[1].getProbabilies().get(s1);
  Double p2=(Double)manager.getNgglobal().ngrams[1].getProbabilies().get(s2);
  if (p1 == null && p2 == null) {
    return 0;
  }
  if (p1 == null) {
    logger.error("String_Node_Str" + s1);
    return 1;
  }
  if (p2 == null) {
    logger.error("String_Node_Str" + s2);
    return -1;
  }
  return Double.compare(p2,p1);
}
Program: 61466
Project: 61466
Buggy source:
@Override public int compare(CtVariable v1,CtVariable v2){
  String s1=v1.getSimpleName();
  String s2=v2.getSimpleName();
  Double p1=(Double)manager.getNgglobal().ngrams[1].getProbabilies().get(s1);
  Double p2=(Double)manager.getNgglobal().ngrams[1].getProbabilies().get(s2);
  return Double.compare(p2,p1);
}

Fixed version (ground truth):
@Override public int compare(CtVariable v1,CtVariable v2){
  String s1=v1.getSimpleName();
  String s2=v2.getSimpleName();
  Double p1=(Double)manager.getNgglobal().ngrams[1].getProbabilies().get(s1);
  Double p2=(Double)manager.getNgglobal().ngrams[1].getProbabilies().get(s2);
  if (p1 == null) {
    logger.error("String_Node_Str" + s1);
    return 1;
  }
  if (p2 == null) {
    logger.error("String_Node_Str" + s2);
    return -1;
  }
  return Double.compare(p2,p1);
}
Program: 61471
Project: 61471
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public Ingredient getFixIngredient(ModificationPoint modificationPoint,AstorOperator operationType){
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    ExpressionTypeIngredientSpace space=(ExpressionTypeIngredientSpace)this.getIngredientSpace();
    List<CtCodeElement> elements=space.getIngredients(modificationPoint.getCodeElement());
    List<String> elements2String=new ArrayList<>();
    for (    CtCodeElement cm : elements) {
      elements2String.add(cm.toString());
    }
    MapList mp=new MapList<>();
    mp.putAll(space.linkTemplateElements);
    mp.keySet().removeIf(e -> !elements2String.contains(e));
    LinkedHashMap<String,Double> probs=mp.getProb();
    Double randomElement=RandomManager.nextDouble();
    for (    String template : probs.keySet()) {
      double probTemplate=probs.get(template);
      if (randomElement <= probTemplate) {
        int index=elements2String.indexOf(template);
        CtCodeElement templateElement=elements.get(index);
        return new Ingredient(templateElement);
      }
    }
  }
 else {
    return super.getFixIngredient(modificationPoint,operationType);
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public Ingredient getFixIngredient(ModificationPoint modificationPoint,AstorOperator operationType){
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    ExpressionTypeIngredientSpace space=(ExpressionTypeIngredientSpace)this.getIngredientSpace();
    List<CtCodeElement> elements=space.getIngredients(modificationPoint.getCodeElement());
    List<String> elements2String=new ArrayList<>();
    for (    CtCodeElement cm : elements) {
      elements2String.add(cm.toString());
    }
    MapList mp=new MapList<>();
    mp.putAll(space.linkTemplateElements);
    mp.keySet().removeIf(e -> !elements2String.contains(e));
    LinkedHashMap<String,Double> probs=mp.getProb();
    Double randomElement=RandomManager.nextDouble();
    for (    String template : probs.keySet()) {
      double probTemplate=probs.get(template);
      if (randomElement <= probTemplate) {
        int index=elements2String.indexOf(template);
        CtCodeElement templateElement=elements.get(index);
        Ingredient refinedIngredient=getNotUsedTransformedElement(modificationPoint,operationType,new Ingredient(templateElement));
        return refinedIngredient;
      }
    }
  }
 else {
    return super.getFixIngredient(modificationPoint,operationType);
  }
  return null;
}
Program: 61473
Project: 61473
Buggy source:
public static List<CtVariableAccess> collectStaticVariableAccess(CtElement rootElement,List<CtVariableAccess> varAccessCollected){
  List<CtVariableAccess> statics=new ArrayList<>();
  for (  CtVariableAccess ctVariableAccess : varAccessCollected) {
    CtVariableReference varref=ctVariableAccess.getVariable();
    if (!(varref instanceof CtFieldReference)) {
      continue;
    }
    CtVariable var=varref.getDeclaration();
    if (var == null || var.getModifiers().contains(ModifierKind.STATIC)) {
      statics.add(ctVariableAccess);
    }
  }
  return statics;
}

Fixed version (ground truth):
public static List<CtVariableAccess> collectStaticVariableAccess(CtElement rootElement,List<CtVariableAccess> varAccessCollected){
  List<CtVariableAccess> statics=new ArrayList<>();
  for (  CtVariableAccess ctVariableAccess : varAccessCollected) {
    CtVariableReference varref=ctVariableAccess.getVariable();
    if (isStatic(varref)) {
      statics.add(ctVariableAccess);
    }
  }
  return statics;
}
Program: 61474
Project: 61474
Buggy source:
private static void addVarMappingAsResult(Map<VarAccessWrapper,List<CtVariable>> varMaps,VarAccessWrapper varOutWrapper,CtVariable varInContext){
  List<CtVariable> vars=varMaps.get(varOutWrapper);
  if (vars == null) {
    vars=new ArrayList<>();
    varMaps.put(varOutWrapper,vars);
  }
  vars.add(varInContext);
}

Fixed version (ground truth):
private static void addVarMappingAsResult(Map<VarAccessWrapper,List<CtVariable>> varMaps,VarAccessWrapper varOutWrapper,CtVariable varInContext){
  List<CtVariable> vars=varMaps.get(varOutWrapper);
  if (vars == null) {
    vars=new ArrayList<>();
    varMaps.put(varOutWrapper,vars);
  }
  if (!vars.stream().filter(e -> e.getSimpleName().equals(varInContext.getSimpleName())).findAny().isPresent())   vars.add(varInContext);
}
Program: 61476
Project: 61476
Buggy source:
public void setupLogging(){
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    Logger.getRootLogger().getLoggerRepository().resetConfiguration();
    ConsoleAppender console=new ConsoleAppender();
    String PATTERN="String_Node_Str";
    console.setLayout(new PatternLayout(PATTERN));
    console.activateOptions();
    Logger.getRootLogger().addAppender(console);
    String loglevelSelected=ConfigurationProperties.properties.getProperty("String_Node_Str");
    LogManager.getRootLogger().setLevel(Level.toLevel(loglevelSelected));
  }
}

Fixed version (ground truth):
public void setupLogging(){
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    Logger.getRootLogger().getLoggerRepository().resetConfiguration();
    ConsoleAppender console=new ConsoleAppender();
    String PATTERN="String_Node_Str";
    console.setLayout(new PatternLayout(PATTERN));
    console.activateOptions();
    Logger.getRootLogger().addAppender(console);
    String loglevelSelected=ConfigurationProperties.properties.getProperty("String_Node_Str");
    if (loglevelSelected != null)     LogManager.getRootLogger().setLevel(Level.toLevel(loglevelSelected));
  }
}
Program: 61477
Project: 61477
Buggy source:
public String toString(){
  return "String_Node_Str" + this.getOperationApplied() + "String_Node_Str"+ this.original.getClass().getCanonicalName()+ "String_Node_Str"+ StringUtil.trunc(this.original)+ "String_Node_Str"+ StringUtil.trunc(modified)+ "String_Node_Str"+ ((this.modified != null) ? this.modified.getClass().getCanonicalName() : "String_Node_Str")+ "String_Node_Str"+ this.original.getPosition().getLine()+ "String_Node_Str"+ this.original.getPosition().getFile().getAbsolutePath();
}

Fixed version (ground truth):
public String toString(){
  String repst="String_Node_Str";
  repst+=this.getOperationApplied() + "String_Node_Str" + this.original.getClass().getCanonicalName()+ "String_Node_Str"+ StringUtil.trunc(this.original)+ "String_Node_Str"+ StringUtil.trunc(modified);
  repst+="String_Node_Str" + ((this.modified != null) ? this.modified.getClass().getCanonicalName() : "String_Node_Str") + "String_Node_Str";
  if (this.original.getPosition() != null && this.original.getPosition().getFile() != null) {
    repst+="String_Node_Str" + this.original.getPosition().getLine() + "String_Node_Str"+ this.original.getPosition().getFile().getAbsolutePath();
  }
  return repst;
}
Program: 61480
Project: 61480
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public Ingredient getFixIngredient(ModificationPoint modificationPoint,AstorOperator operationType){
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    ExpressionTypeIngredientSpace space=(ExpressionTypeIngredientSpace)this.getIngredientSpace();
    List<CtCodeElement> elements=space.getIngredients(modificationPoint.getCodeElement());
    List<String> elements2String=new ArrayList<>();
    for (    CtCodeElement cm : elements) {
      elements2String.add(cm.toString());
    }
    MapList mp=new MapList<>();
    mp.putAll(space.linkTemplateElements);
    mp.keySet().removeIf(e -> !elements2String.contains(e));
    LinkedHashMap<String,Double> probs=mp.getProb();
    Double randomElement=RandomManager.nextDouble();
    for (    String template : probs.keySet()) {
      double probTemplate=probs.get(template);
      if (randomElement <= probTemplate) {
        int index=elements2String.indexOf(template);
        CtCodeElement templateElement=elements.get(index);
        Ingredient refinedIngredient=getNotUsedTransformedElement(modificationPoint,operationType,new Ingredient(templateElement));
        return refinedIngredient;
      }
    }
  }
 else {
    return super.getFixIngredient(modificationPoint,operationType);
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) @Override public Ingredient getFixIngredient(ModificationPoint modificationPoint,AstorOperator operationType){
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    ExpressionTypeIngredientSpace space=(ExpressionTypeIngredientSpace)this.getIngredientSpace();
    List<CtCodeElement> elements=space.getIngredients(modificationPoint.getCodeElement());
    log.debug("String_Node_Str" + modificationPoint.getCodeElement() + "String_Node_Str"+ elements.size()+ "String_Node_Str"+ elements);
    Stats.currentStat.addSize(Stats.currentStat.ingredientSpaceSize,elements.size());
    List<String> elements2String=new ArrayList<>();
    for (    CtCodeElement cm : elements) {
      elements2String.add(cm.toString());
    }
    MapList mp=new MapList<>();
    mp.putAll(space.linkTemplateElements);
    mp.keySet().removeIf(e -> !elements2String.contains(e));
    LinkedHashMap<String,Double> probs=mp.getProb();
    Double randomElement=RandomManager.nextDouble();
    for (    String template : probs.keySet()) {
      double probTemplate=probs.get(template);
      if (randomElement <= probTemplate) {
        int index=elements2String.indexOf(template);
        CtCodeElement templateElement=elements.get(index);
        Ingredient refinedIngredient=getNotUsedTransformedElement(modificationPoint,operationType,new Ingredient(templateElement));
        return refinedIngredient;
      }
    }
  }
 else {
    return super.getFixIngredient(modificationPoint,operationType);
  }
  return null;
}
Program: 61482
Project: 61482
Buggy source:
/** 
 * Return the number of ingredients according to: the location and the operator to apply.
 * @param modificationPoint
 * @param operationType
 * @return
 */
protected int getSpaceSize(ModificationPoint modificationPoint,AstorOperator operationType){
  String type=null;
  if (operationType instanceof ReplaceOp) {
    type=modificationPoint.getCodeElement().getClass().getSimpleName();
  }
  List<?> allIng=null;
  if (type == null) {
    allIng=this.ingredientSpace.getIngredients(modificationPoint.getCodeElement());
  }
 else {
    allIng=this.ingredientSpace.getIngredients(modificationPoint.getCodeElement(),type);
  }
  if (allIng == null || allIng.isEmpty()) {
    return 0;
  }
  return allIng.size();
}

Fixed version (ground truth):
/** 
 * Return the number of ingredients according to: the location and the operator to apply.
 * @param modificationPoint
 * @param operationType
 * @return
 */
protected int getSpaceSize(ModificationPoint modificationPoint,AstorOperator operationType){
  String type=null;
  List<?> allIng=getSpace(modificationPoint,operationType);
  if (allIng == null || allIng.isEmpty()) {
    return 0;
  }
  return allIng.size();
}
Program: 61483
Project: 61483
Buggy source:
/** 
 * Check if the ingredient was already used
 * @param id program instance id.
 * @param fix
 * @param location
 * @return
 */
protected boolean alreadySelected(ModificationPoint gen,CtElement fixElement,AstorOperator operator){
  String lockey=getKey(gen,operator);
  String fix="String_Node_Str";
  try {
    fix=fixElement.toString();
  }
 catch (  Exception e) {
    log.error("String_Node_Str");
  }
  List<String> prev=appliedCache.get(lockey);
  if (prev == null) {
    prev=new ArrayList<String>();
    prev.add(fix);
    appliedCache.put(lockey,prev);
    log.debug("String_Node_Str" + StringUtil.trunc(fix) + "String_Node_Str"+ StringUtil.trunc(lockey));
    return false;
  }
 else {
    if (prev.contains(fix)) {
      return true;
    }
 else {
      prev.add(fix);
      log.debug("String_Node_Str" + StringUtil.trunc(fix) + "String_Node_Str"+ StringUtil.trunc(lockey));
      return false;
    }
  }
}

Fixed version (ground truth):
/** 
 * Check if the ingredient was already used
 * @param id program instance id.
 * @param fix
 * @param location
 * @return
 */
protected boolean alreadySelected(ModificationPoint gen,CtElement fixElement,AstorOperator operator){
  String lockey=getKey(gen,operator);
  String fix="String_Node_Str";
  try {
    fix=fixElement.toString();
  }
 catch (  Exception e) {
    log.error("String_Node_Str");
  }
  List<String> prev=appliedCache.get(lockey);
  if (prev == null) {
    prev=new ArrayList<String>();
    prev.add(fix);
    appliedCache.put(lockey,prev);
    log.debug("String_Node_Str" + StringUtil.trunc(fix) + "String_Node_Str"+ StringUtil.trunc(lockey));
    return false;
  }
 else {
    if (prev.contains(fix)) {
      log.debug("String_Node_Str" + StringUtil.trunc(fix) + "String_Node_Str"+ (lockey));
      return true;
    }
 else {
      prev.add(fix);
      log.debug("String_Node_Str" + StringUtil.trunc(fix) + "String_Node_Str"+ StringUtil.trunc(lockey));
      return false;
    }
  }
}
Program: 61485
Project: 61485
Buggy source:
@Override public void defineSpace(ProgramVariant variant){
  List<CtType<?>> affected=variant.getAffectedClasses();
  for (  CtType<?> classToProcess : affected) {
    List<CtCodeElement> ingredients=this.ingredientProcessor.createFixSpace(classToProcess);
    AbstractFixSpaceProcessor.mustClone=true;
    for (    CtCodeElement ctIngredient : ingredients) {
      String keyLocation=mapKey(ctIngredient);
      if (ctIngredient instanceof CtExpression) {
        CtExpression ctExpr=(CtExpression)ctIngredient;
        String typeExpression=ctExpr.getClass().getSimpleName();
        String returnTypeExpression=(ctExpr.getType() != null) ? ctExpr.getType().getSimpleName() : "String_Node_Str";
        List<CtCodeElement> ingredientsKey=(List<CtCodeElement>)mkp.get(keyLocation,typeExpression,returnTypeExpression);
        if (!mkp.containsKey(keyLocation,typeExpression,returnTypeExpression)) {
          ingredientsKey=new CacheList<CtCodeElement>();
          mkp.put(keyLocation,typeExpression,returnTypeExpression,ingredientsKey);
          log.debug("String_Node_Str" + keyLocation + "String_Node_Str"+ typeExpression+ "String_Node_Str"+ returnTypeExpression);
        }
        if (ConfigurationProperties.getPropertyBool("String_Node_Str") || !ingredientsKey.contains(ctIngredient)) {
          ingredientsKey.add(ctIngredient);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void defineSpace(ProgramVariant variant){
  List<CtType<?>> affected=variant.getAffectedClasses();
  log.debug("String_Node_Str");
  for (  CtType<?> classToProcess : affected) {
    List<CtCodeElement> ingredients=this.ingredientProcessor.createFixSpace(classToProcess);
    AbstractFixSpaceProcessor.mustClone=true;
    for (    CtCodeElement ctIngredient : ingredients) {
      String keyLocation=mapKey(ctIngredient);
      if (ctIngredient instanceof CtExpression) {
        CtExpression ctExpr=(CtExpression)ctIngredient;
        String typeExpression=ctExpr.getClass().getSimpleName();
        if (ctExpr.getType() == null) {
          continue;
        }
        String returnTypeExpression=(ctExpr.getType() != null) ? ctExpr.getType().getSimpleName() : "String_Node_Str";
        List<CtCodeElement> ingredientsKey=(List<CtCodeElement>)mkp.get(keyLocation,typeExpression,returnTypeExpression);
        if (!mkp.containsKey(keyLocation,typeExpression,returnTypeExpression)) {
          ingredientsKey=new CacheList<CtCodeElement>();
          mkp.put(keyLocation,typeExpression,returnTypeExpression,ingredientsKey);
          log.debug("String_Node_Str" + keyLocation + "String_Node_Str"+ typeExpression+ "String_Node_Str"+ returnTypeExpression);
        }
        if (ConfigurationProperties.getPropertyBool("String_Node_Str") || !ingredientsKey.contains(ctIngredient)) {
          ingredientsKey.add(ctIngredient);
          log.debug("String_Node_Str" + ctIngredient);
        }
      }
    }
  }
  int nrIng=0;
  for (  Object ingList : mkp.values()) {
    nrIng+=((List)ingList).size();
  }
  log.info("String_Node_Str".format("String_Node_Str",mkp.keySet().size(),nrIng));
}
Program: 61486
Project: 61486
Buggy source:
@Override public List<CtCodeElement> getIngredients(CtElement element,String type){
  log.debug("String_Node_Str" + element.getClass().getCanonicalName());
  if (element instanceof CtExpression) {
    String keyLocation=mapKey(element);
    CtExpression ctExpr=(CtExpression)element;
    String typeExpression=ctExpr.getClass().getSimpleName();
    String returnTypeExpression=ctExpr.getType().getSimpleName();
    List ingredients=(List<CtCodeElement>)mkp.get(keyLocation,typeExpression,returnTypeExpression);
    return ingredients;
  }
  log.error("String_Node_Str" + element.getClass().getCanonicalName());
  return null;
}

Fixed version (ground truth):
@Override public List<CtCodeElement> getIngredients(CtElement element,String type){
  if (element instanceof CtExpression) {
    String keyLocation=mapKey(element);
    CtExpression ctExpr=(CtExpression)element;
    String typeExpression=ctExpr.getClass().getSimpleName();
    String returnTypeExpression=(ctExpr.getType() == null) ? "String_Node_Str" : ctExpr.getType().getSimpleName();
    List ingredients=(List<CtCodeElement>)mkp.get(keyLocation,typeExpression,returnTypeExpression);
    return ingredients;
  }
  log.error("String_Node_Str" + element.getClass().getCanonicalName());
  return null;
}
Program: 61490
Project: 61490
Buggy source:
/** 
 * Create a Gen Mutation for a given CtElement
 * @param ctElementPointed
 * @param className
 * @param suspValue
 * @return
 * @throws IllegalAccessException
 */
@Override protected OperatorInstance createOperatorInstanceForPoint(ModificationPoint gen) throws IllegalAccessException {
  ModificationPoint genSusp=gen;
  AstorOperator operationType=new ReplaceOp();
  if (!(genSusp.getCodeElement() instanceof CtIf)) {
    return null;
  }
  CtIf targetIF=(CtIf)genSusp.getCodeElement();
  CtElement cpar=targetIF.getParent();
  if ((cpar == null)) {
    return null;
  }
  OperatorInstance operation=new OperatorInstance();
  operation.setOriginal(targetIF.getCondition());
  operation.setOperationApplied(operationType);
  operation.setModificationPoint(genSusp);
  List<MutantCtElement> mutations=getMutants(targetIF);
  log.debug("String_Node_Str" + mutations.size() + "String_Node_Str"+ mutations);
  if (mutations == null || mutations.size() == 0) {
    return null;
  }
  CtElement fix=null;
  int max=0;
  boolean continueSearching=true;
  while (continueSearching && max < mutations.size()) {
    fix=getFixMutation(mutations);
    continueSearching=fix != null;
    max++;
  }
  if (continueSearching) {
    log.debug("String_Node_Str");
    return null;
  }
  operation.setModified(fix);
  return operation;
}

Fixed version (ground truth):
/** 
 * Create a Gen Mutation for a given CtElement
 * @param ctElementPointed
 * @param className
 * @param suspValue
 * @return
 * @throws IllegalAccessException
 */
@Override public OperatorInstance createOperatorInstanceForPoint(ModificationPoint gen) throws IllegalAccessException {
  ModificationPoint genSusp=gen;
  AstorOperator operationType=new ReplaceOp();
  if (!(genSusp.getCodeElement() instanceof CtIf)) {
    return null;
  }
  CtIf targetIF=(CtIf)genSusp.getCodeElement();
  CtElement cpar=targetIF.getParent();
  if ((cpar == null)) {
    return null;
  }
  OperatorInstance operation=new OperatorInstance();
  operation.setOriginal(targetIF.getCondition());
  operation.setOperationApplied(operationType);
  operation.setModificationPoint(genSusp);
  List<MutantCtElement> mutations=getMutants(targetIF);
  log.debug("String_Node_Str" + mutations.size() + "String_Node_Str"+ mutations);
  if (mutations == null || mutations.size() == 0) {
    return null;
  }
  CtElement fix=null;
  int max=0;
  boolean continueSearching=true;
  while (continueSearching && max < mutations.size()) {
    fix=getFixMutation(mutations);
    continueSearching=fix != null;
    max++;
  }
  if (continueSearching) {
    log.debug("String_Node_Str");
    return null;
  }
  operation.setModified(fix);
  return operation;
}
Program: 61491
Project: 61491
Buggy source:
/** 
 * This method analyze the output of the junit executor (i.e.,  {@link JUnitTestExecutor}) and return an entity called TestResult with the result of the test execution
 * @param p
 * @return
 */
@Override protected TestResult getTestResult(BufferedReader in){
  log.debug("String_Node_Str");
  TestResult tr=new TestResult();
  boolean success=false;
  String out="String_Node_Str";
  try {
    String line;
    while ((line=in.readLine()) != null) {
      out+=line + "String_Node_Str";
      if (line.startsWith(JUnitTestExecutor.OUTSEP)) {
        String[] s=line.split(JUnitTestExecutor.OUTSEP);
        int nrtc=Integer.valueOf(s[1]);
        tr.casesExecuted=nrtc;
        int failing=Integer.valueOf(s[2]);
        tr.failures=failing;
        if (!"String_Node_Str".equals(s[3])) {
          String[] falinglist=s[3].replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").split("String_Node_Str");
          for (          String string : falinglist) {
            if (!string.trim().isEmpty())             tr.failTest.add(string.trim());
          }
        }
        success=true;
      }
    }
    in.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  if (success)   return tr;
 else {
    log.error("String_Node_Str" + out);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * This method analyze the output of the junit executor (i.e.,  {@link JUnitTestExecutor}) and return an entity called TestResult with the result of the test execution
 * @param p
 * @return
 */
@Override protected TestResult getTestResult(BufferedReader in){
  log.debug("String_Node_Str");
  TestResult tr=new TestResult();
  boolean success=false;
  String processOut="String_Node_Str";
  try {
    String line;
    while ((line=in.readLine()) != null) {
      processOut+=line + "String_Node_Str";
      if (line.startsWith(JUnitTestExecutor.OUTSEP)) {
        String[] resultPrinted=line.split(JUnitTestExecutor.OUTSEP);
        int nrtc=Integer.valueOf(resultPrinted[1]);
        tr.casesExecuted=nrtc;
        int nrfailing=Integer.valueOf(resultPrinted[2]);
        tr.failures=nrfailing;
        if (resultPrinted.length > 3 && !"String_Node_Str".equals(resultPrinted[3])) {
          String[] failingTestList=resultPrinted[3].replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").split("String_Node_Str");
          for (          String failingTest : failingTestList) {
            failingTest=failingTest.trim();
            if (!failingTest.isEmpty() && !failingTest.equals("String_Node_Str"))             tr.failTest.add(failingTest);
          }
        }
        success=true;
      }
    }
    in.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  if (success)   return tr;
 else {
    log.error("String_Node_Str" + processOut);
    return null;
  }
}
Program: 61492
Project: 61492
Buggy source:
@Override public void loadExtensionPoints() throws Exception {
  super.loadExtensionPoints();
  List<AbstractFixSpaceProcessor<?>> ingredientProcessors=new ArrayList<AbstractFixSpaceProcessor<?>>();
  ingredientProcessors.add(new SingleStatementFixSpaceProcessor());
  OperatorSpace jpgoperatorSpace=PlugInLoader.loadOperatorSpace();
  if (jpgoperatorSpace == null)   jpgoperatorSpace=new jGenProgSpace();
  this.setOperatorSpace(jpgoperatorSpace);
  String opStrategyClassName=ConfigurationProperties.properties.getProperty("String_Node_Str");
  if (opStrategyClassName != null) {
    OperatorSelectionStrategy strategy=createOperationSelectionStrategy(opStrategyClassName,jpgoperatorSpace);
    this.setOperatorSelectionStrategy(strategy);
  }
 else {
    this.setOperatorSelectionStrategy(new UniformRandomRepairOperatorSpace(jpgoperatorSpace));
  }
  IngredientSpace ingredientspace=PlugInLoader.loadIngredientSpace(ingredientProcessors);
  IngredientSearchStrategy ingStrategy=(IngredientSearchStrategy)PlugInLoader.loadPlugin(ExtensionPoints.INGREDIENT_SEARCH_STRATEGY,new Class[]{IngredientSpace.class},new Object[]{jpgoperatorSpace});
  if (ingStrategy == null) {
    ingStrategy=new EfficientIngredientStrategy(ingredientspace);
  }
  this.setIngredientStrategy(ingStrategy);
  this.setVariantFactory(new ProgramVariantFactory(ingredientProcessors));
}

Fixed version (ground truth):
@Override public void loadExtensionPoints() throws Exception {
  super.loadExtensionPoints();
  List<AbstractFixSpaceProcessor<?>> ingredientProcessors=new ArrayList<AbstractFixSpaceProcessor<?>>();
  ingredientProcessors.add(new SingleStatementFixSpaceProcessor());
  OperatorSpace jpgoperatorSpace=PlugInLoader.loadOperatorSpace();
  if (jpgoperatorSpace == null)   jpgoperatorSpace=new jGenProgSpace();
  this.setOperatorSpace(jpgoperatorSpace);
  String opStrategyClassName=ConfigurationProperties.properties.getProperty("String_Node_Str");
  if (opStrategyClassName != null) {
    OperatorSelectionStrategy strategy=createOperationSelectionStrategy(opStrategyClassName,jpgoperatorSpace);
    this.setOperatorSelectionStrategy(strategy);
  }
 else {
    this.setOperatorSelectionStrategy(new UniformRandomRepairOperatorSpace(jpgoperatorSpace));
  }
  IngredientSpace ingredientspace=PlugInLoader.loadIngredientSpace(ingredientProcessors);
  IngredientSearchStrategy ingStrategy=(IngredientSearchStrategy)PlugInLoader.loadPlugin(ExtensionPoints.INGREDIENT_SEARCH_STRATEGY,new Class[]{IngredientSpace.class},new Object[]{ingredientspace});
  if (ingStrategy == null) {
    ingStrategy=new EfficientIngredientStrategy(ingredientspace);
  }
  this.setIngredientStrategy(ingStrategy);
  this.setVariantFactory(new ProgramVariantFactory(ingredientProcessors));
}
Program: 61493
Project: 61493
Buggy source:
protected TestCaseVariantValidationResult executeRegressionTestingOneByOne(ProgramVariant mutatedVariant,URL[] bc,JUnitExecutorProcess p,ProjectRepairFacade projectFacade){
  log.debug("String_Node_Str");
  TestResult trregressionall=new TestResult();
  long t1=System.currentTimeMillis();
  for (  String tc : projectFacade.getProperties().getRegressionTestCases()) {
    List<String> parcial=new ArrayList<String>();
    parcial.add(tc);
    String jvmPath=ConfigurationProperties.getProperty("String_Node_Str");
    TestResult trregression=p.execute(jvmPath,bc,parcial,ConfigurationProperties.getPropertyInt("String_Node_Str"));
    if (trregression == null) {
      log.debug("String_Node_Str");
      return null;
    }
 else {
      trregressionall.getFailures().addAll(trregression.getFailures());
      trregressionall.getSuccessTest().addAll(trregression.getSuccessTest());
      trregressionall.failures+=trregression.getFailures().size();
      trregressionall.casesExecuted+=trregression.getCasesExecuted();
    }
  }
  long t2=System.currentTimeMillis();
  currentStats.time2Validation.add((t2 - t1));
  currentStats.numberOfTestcasesExecutedval2+=trregressionall.casesExecuted;
  currentStats.numberOfRegressionTestCases=trregressionall.casesExecuted;
  log.debug(trregressionall);
  return new TestCasesProgramValidationResult(trregressionall,true,trregressionall.wasSuccessful());
}

Fixed version (ground truth):
protected TestCaseVariantValidationResult executeRegressionTestingOneByOne(ProgramVariant mutatedVariant,URL[] bc,JUnitExecutorProcess p,ProjectRepairFacade projectFacade){
  log.debug("String_Node_Str");
  TestResult trregressionall=new TestResult();
  long t1=System.currentTimeMillis();
  for (  String tc : projectFacade.getProperties().getRegressionTestCases()) {
    List<String> parcial=new ArrayList<String>();
    parcial.add(tc);
    String jvmPath=ConfigurationProperties.getProperty("String_Node_Str");
    TestResult singleTestResult=p.execute(jvmPath,bc,parcial,ConfigurationProperties.getPropertyInt("String_Node_Str"));
    if (singleTestResult == null) {
      log.debug("String_Node_Str");
      return null;
    }
 else {
      trregressionall.getFailures().addAll(singleTestResult.getFailures());
      trregressionall.getSuccessTest().addAll(singleTestResult.getSuccessTest());
      trregressionall.failures+=singleTestResult.failures;
      trregressionall.casesExecuted+=singleTestResult.getCasesExecuted();
    }
  }
  long t2=System.currentTimeMillis();
  currentStats.time2Validation.add((t2 - t1));
  currentStats.numberOfTestcasesExecutedval2+=trregressionall.casesExecuted;
  currentStats.numberOfRegressionTestCases=trregressionall.casesExecuted;
  log.debug(trregressionall);
  return new TestCasesProgramValidationResult(trregressionall,true,trregressionall.wasSuccessful());
}
Program: 61495
Project: 61495
Buggy source:
/** 
 * By default, it initializes the spoon model. It should not be created before. Otherwise, an exception occurs.
 * @param suspicious
 * @throws Exception
 */
public void initPopulation(List<SuspiciousCode> suspicious) throws Exception {
  log.info("String_Node_Str" + suspicious.size());
  initializePopulation(suspicious);
  if (originalVariant == null) {
    log.error("String_Node_Str");
    return;
  }
  if (originalVariant.getModificationPoints().isEmpty()) {
    log.error("String_Node_Str");
    return;
  }
  if (this.ingredientSearchStrategy != null) {
    this.ingredientSearchStrategy.getIngredientSpace().defineSpace(originalVariant);
  }
  if (ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    log.debug("String_Node_Str");
    setFitnessOfPopulation();
  }
 else {
    log.debug("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * By default, it initializes the spoon model. It should not be created before. Otherwise, an exception occurs.
 * @param suspicious
 * @throws Exception
 */
public void initPopulation(List<SuspiciousCode> suspicious) throws Exception {
  log.info("String_Node_Str" + suspicious.size());
  initializePopulation(suspicious);
  if (originalVariant == null) {
    log.error("String_Node_Str");
    return;
  }
  if (originalVariant.getModificationPoints().isEmpty()) {
    log.error("String_Node_Str");
    return;
  }
  if (this.ingredientSearchStrategy != null) {
    this.ingredientSearchStrategy.getIngredientSpace().defineSpace(originalVariant);
  }
  if (!ConfigurationProperties.getPropertyBool("String_Node_Str")) {
    log.debug("String_Node_Str");
    setFitnessOfPopulation();
  }
 else {
    log.debug("String_Node_Str");
  }
}
Program: 61497
Project: 61497
Buggy source:
public void storeSucessfulTransformedIngredient(int pvid,int attempts){
  this.successfulTransformedIngredients.add(new Pair(pvid,attempts));
}

Fixed version (ground truth):
public void storeSucessfulTransformedIngredient(int pvid,int transformations){
  this.successfulTransformedIngredients.add(new Pair(pvid,transformations));
}