Program: 141116
Project: 141116
Buggy source:
@Override protected void setup(final Context context) throws IOException {
  EoulsanLogger.initConsoleHandler();
  getLogger().info("String_Node_Str");
  final Configuration conf=context.getConfiguration();
  if (!EoulsanRuntime.isRuntime()) {
    HadoopEoulsanRuntime.newEoulsanRuntime(conf);
  }
  final String mapperName=conf.get(MAPPER_NAME_KEY);
  if (mapperName == null) {
    throw new IOException("String_Node_Str");
  }
  this.mapper=SequenceReadsMapperService.getInstance().newService(mapperName);
  this.mapper.setMapperVersionToUse(conf.get(MAPPER_VERSION_KEY));
  this.mapper.setMapperFlavorToUse(conf.get(MAPPER_FLAVOR_KEY));
  final String counterGroup=conf.get(CommonHadoop.COUNTER_GROUP_KEY);
  if (counterGroup != null) {
    this.counterGroup=counterGroup;
  }
  final boolean pairedEnd=Boolean.parseBoolean(conf.get(PAIR_END_KEY));
  final FastqFormat fastqFormat=FastqFormat.getFormatFromName(conf.get(FASTQ_FORMAT_KEY,"String_Node_Str" + EoulsanRuntime.getSettings().getDefaultFastqFormat()));
  final URI[] localCacheFiles=context.getCacheFiles();
  if (localCacheFiles == null || localCacheFiles.length == 0) {
    throw new IOException("String_Node_Str");
  }
  if (localCacheFiles.length > 1) {
    throw new IOException("String_Node_Str");
  }
  getLogger().info("String_Node_Str" + localCacheFiles[0]);
  final DataFile archiveIndexFile=new DataFile(localCacheFiles[0].toString());
  getLogger().info("String_Node_Str" + archiveIndexFile);
  this.mapperIndexDir=new File(context.getConfiguration().get(HADOOP_TEMP_DIR) + "String_Node_Str" + MAPPER_INDEX_DIR_PREFIX+ this.mapper.getMapperName()+ "String_Node_Str"+ conf.get(INDEX_CHECKSUM_KEY));
  getLogger().info("String_Node_Str" + mapperIndexDir);
  this.mapper.setFastqFormat(fastqFormat);
  getLogger().info("String_Node_Str" + fastqFormat);
  this.lock=new ZooKeeperLocker(conf.get(ZOOKEEPER_CONNECT_STRING_KEY),Integer.parseInt(conf.get(ZOOKEEPER_SESSION_TIMEOUT_KEY)),"String_Node_Str" + InetAddress.getLocalHost().getHostName(),"String_Node_Str");
  final String mapperArguments=unDoubleQuotes(conf.get(MAPPER_ARGS_KEY));
  if (mapperArguments != null) {
    this.mapper.setMapperArguments(mapperArguments);
  }
  int mapperThreads=Integer.parseInt(conf.get(MAPPER_THREADS_KEY,"String_Node_Str" + Runtime.getRuntime().availableProcessors()));
  if (mapperThreads > Runtime.getRuntime().availableProcessors() || mapperThreads < 1) {
    mapperThreads=Runtime.getRuntime().availableProcessors();
  }
  this.mapper.setMultipleInstancesEnabled(true);
  if (!this.mapper.isMultipleInstancesEnabled()) {
    this.mapper.setThreadsNumber(mapperThreads);
  }
  getLogger().info("String_Node_Str" + this.mapper.getMapperName() + "String_Node_Str"+ mapperThreads+ "String_Node_Str");
  final File tempDir=new File(conf.get(HADOOP_TEMP_DIR));
  if (!tempDir.exists()) {
    getLogger().fine("String_Node_Str" + tempDir.getAbsolutePath());
    if (!tempDir.mkdirs()) {
      throw new IOException("String_Node_Str" + tempDir);
    }
  }
  this.mapper.setTempDirectory(tempDir);
  updateLastUsedMapperIndex(this.mapperIndexDir);
  context.setStatus("String_Node_Str" + this.mapper.getMapperName());
  ProcessUtils.waitRandom(5000);
  this.lock.lock();
  this.mapper.init(archiveIndexFile.open(),this.mapperIndexDir,new HadoopReporter(context),this.counterGroup);
  if (pairedEnd) {
    this.process=this.mapper.mapPE();
  }
 else {
    this.process=this.mapper.mapSE();
  }
  if (this.mapper.isMultipleInstancesEnabled()) {
    this.lock.unlock();
  }
 else {
    waitFreeJVM(context);
  }
  this.writeHeaders=context.getTaskAttemptID().getTaskID().getId() == 0;
  this.samResultsParserThread=startParseSAMResultsThread(this.process);
  context.setStatus("String_Node_Str" + this.mapper.getMapperName());
  getLogger().info("String_Node_Str");
}

