Program: 141235
Project: 141235
Buggy source:
/** 
 * Execute HTSeq-count counter as an Hadoop job.
 * @param design design object
 * @param context Eoulsan context
 * @return a StepResult object
 */
private StepResult executeJobHTSeqCounter(final Design design,final Context context){
  final Configuration conf=new Configuration(false);
  final Map<Sample,Job> jobsRunning=new HashMap<Sample,Job>();
  try {
    final long startTime=System.currentTimeMillis();
    LOGGER.info("String_Node_Str" + getGenomicType());
    final List<Job> jobsPairedEnd=new ArrayList<Job>();
    for (    Sample s : design.getSamples()) {
      if (context.getDataFileCount(READS_FASTQ,s) == 2)       jobsPairedEnd.add(createJobPairedEnd(conf,context,s));
    }
    MapReduceUtils.submitAndWaitForJobs(jobsPairedEnd,CommonHadoop.CHECK_COMPLETION_TIME,COUNTER_GROUP);
    for (    Sample s : design.getSamples()) {
      final Job jconf=createJobHTSeqCounter(conf,context,s,getGenomicType(),getAttributeId(),getStranded(),getOverlapMode(),isRemoveAmbiguousCases());
      jconf.submit();
      jobsRunning.put(s,jconf);
    }
    final HadoopJobsResults jobsResults=new NewAPIJobsResults(jobsRunning.values(),CommonHadoop.CHECK_COMPLETION_TIME,COUNTER_GROUP);
    final long mapReduceEndTime=System.currentTimeMillis();
    LOGGER.info("String_Node_Str" + ((mapReduceEndTime - startTime) / 1000) + "String_Node_Str");
    createFinalExpressionFeaturesFile(context,jobsRunning,this.conf);
    LOGGER.info("String_Node_Str" + ((System.currentTimeMillis() - mapReduceEndTime) / 1000) + "String_Node_Str");
    return jobsResults.getStepResult(context,startTime);
  }
 catch (  IOException e) {
    return new StepResult(context,e,"String_Node_Str" + e.getMessage());
  }
catch (  InterruptedException e) {
    return new StepResult(context,e,"String_Node_Str" + e.getMessage());
  }
catch (  BadBioEntryException e) {
    return new StepResult(context,e,"String_Node_Str" + e.getEntry());
  }
catch (  ClassNotFoundException e) {
    return new StepResult(context,e,"String_Node_Str" + e.getMessage());
  }
catch (  EoulsanException e) {
    return new StepResult(context,e,"String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Execute HTSeq-count counter as an Hadoop job.
 * @param design design object
 * @param context Eoulsan context
 * @return a StepResult object
 */
private StepResult executeJobHTSeqCounter(final Design design,final Context context){
  final Configuration conf=new Configuration(false);
  final Map<Sample,Job> jobsRunning=new HashMap<Sample,Job>();
  try {
    final long startTime=System.currentTimeMillis();
    LOGGER.info("String_Node_Str" + getGenomicType());
    final List<Job> jobsPairedEnd=new ArrayList<Job>();
    for (    Sample s : design.getSamples()) {
      if (context.getDataFileCount(READS_FASTQ,s) == 2)       jobsPairedEnd.add(createJobPairedEnd(conf,context,s));
    }
    if (jobsPairedEnd.size() > 0)     MapReduceUtils.submitAndWaitForJobs(jobsPairedEnd,CommonHadoop.CHECK_COMPLETION_TIME,COUNTER_GROUP);
    for (    Sample s : design.getSamples()) {
      final Job jconf=createJobHTSeqCounter(conf,context,s,getGenomicType(),getAttributeId(),getStranded(),getOverlapMode(),isRemoveAmbiguousCases());
      jconf.submit();
      jobsRunning.put(s,jconf);
    }
    final HadoopJobsResults jobsResults=new NewAPIJobsResults(jobsRunning.values(),CommonHadoop.CHECK_COMPLETION_TIME,COUNTER_GROUP);
    final long mapReduceEndTime=System.currentTimeMillis();
    LOGGER.info("String_Node_Str" + ((mapReduceEndTime - startTime) / 1000) + "String_Node_Str");
    createFinalExpressionFeaturesFile(context,jobsRunning,this.conf);
    LOGGER.info("String_Node_Str" + ((System.currentTimeMillis() - mapReduceEndTime) / 1000) + "String_Node_Str");
    return jobsResults.getStepResult(context,startTime);
  }
 catch (  IOException e) {
    return new StepResult(context,e,"String_Node_Str" + e.getMessage());
  }
catch (  InterruptedException e) {
    return new StepResult(context,e,"String_Node_Str" + e.getMessage());
  }
catch (  BadBioEntryException e) {
    return new StepResult(context,e,"String_Node_Str" + e.getEntry());
  }
catch (  ClassNotFoundException e) {
    return new StepResult(context,e,"String_Node_Str" + e.getMessage());
  }
catch (  EoulsanException e) {
    return new StepResult(context,e,"String_Node_Str" + e.getMessage());
  }
}