Program: 33520
Project: 33520
Buggy source:
@Override protected int run(CmdLineParser parser){
  final List<String> args=parser.getRemainingArgs();
  if (args.isEmpty()) {
    System.err.println("String_Node_Str");
    return 3;
  }
  if (args.size() == 1) {
    System.err.println("String_Node_Str");
    return 3;
  }
  if (!cacheAndSetProperties(parser))   return 3;
  final SAMFileReader.ValidationStringency stringency=Utils.toStringency(parser.getOptionValue(stringencyOpt),"String_Node_Str");
  if (stringency == null)   return 3;
  Path wrkDir=new Path(args.get(0));
  final List<String> strInputs=args.subList(1,args.size());
  final List<Path> inputs=new ArrayList<Path>(strInputs.size());
  for (  final String in : strInputs)   inputs.add(new Path(in));
  final Configuration conf=getConf();
  final String intermediateOutName=(outPath == null ? inputs.get(0) : outPath).getName();
  conf.set(Utils.WORK_FILENAME_PROPERTY,intermediateOutName);
  if (stringency != null)   conf.set(SAMHeaderReader.VALIDATION_STRINGENCY_PROPERTY,stringency.toString());
  final boolean globalSort=parser.getBoolean(sortOpt);
  if (globalSort)   Utils.setHeaderMergerSortOrder(conf,SAMFileHeader.SortOrder.queryname);
  conf.setStrings(Utils.HEADERMERGER_INPUTS_PROPERTY,strInputs.toArray(new String[0]));
  final Timer t=new Timer();
  try {
    wrkDir=wrkDir.getFileSystem(conf).makeQualified(wrkDir);
    if (globalSort)     Utils.configureSampling(wrkDir,intermediateOutName,conf);
    final Job job=new Job(conf);
    job.setJarByClass(FixMate.class);
    job.setMapperClass(FixMateMapper.class);
    job.setReducerClass(FixMateReducer.class);
    if (!parser.getBoolean(noCombinerOpt))     job.setCombinerClass(FixMateReducer.class);
    job.setOutputKeyClass(Text.class);
    job.setOutputValueClass(SAMRecordWritable.class);
    job.setInputFormatClass(AnySAMInputFormat.class);
    job.setOutputFormatClass(CLIMergingAnySAMOutputFormat.class);
    for (    final Path in : inputs)     FileInputFormat.addInputPath(job,in);
    FileOutputFormat.setOutputPath(job,wrkDir);
    if (globalSort) {
      job.setPartitionerClass(TotalOrderPartitioner.class);
      System.out.println("String_Node_Str");
      t.start();
      InputSampler.<LongWritable,SAMRecordWritable>writePartitionFile(job,new InputSampler.RandomSampler<LongWritable,SAMRecordWritable>(0.01,10000,Math.max(100,reduceTasks)));
      System.out.printf("String_Node_Str",t.stopS(),t.fms());
    }
    job.submit();
    System.out.println("String_Node_Str");
    t.start();
    if (!job.waitForCompletion(verbose)) {
      System.err.println("String_Node_Str");
      return 4;
    }
    System.out.printf("String_Node_Str",t.stopS(),t.fms());
  }
 catch (  IOException e) {
    System.err.printf("String_Node_Str",e);
    return 4;
  }
catch (  ClassNotFoundException e) {
    throw new RuntimeException(e);
  }
catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
  if (outPath != null)   try {
    Utils.mergeSAMInto(outPath,wrkDir,"String_Node_Str","String_Node_Str",samFormat,conf,"String_Node_Str");
  }
 catch (  IOException e) {
    System.err.printf("String_Node_Str",e);
    return 5;
  }
  return 0;
}

Fixed version (ground truth):
@Override protected int run(CmdLineParser parser){
  final List<String> args=parser.getRemainingArgs();
  if (args.isEmpty()) {
    System.err.println("String_Node_Str");
    return 3;
  }
  if (args.size() == 1) {
    System.err.println("String_Node_Str");
    return 3;
  }
  if (!cacheAndSetProperties(parser))   return 3;
  final SAMFileReader.ValidationStringency stringency=Utils.toStringency(parser.getOptionValue(stringencyOpt,SAMFileReader.ValidationStringency.DEFAULT_STRINGENCY.toString()),"String_Node_Str");
  if (stringency == null)   return 3;
  Path wrkDir=new Path(args.get(0));
  final List<String> strInputs=args.subList(1,args.size());
  final List<Path> inputs=new ArrayList<Path>(strInputs.size());
  for (  final String in : strInputs)   inputs.add(new Path(in));
  final Configuration conf=getConf();
  final String intermediateOutName=(outPath == null ? inputs.get(0) : outPath).getName();
  conf.set(Utils.WORK_FILENAME_PROPERTY,intermediateOutName);
  if (stringency != null)   conf.set(SAMHeaderReader.VALIDATION_STRINGENCY_PROPERTY,stringency.toString());
  final boolean globalSort=parser.getBoolean(sortOpt);
  if (globalSort)   Utils.setHeaderMergerSortOrder(conf,SAMFileHeader.SortOrder.queryname);
  conf.setStrings(Utils.HEADERMERGER_INPUTS_PROPERTY,strInputs.toArray(new String[0]));
  final Timer t=new Timer();
  try {
    wrkDir=wrkDir.getFileSystem(conf).makeQualified(wrkDir);
    if (globalSort)     Utils.configureSampling(wrkDir,intermediateOutName,conf);
    final Job job=new Job(conf);
    job.setJarByClass(FixMate.class);
    job.setMapperClass(FixMateMapper.class);
    job.setReducerClass(FixMateReducer.class);
    if (!parser.getBoolean(noCombinerOpt))     job.setCombinerClass(FixMateReducer.class);
    job.setOutputKeyClass(Text.class);
    job.setOutputValueClass(SAMRecordWritable.class);
    job.setInputFormatClass(AnySAMInputFormat.class);
    job.setOutputFormatClass(CLIMergingAnySAMOutputFormat.class);
    for (    final Path in : inputs)     FileInputFormat.addInputPath(job,in);
    FileOutputFormat.setOutputPath(job,wrkDir);
    if (globalSort) {
      job.setPartitionerClass(TotalOrderPartitioner.class);
      System.out.println("String_Node_Str");
      t.start();
      InputSampler.<LongWritable,SAMRecordWritable>writePartitionFile(job,new InputSampler.RandomSampler<LongWritable,SAMRecordWritable>(0.01,10000,Math.max(100,reduceTasks)));
      System.out.printf("String_Node_Str",t.stopS(),t.fms());
    }
    job.submit();
    System.out.println("String_Node_Str");
    t.start();
    if (!job.waitForCompletion(verbose)) {
      System.err.println("String_Node_Str");
      return 4;
    }
    System.out.printf("String_Node_Str",t.stopS(),t.fms());
  }
 catch (  IOException e) {
    System.err.printf("String_Node_Str",e);
    return 4;
  }
catch (  ClassNotFoundException e) {
    throw new RuntimeException(e);
  }
catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
  if (outPath != null)   try {
    Utils.mergeSAMInto(outPath,wrkDir,"String_Node_Str","String_Node_Str",samFormat,conf,"String_Node_Str");
  }
 catch (  IOException e) {
    System.err.printf("String_Node_Str",e);
    return 5;
  }
  return 0;
}