Program: 109991
Project: 109991
Buggy source:
static boolean parseResults(){
  try {
    String resultsFile="String_Node_Str";
    Scanner scan=new Scanner(new File(resultsFile));
    String[] headers=scan.nextLine().split("String_Node_Str");
    int assignCol=0, completeCol=0, pendCol=0;
    List<Integer> answerCols=new ArrayList<Integer>();
    Map<Integer,String> columnToQuestion=new HashMap<Integer,String>();
    Map<Integer,String> results=new HashMap<Integer,String>();
    int quid=0;
    for (int i=0; i < headers.length; i++) {
      if (headers[i].equals("String_Node_Str")) {
        assignCol=i;
      }
      if (headers[i].equals("String_Node_Str")) {
        pendCol=i;
      }
      if (headers[i].equals("String_Node_Str")) {
        completeCol=i;
      }
      if (headers[i].contains("String_Node_Str") && !(headers[i].contains("String_Node_Str"))) {
        answerCols.add(i);
        columnToQuestion.put(i,headers[i].substring(headers[i].lastIndexOf("String_Node_Str") + 2).replace("String_Node_Str","String_Node_Str"));
        quid=Integer.parseInt(columnToQuestion.get(i));
        String[] question=qs.get(quid);
        String s=question[2].substring(question[2].lastIndexOf("String_Node_Str") + 1) + "String_Node_Str";
        results.put(quid,s);
      }
    }
    System.out.print(results);
    int numAvailable=0;
    int numComplete=0;
    int numPending=0;
    Map<Integer,String> optionMap;
    int oid=0;
    Map<Integer,Double> ratings=new HashMap<Integer,Double>();
    while (scan.hasNextLine()) {
      String line=scan.nextLine();
      String[] hitArray=line.split("String_Node_Str");
      try {
        numAvailable=Integer.parseInt(hitArray[assignCol].replace("String_Node_Str","String_Node_Str"));
        numPending=Integer.parseInt(hitArray[pendCol].replace("String_Node_Str","String_Node_Str"));
        numComplete=Integer.parseInt(hitArray[completeCol].replace("String_Node_Str","String_Node_Str"));
        if (numAvailable > 0 || numPending > 0) {
          for (          int qid : results.keySet()) {
            results.put(qid,results.get(qid) + ratings.get(qid));
          }
          System.out.println(results);
          PrintWriter out=new PrintWriter(new FileWriter("String_Node_Str"));
          out.println("String_Node_Str");
          for (          int qid : results.keySet()) {
            out.println(results.get(qid));
          }
          out.flush();
          out.close();
          return false;
        }
      }
 catch (      java.lang.NumberFormatException e) {
        e.printStackTrace();
      }
      for (      int answerCol : answerCols) {
        quid=Integer.parseInt(columnToQuestion.get(answerCol));
        oid=Integer.parseInt(hitArray[answerCol].substring(hitArray[answerCol].lastIndexOf("String_Node_Str") + 1).replace("String_Node_Str","String_Node_Str"));
        String questionLine=results.get(quid);
        questionLine+=(opts.get(quid).get(oid) + "String_Node_Str");
        results.put(quid,questionLine);
        if (!ratings.containsKey(quid)) {
          ratings.put(quid,(double)oid);
        }
 else {
          ratings.put(quid,((double)oid + ratings.get(quid)) / 2.0);
        }
      }
    }
    System.out.println(ratings);
    for (    int qid : results.keySet()) {
      results.put(qid,results.get(qid) + ratings.get(qid));
    }
    System.out.println(results);
    PrintWriter out=new PrintWriter(new FileWriter("String_Node_Str"));
    out.println("String_Node_Str");
    for (    int qid : results.keySet()) {
      out.println(results.get(qid));
    }
    out.flush();
    out.close();
  }
 catch (  java.io.IOException e) {
    System.out.println("String_Node_Str");
    System.exit(0);
  }
  return true;
}

Fixed version (ground truth):
static boolean parseResults(){
  boolean complete=true;
  try {
    String resultsFile="String_Node_Str";
    Scanner scan=new Scanner(new File(resultsFile));
    String[] headers=scan.nextLine().split("String_Node_Str");
    int assignCol=0, completeCol=0, pendCol=0;
    List<Integer> answerCols=new ArrayList<Integer>();
    Map<Integer,String> columnToQuestion=new HashMap<Integer,String>();
    Map<Integer,String> results=new HashMap<Integer,String>();
    int quid=0;
    for (int i=0; i < headers.length; i++) {
      if (headers[i].equals("String_Node_Str")) {
        assignCol=i;
      }
      if (headers[i].equals("String_Node_Str")) {
        pendCol=i;
      }
      if (headers[i].equals("String_Node_Str")) {
        completeCol=i;
      }
      if (headers[i].contains("String_Node_Str") && !(headers[i].contains("String_Node_Str"))) {
        answerCols.add(i);
        columnToQuestion.put(i,headers[i].substring(headers[i].lastIndexOf("String_Node_Str") + 2).replace("String_Node_Str","String_Node_Str"));
        quid=Integer.parseInt(columnToQuestion.get(i));
        String[] question=qs.get(quid);
        String s=question[2].substring(question[2].lastIndexOf("String_Node_Str") + 1) + "String_Node_Str";
        results.put(quid,s);
      }
    }
    System.out.print(results);
    int numAvailable=0;
    int numComplete=0;
    int numPending=0;
    Map<Integer,String> optionMap;
    int oid=0;
    Map<Integer,Double> ratings=new HashMap<Integer,Double>();
    while (scan.hasNextLine()) {
      String line=scan.nextLine();
      String[] hitArray=line.split("String_Node_Str");
      try {
        numAvailable=Integer.parseInt(hitArray[assignCol].replace("String_Node_Str","String_Node_Str"));
        numPending=Integer.parseInt(hitArray[pendCol].replace("String_Node_Str","String_Node_Str"));
        numComplete=Integer.parseInt(hitArray[completeCol].replace("String_Node_Str","String_Node_Str"));
        if (numAvailable > 0 || numPending > 0) {
          complete=false;
        }
      }
 catch (      java.lang.NumberFormatException e) {
        e.printStackTrace();
      }
      for (      int answerCol : answerCols) {
        quid=Integer.parseInt(columnToQuestion.get(answerCol));
        if (hitArray.length >= answerCol + 1) {
          oid=Integer.parseInt(hitArray[answerCol].substring(hitArray[answerCol].lastIndexOf("String_Node_Str") + 1).replace("String_Node_Str","String_Node_Str"));
          String questionLine=results.get(quid);
          questionLine+=(opts.get(quid).get(oid) + "String_Node_Str");
          results.put(quid,questionLine);
          if (!ratings.containsKey(quid)) {
            ratings.put(quid,(double)oid);
          }
 else {
            ratings.put(quid,((double)oid + ratings.get(quid)) / 2.0);
          }
        }
      }
    }
    System.out.println(ratings);
    for (    int qid : results.keySet()) {
      results.put(qid,results.get(qid) + ratings.get(qid));
    }
    System.out.println(results);
    PrintWriter out=new PrintWriter(new FileWriter("String_Node_Str"));
    out.println("String_Node_Str");
    for (    int qid : results.keySet()) {
      out.println(results.get(qid));
    }
    out.flush();
    out.close();
  }
 catch (  java.io.IOException e) {
    System.out.println("String_Node_Str");
    System.exit(0);
  }
  return complete;
}