Program: 168240
Project: 168240
Buggy source:
public double cross_predict(String kVal,String label1,File[] testFiles1,String label2,File[] testFiles2) throws IOException {
  dfMap.clear();
  noOfDocuments=0;
  if (doTfidf) {
    for (    File file : testFiles1) {
      noOfDocuments=noOfDocuments + 1;
      buildDfMap(file);
    }
    for (    File file : testFiles2) {
      noOfDocuments=noOfDocuments + 1;
      buildDfMap(file);
    }
    System.out.println("String_Node_Str");
    appendLog("String_Node_Str");
  }
  File testFile=new File(intermediatePath + "String_Node_Str" + kVal+ "String_Node_Str");
  BufferedWriter bw=new BufferedWriter(new FileWriter(testFile));
  for (  File file : testFiles1) {
    bw.write("String_Node_Str" + BowToTestString(fileToBow(file)));
    bw.newLine();
  }
  for (  File file : testFiles2) {
    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" + kVal+ "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"+ kVal+ "String_Node_Str");
  appendLog("String_Node_Str" + intermediatePath + "String_Node_Str"+ kVal+ "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 (double)correct / total * 100;
}

Fixed version (ground truth):
public double cross_predict(String kVal,String label1,File[] testFiles1,String label2,File[] testFiles2) throws IOException {
  dfMap.clear();
  noOfDocuments=0;
  if (doTfidf) {
    for (    File file : testFiles1) {
      noOfDocuments=noOfDocuments + 1;
      buildDfMap(file);
    }
    for (    File file : testFiles2) {
      noOfDocuments=noOfDocuments + 1;
      buildDfMap(file);
    }
    System.out.println("String_Node_Str");
    appendLog("String_Node_Str");
  }
  File testFile=new File(intermediatePath + "String_Node_Str" + kVal+ "String_Node_Str");
  BufferedWriter bw=new BufferedWriter(new FileWriter(testFile));
  for (  File file : testFiles1) {
    bw.write("String_Node_Str" + BowToTestString(fileToBow(file)));
    bw.newLine();
  }
  for (  File file : testFiles2) {
    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" + kVal+ "String_Node_Str";
  double[] result=svm_predict.main(predict_arguments);
  int correct=(int)result[0], total=(int)result[1];
  BinomialTest btest=new BinomialTest();
  double p=0.5;
  double pvalue=btest.binomialTest(total,correct,p,AlternativeHypothesis.TWO_SIDED);
  System.out.println("String_Node_Str" + intermediatePath + "String_Node_Str"+ kVal+ "String_Node_Str");
  appendLog("String_Node_Str" + intermediatePath + "String_Node_Str"+ kVal+ "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);
  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 (double)correct / total * 100;
}