Fixed version (ground truth):
@Override protected void setup(final Context context) throws IOException {
  EoulsanLogger.initConsoleHandler();
  getLogger().info("String_Node_Str");
  final Configuration conf=context.getConfiguration();
  if (!EoulsanRuntime.isRuntime()) {
    HadoopEoulsanRuntime.newEoulsanRuntime(conf);
  }
  final String mapperName=conf.get(MAPPER_NAME_KEY);
  if (mapperName == null) {
    throw new IOException("String_Node_Str");
  }
  this.mapper=SequenceReadsMapperService.getInstance().newService(mapperName);
  this.mapper.setMapperVersionToUse(conf.get(MAPPER_VERSION_KEY));
  this.mapper.setMapperFlavorToUse(conf.get(MAPPER_FLAVOR_KEY));
  final String counterGroup=conf.get(CommonHadoop.COUNTER_GROUP_KEY);
  if (counterGroup != null) {
    this.counterGroup=counterGroup;
  }
  final boolean pairedEnd=Boolean.parseBoolean(conf.get(PAIR_END_KEY));
  final FastqFormat fastqFormat=FastqFormat.getFormatFromName(conf.get(FASTQ_FORMAT_KEY,"String_Node_Str" + EoulsanRuntime.getSettings().getDefaultFastqFormat()));
  final URI[] localCacheFiles=context.getCacheFiles();
  if (localCacheFiles == null || localCacheFiles.length == 0) {
    throw new IOException("String_Node_Str");
  }
  if (localCacheFiles.length > 1) {
    throw new IOException("String_Node_Str");
  }
  getLogger().info("String_Node_Str" + localCacheFiles[0]);
  final DataFile archiveIndexFile=new DataFile(localCacheFiles[0].toString());
  getLogger().info("String_Node_Str" + archiveIndexFile);
  this.mapperIndexDir=new File(context.getConfiguration().get(HADOOP_TEMP_DIR) + "String_Node_Str" + MAPPER_INDEX_DIR_PREFIX+ this.mapper.getMapperName()+ "String_Node_Str"+ conf.get(INDEX_CHECKSUM_KEY));
  getLogger().info("String_Node_Str" + mapperIndexDir);
  this.mapper.setFastqFormat(fastqFormat);
  getLogger().info("String_Node_Str" + fastqFormat);
  this.lock=new ZooKeeperLocker(conf.get(ZOOKEEPER_CONNECT_STRING_KEY),Integer.parseInt(conf.get(ZOOKEEPER_SESSION_TIMEOUT_KEY)),"String_Node_Str" + InetAddress.getLocalHost().getHostName(),"String_Node_Str");
  final String mapperArguments=unDoubleQuotes(conf.get(MAPPER_ARGS_KEY));
  if (mapperArguments != null) {
    this.mapper.setMapperArguments(mapperArguments);
  }
  int mapperThreads=Integer.parseInt(conf.get(MAPPER_THREADS_KEY,"String_Node_Str" + Runtime.getRuntime().availableProcessors()));
  if (mapperThreads > Runtime.getRuntime().availableProcessors() || mapperThreads < 1) {
    mapperThreads=Runtime.getRuntime().availableProcessors();
  }
  if (!this.mapper.isMultipleInstancesEnabled()) {
    this.mapper.setThreadsNumber(mapperThreads);
  }
 else {
    this.mapper.setThreadsNumber(1);
  }
  getLogger().info("String_Node_Str" + this.mapper.getMapperName() + "String_Node_Str"+ mapperThreads+ "String_Node_Str");
  final File tempDir=new File(conf.get(HADOOP_TEMP_DIR));
  if (!tempDir.exists()) {
    getLogger().fine("String_Node_Str" + tempDir.getAbsolutePath());
    if (!tempDir.mkdirs()) {
      throw new IOException("String_Node_Str" + tempDir);
    }
  }
  this.mapper.setTempDirectory(tempDir);
  updateLastUsedMapperIndex(this.mapperIndexDir);
  context.setStatus("String_Node_Str");
  ProcessUtils.waitRandom(5000);
  this.lock.lock();
  this.mapper.init(archiveIndexFile.open(),this.mapperIndexDir,new HadoopReporter(context),this.counterGroup);
  if (this.mapper.isMultipleInstancesEnabled()) {
    this.lock.unlock();
  }
 else {
    context.setStatus("String_Node_Str" + this.mapper.getMapperName());
    waitFreeJVM(context);
  }
  if (pairedEnd) {
    this.process=this.mapper.mapPE();
  }
 else {
    this.process=this.mapper.mapSE();
  }
  this.writeHeaders=context.getTaskAttemptID().getTaskID().getId() == 0;
  this.samResultsParserThread=startParseSAMResultsThread(this.process);
  context.setStatus("String_Node_Str" + this.mapper.getMapperName());
  getLogger().info("String_Node_Str");
}