Program: 168241
Project: 168241
Buggy source:
public int predict(String label1,String folderPath1,String label2,String folderPath2) throws IOException {
  int ret=0;
  File folder1=new File(folderPath1);
  File folder2=new File(folderPath2);
  dfMap.clear();
  noOfDocuments=0;
  if (doTfidf) {
    for (    File file : folder1.listFiles()) {
      noOfDocuments=noOfDocuments + 1;
      buildDfMap(file);
    }
    for (    File file : folder2.listFiles()) {
      noOfDocuments=noOfDocuments + 1;
      buildDfMap(file);
    }
    System.out.println("String_Node_Str");
    appendLog("String_Node_Str");
  }
  File testFile=new File(intermediatePath + "String_Node_Str");
  BufferedWriter bw=new BufferedWriter(new FileWriter(testFile));
  for (  File file : folder1.listFiles()) {
    System.out.println("String_Node_Str" + file.toString());
    bw.write("String_Node_Str" + BowToTestString(fileToBow(file)));
    bw.newLine();
  }
  for (  File file : folder2.listFiles()) {
    System.out.println("String_Node_Str" + file.toString());
    bw.write("String_Node_Str" + BowToTestString(fileToBow(file)));
    bw.newLine();
  }
  System.out.println("String_Node_Str" + testFile.getAbsolutePath());
  appendLog("String_Node_Str" + testFile.getAbsolutePath());
  bw.close();
  System.out.println("String_Node_Str" + modelFile.getAbsolutePath());
  appendLog("String_Node_Str" + modelFile.getAbsolutePath());
  String[] predict_arguments=new String[3];
  predict_arguments[0]=testFile.getAbsolutePath();
  predict_arguments[1]=modelFile.getAbsolutePath();
  predict_arguments[2]=intermediatePath + "String_Node_Str";
  double[] result=svm_predict.main(predict_arguments);
  int correct=(int)result[0], total=(int)result[1];
  double pvalue=result[2];
  System.out.println("String_Node_Str" + intermediatePath + "String_Node_Str");
  appendLog("String_Node_Str" + intermediatePath + "String_Node_Str");
  System.out.println("String_Node_Str" + (double)correct / total * 100 + "String_Node_Str" + correct + "String_Node_Str" + total + "String_Node_Str");
  appendLog("String_Node_Str" + (double)correct / total * 100 + "String_Node_Str" + correct + "String_Node_Str" + total + "String_Node_Str");
  System.out.println("String_Node_Str" + pvalue);
  NumberFormat nf=NumberFormat.getInstance();
  nf.setMaximumFractionDigits(Integer.MAX_VALUE);
  System.out.println(nf.format(pvalue));
  appendLog("String_Node_Str" + (double)correct / total * 100 + "String_Node_Str" + correct + "String_Node_Str" + total + "String_Node_Str");
  appendLog("String_Node_Str" + nf.format(pvalue) + "String_Node_Str");
  return ret;
}

Fixed version (ground truth):
public int predict(String label1,String folderPath1,String label2,String folderPath2) throws IOException {
  int ret=0;
  File folder1=new File(folderPath1);
  File folder2=new File(folderPath2);
  dfMap.clear();
  noOfDocuments=0;
  if (doTfidf) {
    for (    File file : folder1.listFiles()) {
      noOfDocuments=noOfDocuments + 1;
      buildDfMap(file);
    }
    for (    File file : folder2.listFiles()) {
      noOfDocuments=noOfDocuments + 1;
      buildDfMap(file);
    }
    System.out.println("String_Node_Str");
    appendLog("String_Node_Str");
  }
  File testFile=new File(intermediatePath + "String_Node_Str");
  BufferedWriter bw=new BufferedWriter(new FileWriter(testFile));
  for (  File file : folder1.listFiles()) {
    System.out.println("String_Node_Str" + file.toString());
    bw.write("String_Node_Str" + BowToTestString(fileToBow(file)));
    bw.newLine();
  }
  for (  File file : folder2.listFiles()) {
    System.out.println("String_Node_Str" + file.toString());
    bw.write("String_Node_Str" + BowToTestString(fileToBow(file)));
    bw.newLine();
  }
  System.out.println("String_Node_Str" + testFile.getAbsolutePath());
  appendLog("String_Node_Str" + testFile.getAbsolutePath());
  bw.close();
  System.out.println("String_Node_Str" + modelFile.getAbsolutePath());
  appendLog("String_Node_Str" + modelFile.getAbsolutePath());
  String[] predict_arguments=new String[3];
  predict_arguments[0]=testFile.getAbsolutePath();
  predict_arguments[1]=modelFile.getAbsolutePath();
  predict_arguments[2]=intermediatePath + "String_Node_Str";
  double[] result=svm_predict.main(predict_arguments);
  int correct=(int)result[0], total=(int)result[1];
  System.out.println("String_Node_Str" + intermediatePath + "String_Node_Str");
  appendLog("String_Node_Str" + intermediatePath + "String_Node_Str");
  System.out.println("String_Node_Str" + (double)correct / total * 100 + "String_Node_Str" + correct + "String_Node_Str" + total + "String_Node_Str");
  appendLog("String_Node_Str" + (double)correct / total * 100 + "String_Node_Str" + correct + "String_Node_Str" + total + "String_Node_Str");
  BinomialTest btest=new BinomialTest();
  double p=0.5;
  double pvalue=btest.binomialTest(total,correct,p,AlternativeHypothesis.TWO_SIDED);
  System.out.println("String_Node_Str" + pvalue);
  appendLog("String_Node_Str" + (double)correct / total * 100 + "String_Node_Str" + correct + "String_Node_Str" + total + "String_Node_Str");
  if (pvalue != 0) {
    if (pvalue > 0.5)     pvalue=Math.abs(pvalue - 1);
    appendLog("String_Node_Str" + pvalue + "String_Node_Str");
  }
 else   appendLog("String_Node_Str");
  return ret;
}