Program: 61211
Project: 61211
Buggy source:
@Override public int run(String[] args) throws Exception {
  addInputOption();
  addOutputOption();
  addOption(DefaultOptionCreator.overwriteOption().create());
  addOption("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addOption("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addOption("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addOption("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  Map<String,String> parsedArgs=parseArguments(args);
  Path input=getInputPath();
  Path output=getOutputPath();
  int chunkSize=Integer.parseInt(parsedArgs.get("String_Node_Str"));
  String separator=parsedArgs.get("String_Node_Str");
  Configuration conf=getConf();
  if (conf == null) {
    setConf(new Configuration());
    conf=getConf();
  }
  AtomicInteger currentPhase=new AtomicInteger();
  int[] msgDim=new int[1];
  List<Path> msgIdChunks=null;
  boolean overwrite=hasOption(DefaultOptionCreator.OVERWRITE_OPTION);
  if (shouldRunNextPhase(parsedArgs,currentPhase)) {
    Path msgIdsPath=new Path(output,"String_Node_Str");
    if (overwrite) {
      HadoopUtil.delete(conf,msgIdsPath);
    }
    log.info("String_Node_Str");
    Job createMsgIdDictionary=prepareJob(input,msgIdsPath,SequenceFileInputFormat.class,MsgIdToDictionaryMapper.class,Text.class,VarIntWritable.class,MailToDictionaryReducer.class,Text.class,VarIntWritable.class,SequenceFileOutputFormat.class);
    createMsgIdDictionary.waitForCompletion(true);
    msgIdChunks=createDictionaryChunks(msgIdsPath,output,"String_Node_Str",createMsgIdDictionary.getConfiguration(),chunkSize,msgDim);
  }
  List<Path> fromChunks=null;
  if (shouldRunNextPhase(parsedArgs,currentPhase)) {
    Path fromIdsPath=new Path(output,"String_Node_Str");
    if (overwrite) {
      HadoopUtil.delete(conf,fromIdsPath);
    }
    log.info("String_Node_Str");
    Job createFromIdDictionary=prepareJob(input,fromIdsPath,SequenceFileInputFormat.class,FromEmailToDictionaryMapper.class,Text.class,VarIntWritable.class,MailToDictionaryReducer.class,Text.class,VarIntWritable.class,SequenceFileOutputFormat.class);
    createFromIdDictionary.getConfiguration().set(EmailUtility.SEPARATOR,separator);
    createFromIdDictionary.waitForCompletion(true);
    int[] fromDim=new int[1];
    fromChunks=createDictionaryChunks(fromIdsPath,output,"String_Node_Str",createFromIdDictionary.getConfiguration(),chunkSize,fromDim);
  }
  if (shouldRunNextPhase(parsedArgs,currentPhase) && fromChunks != null && msgIdChunks != null) {
    log.info("String_Node_Str");
    Path vecPath=new Path(output,"String_Node_Str");
    if (overwrite) {
      HadoopUtil.delete(conf,vecPath);
    }
    conf.set(EmailUtility.MSG_ID_DIMENSION,String.valueOf(msgDim[0]));
    conf.set(EmailUtility.FROM_PREFIX,"String_Node_Str");
    conf.set(EmailUtility.MSG_IDS_PREFIX,"String_Node_Str");
    conf.set(EmailUtility.FROM_INDEX,parsedArgs.get("String_Node_Str"));
    conf.set(EmailUtility.REFS_INDEX,parsedArgs.get("String_Node_Str"));
    conf.set(EmailUtility.SEPARATOR,separator);
    int j=0;
    int i=0;
    for (    Path fromChunk : fromChunks) {
      for (      Path idChunk : msgIdChunks) {
        Path out=new Path(vecPath,"String_Node_Str" + i + '-'+ j);
        DistributedCache.setCacheFiles(new URI[]{fromChunk.toUri(),idChunk.toUri()},conf);
        Job createRecMatrix=prepareJob(input,out,SequenceFileInputFormat.class,MailToRecMapper.class,NullWritable.class,Text.class,TextOutputFormat.class);
        createRecMatrix.getConfiguration().set("String_Node_Str","String_Node_Str");
        createRecMatrix.waitForCompletion(true);
        FileStatus[] fs=HadoopUtil.getFileStatus(new Path(out,"String_Node_Str"),PathType.GLOB,PathFilters.partFilter(),null,conf);
        for (int k=0; k < fs.length; k++) {
          FileStatus f=fs[k];
          Path outPath=new Path(vecPath,"String_Node_Str" + i + '-'+ j+ '-'+ k);
          FileUtil.copy(f.getPath().getFileSystem(conf),f.getPath(),outPath.getFileSystem(conf),outPath,true,overwrite,conf);
        }
        HadoopUtil.delete(conf,out);
        j++;
      }
      i++;
    }
  }
  return 0;
}

Fixed version (ground truth):
@Override public int run(String[] args) throws Exception {
  addInputOption();
  addOutputOption();
  addOption(DefaultOptionCreator.overwriteOption().create());
  addOption("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addOption("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addOption("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addOption("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addOption(buildOption("String_Node_Str","String_Node_Str","String_Node_Str",false,false,"String_Node_Str"));
  Map<String,String> parsedArgs=parseArguments(args);
  Path input=getInputPath();
  Path output=getOutputPath();
  int chunkSize=Integer.parseInt(parsedArgs.get("String_Node_Str"));
  String separator=parsedArgs.get("String_Node_Str");
  Configuration conf=getConf();
  if (conf == null) {
    setConf(new Configuration());
    conf=getConf();
  }
  boolean useCounts=hasOption("String_Node_Str");
  AtomicInteger currentPhase=new AtomicInteger();
  int[] msgDim=new int[1];
  List<Path> msgIdChunks=null;
  boolean overwrite=hasOption(DefaultOptionCreator.OVERWRITE_OPTION);
  if (shouldRunNextPhase(parsedArgs,currentPhase)) {
    Path msgIdsPath=new Path(output,"String_Node_Str");
    if (overwrite) {
      HadoopUtil.delete(conf,msgIdsPath);
    }
    log.info("String_Node_Str");
    Job createMsgIdDictionary=prepareJob(input,msgIdsPath,SequenceFileInputFormat.class,MsgIdToDictionaryMapper.class,Text.class,VarIntWritable.class,MailToDictionaryReducer.class,Text.class,VarIntWritable.class,SequenceFileOutputFormat.class);
    createMsgIdDictionary.waitForCompletion(true);
    msgIdChunks=createDictionaryChunks(msgIdsPath,output,"String_Node_Str",createMsgIdDictionary.getConfiguration(),chunkSize,msgDim);
  }
  List<Path> fromChunks=null;
  if (shouldRunNextPhase(parsedArgs,currentPhase)) {
    Path fromIdsPath=new Path(output,"String_Node_Str");
    if (overwrite) {
      HadoopUtil.delete(conf,fromIdsPath);
    }
    log.info("String_Node_Str");
    Job createFromIdDictionary=prepareJob(input,fromIdsPath,SequenceFileInputFormat.class,FromEmailToDictionaryMapper.class,Text.class,VarIntWritable.class,MailToDictionaryReducer.class,Text.class,VarIntWritable.class,SequenceFileOutputFormat.class);
    createFromIdDictionary.getConfiguration().set(EmailUtility.SEPARATOR,separator);
    createFromIdDictionary.waitForCompletion(true);
    int[] fromDim=new int[1];
    fromChunks=createDictionaryChunks(fromIdsPath,output,"String_Node_Str",createFromIdDictionary.getConfiguration(),chunkSize,fromDim);
  }
  if (shouldRunNextPhase(parsedArgs,currentPhase) && fromChunks != null && msgIdChunks != null) {
    log.info("String_Node_Str");
    Path vecPath=new Path(output,"String_Node_Str");
    if (overwrite) {
      HadoopUtil.delete(conf,vecPath);
    }
    conf.set(EmailUtility.MSG_ID_DIMENSION,String.valueOf(msgDim[0]));
    conf.set(EmailUtility.FROM_PREFIX,"String_Node_Str");
    conf.set(EmailUtility.MSG_IDS_PREFIX,"String_Node_Str");
    conf.set(EmailUtility.FROM_INDEX,parsedArgs.get("String_Node_Str"));
    conf.set(EmailUtility.REFS_INDEX,parsedArgs.get("String_Node_Str"));
    conf.set(EmailUtility.SEPARATOR,separator);
    conf.set(MailToRecReducer.USE_COUNTS_PREFERENCE,String.valueOf(useCounts));
    int j=0;
    int i=0;
    for (    Path fromChunk : fromChunks) {
      for (      Path idChunk : msgIdChunks) {
        Path out=new Path(vecPath,"String_Node_Str" + i + '-'+ j);
        DistributedCache.setCacheFiles(new URI[]{fromChunk.toUri(),idChunk.toUri()},conf);
        Job createRecMatrix=prepareJob(input,out,SequenceFileInputFormat.class,MailToRecMapper.class,Text.class,LongWritable.class,MailToRecReducer.class,Text.class,NullWritable.class,TextOutputFormat.class);
        createRecMatrix.getConfiguration().set("String_Node_Str","String_Node_Str");
        createRecMatrix.waitForCompletion(true);
        FileStatus[] fs=HadoopUtil.getFileStatus(new Path(out,"String_Node_Str"),PathType.GLOB,PathFilters.partFilter(),null,conf);
        for (int k=0; k < fs.length; k++) {
          FileStatus f=fs[k];
          Path outPath=new Path(vecPath,"String_Node_Str" + i + '-'+ j+ '-'+ k);
          FileUtil.copy(f.getPath().getFileSystem(conf),f.getPath(),outPath.getFileSystem(conf),outPath,true,overwrite,conf);
        }
        HadoopUtil.delete(conf,out);
        j++;
      }
      i++;
    }
  }
  return 0;
}