Program: 13702
Project: 13702
Buggy source:
@Override protected void cleanup(Context context) throws IOException, InterruptedException {
  Logger.DEBUG("String_Node_Str" + totalValCount);
  Logger.DEBUG("String_Node_Str" + totalKeyCount);
  FileSystem fs=null;
  try {
    fs=FileSystem.get(new URI(out),context.getConfiguration());
  }
 catch (  URISyntaxException ex) {
    Logger.EXCEPTION(ex);
  }
  bw.close();
  File mergeFile=new File(mergeJS);
  Logger.DEBUG("String_Node_Str" + count + "String_Node_Str"+ mergeJS);
  HalvadeFileUtils.uploadFileToHDFS(context,fs,mergeFile.getAbsolutePath(),out + mergeFile.getName());
  String newGenomeDir=refDir + jobId + "String_Node_Str";
  File starOut=new File(newGenomeDir);
  starOut.mkdirs();
  String stargtf=HalvadeConf.getStarGtf(context.getConfiguration());
  long time=STARInstance.rebuildStarGenome(context,bin,newGenomeDir,ref,mergeJS,overhang,threads,mem,stargtf);
  context.getCounter(HalvadeCounters.TIME_STAR_BUILD).increment(time);
  String pass2GenDir=HalvadeConf.getStarDirPass2HDFS(context.getConfiguration());
  File pass2check=new File(newGenomeDir + HalvadeConf.getPass2Suffix(context.getConfiguration()));
  pass2check.createNewFile();
  Logger.DEBUG("String_Node_Str" + pass2check.getAbsolutePath());
  if (requireUploadToHDFS) {
    Logger.DEBUG("String_Node_Str");
    fs.mkdirs(new Path(pass2GenDir));
    File[] genFiles=starOut.listFiles();
    for (    File gen : genFiles) {
      HalvadeFileUtils.uploadFileToHDFS(context,fs,gen.getAbsolutePath(),pass2GenDir + gen.getName());
    }
    Logger.DEBUG("String_Node_Str" + pass2GenDir);
  }
  HalvadeFileUtils.removeLocalFile(mergeJS);
}

Fixed version (ground truth):
@Override protected void cleanup(Context context) throws IOException, InterruptedException {
  Logger.DEBUG("String_Node_Str" + totalValCount);
  Logger.DEBUG("String_Node_Str" + totalKeyCount);
  FileSystem fs=null;
  try {
    fs=FileSystem.get(new URI(out),context.getConfiguration());
  }
 catch (  URISyntaxException ex) {
    Logger.EXCEPTION(ex);
  }
  bw.close();
  File mergeFile=new File(mergeJS);
  Logger.DEBUG("String_Node_Str" + count + "String_Node_Str"+ mergeJS);
  HalvadeFileUtils.uploadFileToHDFS(context,fs,mergeFile.getAbsolutePath(),out + mergeFile.getName());
  String newGenomeDir=refDir + jobId + "String_Node_Str";
  File starOut=new File(newGenomeDir);
  starOut.mkdirs();
  String stargtf=HalvadeConf.getStarGtf(context.getConfiguration());
  long time=STARInstance.rebuildStarGenome(context,bin,newGenomeDir,ref,mergeJS,overhang,threads,mem,stargtf);
  context.getCounter(HalvadeCounters.TIME_STAR_BUILD).increment(time);
  if (requireUploadToHDFS) {
    String pass2GenDir=HalvadeConf.getStarDirPass2HDFS(context.getConfiguration());
    Logger.DEBUG("String_Node_Str");
    fs.mkdirs(new Path(pass2GenDir));
    File[] genFiles=starOut.listFiles();
    for (    File gen : genFiles) {
      HalvadeFileUtils.uploadFileToHDFS(context,fs,gen.getAbsolutePath(),pass2GenDir + gen.getName());
    }
    Logger.DEBUG("String_Node_Str" + pass2GenDir);
  }
 else {
    File pass2check=new File(newGenomeDir + HalvadeConf.getPass2Suffix(context.getConfiguration()));
    pass2check.createNewFile();
    Logger.DEBUG("String_Node_Str" + pass2check.getAbsolutePath());
  }
  HalvadeFileUtils.removeLocalFile(mergeJS);
}