Program: 13700
Project: 13700
Buggy source:
protected int runPass1RNAJob(Configuration pass1Conf,String tmpOutDir) throws IOException, InterruptedException, ClassNotFoundException, URISyntaxException {
  HalvadeConf.setIsPass2(pass1Conf,false);
  HalvadeResourceManager.setJobResources(halvadeOpts,pass1Conf,HalvadeResourceManager.RNA_SHMEM_PASS1,halvadeOpts.nodes == 1,halvadeOpts.useBamInput);
  halvadeOpts.splitChromosomes(pass1Conf);
  HalvadeConf.setPass2Suffix(pass1Conf,pass2suffix);
  Job pass1Job=Job.getInstance(pass1Conf,"String_Node_Str");
  pass1Job.addCacheArchive(new URI(halvadeOpts.halvadeBinaries));
  pass1Job.setJarByClass(be.ugent.intec.halvade.hadoop.mapreduce.HalvadeMapper.class);
  FileSystem fs=FileSystem.get(new URI(halvadeOpts.in),pass1Conf);
  try {
    if (fs.getFileStatus(new Path(halvadeOpts.in)).isDirectory()) {
      FileStatus[] files=fs.listStatus(new Path(halvadeOpts.in));
      for (      FileStatus file : files) {
        if (!file.isDirectory()) {
          FileInputFormat.addInputPath(pass1Job,file.getPath());
        }
      }
    }
 else {
      FileInputFormat.addInputPath(pass1Job,new Path(halvadeOpts.in));
    }
  }
 catch (  IOException|IllegalArgumentException e) {
    Logger.EXCEPTION(e);
  }
  FileSystem outFs=FileSystem.get(new URI(tmpOutDir),pass1Conf);
  boolean skipPass1=false;
  if (outFs.exists(new Path(tmpOutDir))) {
    skipPass1=outFs.exists(new Path(tmpOutDir + "String_Node_Str"));
    if (skipPass1)     Logger.DEBUG("String_Node_Str");
 else {
      Logger.INFO("String_Node_Str" + tmpOutDir + "String_Node_Str");
      Logger.INFO("String_Node_Str");
      System.exit(-2);
    }
  }
  if (!skipPass1) {
    FileOutputFormat.setOutputPath(pass1Job,new Path(tmpOutDir));
    pass1Job.setMapperClass(be.ugent.intec.halvade.hadoop.mapreduce.StarAlignPassXMapper.class);
    pass1Job.setInputFormatClass(HalvadeTextInputFormat.class);
    pass1Job.setMapOutputKeyClass(GenomeSJ.class);
    pass1Job.setMapOutputValueClass(Text.class);
    pass1Job.setSortComparatorClass(GenomeSJSortComparator.class);
    pass1Job.setGroupingComparatorClass(GenomeSJGroupingComparator.class);
    pass1Job.setNumReduceTasks(1);
    pass1Job.setReducerClass(be.ugent.intec.halvade.hadoop.mapreduce.RebuildStarGenomeReducer.class);
    pass1Job.setOutputKeyClass(LongWritable.class);
    pass1Job.setOutputValueClass(Text.class);
    return runTimedJob(pass1Job,"String_Node_Str");
  }
 else   return 0;
}

Fixed version (ground truth):
protected int runPass1RNAJob(Configuration pass1Conf,String tmpOutDir) throws IOException, InterruptedException, ClassNotFoundException, URISyntaxException {
  HalvadeConf.setIsPass2(pass1Conf,false);
  HalvadeResourceManager.setJobResources(halvadeOpts,pass1Conf,HalvadeResourceManager.RNA_SHMEM_PASS1,halvadeOpts.nodes == 1,halvadeOpts.useBamInput);
  int pass2Reduces=HalvadeResourceManager.getPass2Reduces(halvadeOpts);
  halvadeOpts.splitChromosomes(pass1Conf,pass2Reduces);
  HalvadeConf.setPass2Suffix(pass1Conf,pass2suffix);
  Job pass1Job=Job.getInstance(pass1Conf,"String_Node_Str");
  pass1Job.addCacheArchive(new URI(halvadeOpts.halvadeBinaries));
  pass1Job.setJarByClass(be.ugent.intec.halvade.hadoop.mapreduce.HalvadeMapper.class);
  FileSystem fs=FileSystem.get(new URI(halvadeOpts.in),pass1Conf);
  try {
    if (fs.getFileStatus(new Path(halvadeOpts.in)).isDirectory()) {
      FileStatus[] files=fs.listStatus(new Path(halvadeOpts.in));
      for (      FileStatus file : files) {
        if (!file.isDirectory()) {
          FileInputFormat.addInputPath(pass1Job,file.getPath());
        }
      }
    }
 else {
      FileInputFormat.addInputPath(pass1Job,new Path(halvadeOpts.in));
    }
  }
 catch (  IOException|IllegalArgumentException e) {
    Logger.EXCEPTION(e);
  }
  FileSystem outFs=FileSystem.get(new URI(tmpOutDir),pass1Conf);
  boolean skipPass1=false;
  if (outFs.exists(new Path(tmpOutDir))) {
    skipPass1=outFs.exists(new Path(tmpOutDir + "String_Node_Str"));
    if (skipPass1)     Logger.DEBUG("String_Node_Str");
 else {
      Logger.INFO("String_Node_Str" + tmpOutDir + "String_Node_Str");
      Logger.INFO("String_Node_Str");
      System.exit(-2);
    }
  }
  if (!skipPass1) {
    FileOutputFormat.setOutputPath(pass1Job,new Path(tmpOutDir));
    pass1Job.setMapperClass(be.ugent.intec.halvade.hadoop.mapreduce.StarAlignPassXMapper.class);
    pass1Job.setInputFormatClass(HalvadeTextInputFormat.class);
    pass1Job.setMapOutputKeyClass(GenomeSJ.class);
    pass1Job.setMapOutputValueClass(Text.class);
    pass1Job.setSortComparatorClass(GenomeSJSortComparator.class);
    pass1Job.setGroupingComparatorClass(GenomeSJGroupingComparator.class);
    pass1Job.setNumReduceTasks(1);
    pass1Job.setReducerClass(be.ugent.intec.halvade.hadoop.mapreduce.RebuildStarGenomeReducer.class);
    pass1Job.setOutputKeyClass(LongWritable.class);
    pass1Job.setOutputValueClass(Text.class);
    return runTimedJob(pass1Job,"String_Node_Str");
  }
 else   return 0;
}