Program: 141142
Project: 141142
Buggy source:
/** 
 * @param context Eoulsan context
 * @param gffFile GFF annotation file path
 * @param featureType feature type to use
 * @param attributeId attribute id
 * @param splitAttributeValues split attribute values
 * @param stranded strand mode
 * @param genomeDescDataFile genome description DataFile
 * @param featuresIndexPath feature index output path
 * @param conf Hadoop configuration object
 * @return the feature index output path
 * @throws IOException if an error occurs while creating the feature indexfile
 * @throws BadBioEntryException if an entry of the annotation file is invalid
 * @throws EoulsanException if an error occurs with feature types and featureidentifiers
 */
private static final void createFeaturesIndex(final StepContext context,final DataFile gffFile,final String featureType,final String attributeId,final boolean splitAttributeValues,final StrandUsage stranded,final DataFile genomeDescDataFile,final Path featuresIndexPath,final Configuration conf) throws IOException, BadBioEntryException, EoulsanException {
  final GenomicArray<String> features=new GenomicArray<>();
  final GenomeDescription genomeDescription=GenomeDescription.load(genomeDescDataFile.open());
  final Map<String,Integer> counts=new HashMap<>();
  HTSeqUtils.storeAnnotation(features,gffFile.open(),featureType,stranded,attributeId,splitAttributeValues,counts);
  if (counts.size() == 0) {
    throw new EoulsanException("String_Node_Str" + featureType + "String_Node_Str");
  }
  final File featuresIndexFile=context.getRuntime().createFileInTempDir(StringUtils.basename(gffFile.getName()) + SERIALIZATION_EXTENSION);
  features.addChromosomes(genomeDescription);
  features.save(featuresIndexFile);
  PathUtils.copyLocalFileToPath(featuresIndexFile,featuresIndexPath,conf);
  if (!featuresIndexFile.delete()) {
    getLogger().warning("String_Node_Str" + featuresIndexFile.getAbsolutePath());
  }
}

Fixed version (ground truth):
/** 
 * @param context Eoulsan context
 * @param gffFile GFF annotation file path
 * @param featureType feature type to use
 * @param attributeId attribute id
 * @param splitAttributeValues split attribute values
 * @param stranded strand mode
 * @param genomeDescDataFile genome description DataFile
 * @param featuresIndexPath feature index output path
 * @param conf Hadoop configuration object
 * @throws IOException if an error occurs while creating the feature indexfile
 * @throws BadBioEntryException if an entry of the annotation file is invalid
 * @throws EoulsanException if an error occurs with feature types and featureidentifiers
 */
private static final void createFeaturesIndex(final StepContext context,final DataFile gffFile,final String featureType,final String attributeId,final boolean splitAttributeValues,final StrandUsage stranded,final DataFile genomeDescDataFile,final Path featuresIndexPath,final Configuration conf) throws IOException, BadBioEntryException, EoulsanException {
  final GenomicArray<String> features=new GenomicArray<>();
  final GenomeDescription genomeDescription=GenomeDescription.load(genomeDescDataFile.open());
  final Map<String,Integer> counts=new HashMap<>();
  HTSeqUtils.storeAnnotation(features,gffFile.open(),featureType,stranded,attributeId,splitAttributeValues,counts);
  if (counts.size() == 0) {
    throw new EoulsanException("String_Node_Str" + featureType + "String_Node_Str");
  }
  final File featuresIndexFile=context.getRuntime().createFileInTempDir(StringUtils.basename(gffFile.getName()) + SERIALIZATION_EXTENSION);
  features.addChromosomes(genomeDescription);
  features.save(featuresIndexFile);
  PathUtils.copyLocalFileToPath(featuresIndexFile,featuresIndexPath,conf);
  if (!featuresIndexFile.delete()) {
    getLogger().warning("String_Node_Str" + featuresIndexFile.getAbsolutePath());
  }
}