Program: 168247
Project: 168247
Buggy source:
public int train(String label1,String folderPath1,String label2,String folderPath2,boolean doTfidf,boolean doCrossVal,String kVal) throws IOException {
  int ret=0;
  File folder1=new File(folderPath1);
  File folder2=new File(folderPath2);
  Calendar cal=Calendar.getInstance();
  dateString="String_Node_Str" + (cal.get(Calendar.MONTH) + 1) + "String_Node_Str"+ cal.get(Calendar.DATE)+ "String_Node_Str"+ cal.get(Calendar.YEAR);
  intermediatePath=System.getProperty("String_Node_Str") + "String_Node_Str" + label1+ "String_Node_Str"+ label2+ "String_Node_Str"+ dateString+ "String_Node_Str"+ System.currentTimeMillis();
  modelFile=new File(intermediatePath + "String_Node_Str");
  File trainFile=new File(intermediatePath + "String_Node_Str");
  this.doTfidf=doTfidf;
  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");
  }
  BufferedWriter bw=new BufferedWriter(new FileWriter(trainFile));
  for (  File file : folder1.listFiles()) {
    System.out.println("String_Node_Str" + file.toString());
    bw.write("String_Node_Str" + BowToString(fileToBow(file)));
    bw.newLine();
  }
  for (  File file : folder2.listFiles()) {
    System.out.println("String_Node_Str" + file.toString());
    bw.write("String_Node_Str" + BowToString(fileToBow(file)));
    bw.newLine();
  }
  System.out.println("String_Node_Str" + noOfDocuments + "String_Node_Str"+ featureMapIndex);
  System.out.println("String_Node_Str" + trainFile.getAbsolutePath());
  appendLog("String_Node_Str" + noOfDocuments + "String_Node_Str"+ featureMapIndex);
  appendLog("String_Node_Str" + trainFile.getAbsolutePath());
  bw.close();
  String[] train_arguments;
  if (doCrossVal) {
    train_arguments=new String[4];
    train_arguments[0]="String_Node_Str";
    train_arguments[1]=kVal;
    train_arguments[2]=trainFile.getAbsolutePath();
    train_arguments[3]=modelFile.getAbsolutePath();
  }
 else {
    train_arguments=new String[2];
    train_arguments[0]=trainFile.getAbsolutePath();
    train_arguments[1]=modelFile.getAbsolutePath();
  }
  System.out.println("String_Node_Str");
  appendLog("String_Node_Str");
  double crossValResult=svm_train.main(train_arguments);
  System.out.println("String_Node_Str" + modelFile.getAbsolutePath());
  appendLog("String_Node_Str" + modelFile.getAbsolutePath());
  File hashmap=new File(intermediatePath + "String_Node_Str");
  ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream(hashmap));
  oos.writeObject(featureMap);
  oos.flush();
  oos.close();
  System.out.println("String_Node_Str" + hashmap.getAbsolutePath());
  appendLog("String_Node_Str" + hashmap.getAbsolutePath());
  if (doCrossVal) {
    System.out.println("String_Node_Str" + crossValResult + "String_Node_Str");
    appendLog("String_Node_Str" + crossValResult + "String_Node_Str");
  }
  return ret;
}

Fixed version (ground truth):
public int train(String label1,String folderPath1,String label2,String folderPath2,boolean doTfidf,boolean doCrossVal,String kVal) throws IOException {
  int ret=0;
  File folder1=new File(folderPath1);
  File folder2=new File(folderPath2);
  Calendar cal=Calendar.getInstance();
  dateString="String_Node_Str" + (cal.get(Calendar.MONTH) + 1) + "String_Node_Str"+ cal.get(Calendar.DATE)+ "String_Node_Str"+ cal.get(Calendar.YEAR);
  intermediatePath=System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + label1+ "String_Node_Str"+ label2+ "String_Node_Str"+ dateString+ "String_Node_Str"+ System.currentTimeMillis();
  modelFile=new File(intermediatePath + "String_Node_Str");
  File trainFile=new File(intermediatePath + "String_Node_Str");
  this.doTfidf=doTfidf;
  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");
  }
  BufferedWriter bw=new BufferedWriter(new FileWriter(trainFile));
  for (  File file : folder1.listFiles()) {
    System.out.println("String_Node_Str" + file.toString());
    bw.write("String_Node_Str" + BowToString(fileToBow(file)));
    bw.newLine();
  }
  for (  File file : folder2.listFiles()) {
    System.out.println("String_Node_Str" + file.toString());
    bw.write("String_Node_Str" + BowToString(fileToBow(file)));
    bw.newLine();
  }
  System.out.println("String_Node_Str" + noOfDocuments + "String_Node_Str"+ featureMapIndex);
  System.out.println("String_Node_Str" + trainFile.getAbsolutePath());
  appendLog("String_Node_Str" + noOfDocuments + "String_Node_Str"+ featureMapIndex);
  appendLog("String_Node_Str" + trainFile.getAbsolutePath());
  bw.close();
  String[] train_arguments;
  if (doCrossVal) {
    train_arguments=new String[4];
    train_arguments[0]="String_Node_Str";
    train_arguments[1]=kVal;
    train_arguments[2]=trainFile.getAbsolutePath();
    train_arguments[3]=modelFile.getAbsolutePath();
  }
 else {
    train_arguments=new String[2];
    train_arguments[0]=trainFile.getAbsolutePath();
    train_arguments[1]=modelFile.getAbsolutePath();
  }
  System.out.println("String_Node_Str");
  appendLog("String_Node_Str");
  double crossValResult=svm_train.main(train_arguments);
  System.out.println("String_Node_Str" + modelFile.getAbsolutePath());
  appendLog("String_Node_Str" + modelFile.getAbsolutePath());
  File hashmap=new File(intermediatePath + "String_Node_Str");
  ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream(hashmap));
  oos.writeObject(featureMap);
  oos.flush();
  oos.close();
  System.out.println("String_Node_Str" + hashmap.getAbsolutePath());
  appendLog("String_Node_Str" + hashmap.getAbsolutePath());
  if (doCrossVal) {
    System.out.println("String_Node_Str" + crossValResult + "String_Node_Str");
    appendLog("String_Node_Str" + crossValResult + "String_Node_Str");
  }
  return ret;
}