Program: 71172
Project: 71172
Buggy source:
/** 
 * Used to edit the gradle file
 * @param file the {@code build.gradle} file
 * @param resultList the list of results to append to the gradle file
 */
public static void editFile(File file,ArrayList<CurseResult> resultList){
  GradleFileBlock overBlock;
  try {
    overBlock=GradleFileBlock.loadFromFile(file);
  }
 catch (  IOException e) {
    handleException(e);
    return;
  }
  mavenapplication: {
    overBlock.getOrCreateChildren("String_Node_Str").get(0).getProperties();
    for (    GradleFileBlock block : overBlock.getOrCreateChildren("String_Node_Str").get(0).getChildren("String_Node_Str")) {
      GradleProperties props=block.getProperties();
      if (props.containsKey("String_Node_Str")) {
        for (        String url : props.get("String_Node_Str")) {
          if (url.contains("String_Node_Str")) {
            break mavenapplication;
          }
        }
      }
    }
    GradleFileBlock mavenblock=new GradleFileBlock(overBlock.getOrCreateChildren("String_Node_Str").get(0),"String_Node_Str");
    GradleProperties props=mavenblock.getProperties();
    props.putQuote("String_Node_Str","String_Node_Str");
    props.putQuote("String_Node_Str","String_Node_Str");
  }
  List<String> set=new ArrayList<>();
  GradleFileBlock dep=overBlock.getOrCreateChildren("String_Node_Str").get(0);
  ArrayList<CurseResult> usedResults=new ArrayList<>();
  outer:   for (  String singleDep : dep.getProperties().getRemovedQuotes("String_Node_Str")) {
    for (    CurseResult result : resultList) {
      if (result.getGradle().split("String_Node_Str")[0].equals(singleDep.split("String_Node_Str")[0])) {
        usedResults.add(result);
        set.add(result.getGradle());
        continue outer;
      }
    }
    set.add(singleDep);
  }
  for (  CurseResult result : resultList) {
    if (!usedResults.contains(result)) {
      set.add(result.getGradle());
    }
  }
  List<String> currentList=dep.getProperties().get("String_Node_Str");
  currentList.clear();
  for (  String singleDep : set) {
    currentList.add("String_Node_Str" + singleDep + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Used to edit the gradle file
 * @param file the {@code build.gradle} file
 * @param resultList the list of results to append to the gradle file
 */
public static void editFile(File file,ArrayList<CurseResult> resultList){
  GradleFileBlock overBlock;
  try {
    overBlock=GradleFileBlock.loadFromFile(file);
  }
 catch (  IOException e) {
    handleException(e);
    return;
  }
  mavenapplication: {
    overBlock.getOrCreateChildren("String_Node_Str").get(0).getProperties();
    for (    GradleFileBlock block : overBlock.getOrCreateChildren("String_Node_Str").get(0).getChildren("String_Node_Str")) {
      GradleProperties props=block.getProperties();
      if (props.containsKey("String_Node_Str")) {
        for (        String url : props.get("String_Node_Str")) {
          if (url.contains("String_Node_Str")) {
            break mavenapplication;
          }
        }
      }
    }
    GradleFileBlock mavenblock=new GradleFileBlock(overBlock.getOrCreateChildren("String_Node_Str").get(0),"String_Node_Str");
    GradleProperties props=mavenblock.getProperties();
    props.putQuote("String_Node_Str","String_Node_Str");
    props.putQuote("String_Node_Str","String_Node_Str");
  }
  List<String> set=new ArrayList<>();
  GradleFileBlock dep=overBlock.getOrCreateChildren("String_Node_Str").get(0);
  ArrayList<CurseResult> usedResults=new ArrayList<>();
  outer:   for (  String singleDep : dep.getProperties().getRemovedQuotes("String_Node_Str")) {
    for (    CurseResult result : resultList) {
      if (result.getGradle().split("String_Node_Str")[0].equals(singleDep.split("String_Node_Str")[0])) {
        usedResults.add(result);
        set.add(result.getGradle());
        continue outer;
      }
    }
    set.add(singleDep);
  }
  for (  CurseResult result : resultList) {
    if (!usedResults.contains(result)) {
      set.add(result.getGradle());
    }
  }
  ArrayList<String> currentList=new ArrayList<>();
  currentList.clear();
  for (  String singleDep : set) {
    currentList.add("String_Node_Str" + singleDep + "String_Node_Str");
  }
  dep.getProperties().put("String_Node_Str",currentList);
  try {
    overBlock.write(file);
  }
 catch (  IOException e) {
    handleException(e);
  }
}