Program: 33531
Project: 33531
Buggy source:
@Override protected int run(CmdLineParser parser){
  final List<String> args=parser.getRemainingArgs();
switch (args.size()) {
case 0:
    return missingArg("String_Node_Str");
case 1:
  return missingArg("String_Node_Str");
case 2:
return missingArg("String_Node_Str");
default :
break;
}
final String wrkDir=args.get(0), bam=args.get(2), outAny=(String)parser.getOptionValue(outputDirOpt), outLoc=(String)parser.getOptionValue(outputLocalDirOpt), out;
final boolean sort=parser.getBoolean(sortOpt);
verbose=parser.getBoolean(verboseOpt);
if (outAny != null) {
if (outLoc != null) {
System.err.println("String_Node_Str");
return 3;
}
out=outAny;
}
 else out=outLoc;
levels=args.get(1).split("String_Node_Str");
for (String l : levels) {
try {
int lvl=Integer.parseInt(l);
if (lvl > 0) continue;
System.err.printf("String_Node_Str",lvl);
}
 catch (NumberFormatException e) {
System.err.printf("String_Node_Str",l);
}
return 3;
}
wrkDirPath=new Path(wrkDir);
final Path bamPath=new Path(bam);
final boolean forceLocal=out == outLoc;
final Configuration conf=getConf();
conf.set(SummarizeOutputFormat.OUTPUT_NAME_PROP,bamPath.getName());
conf.setStrings(SummarizeReducer.SUMMARY_LEVELS_PROP,levels);
try {
try {
@SuppressWarnings("String_Node_Str") final int maxReduceTasks=new JobClient(new JobConf(conf)).getClusterStatus().getMaxReduceTasks();
conf.setInt("String_Node_Str",Math.max(1,maxReduceTasks * 9 / 10));
if (!runSummary(bamPath)) return 4;
}
 catch (IOException e) {
System.err.printf("String_Node_Str",e);
return 4;
}
Path sortedTmpDir=null;
try {
if (sort) {
sortedTmpDir=new Path(wrkDirPath,"String_Node_Str");
mergeOutputs(sortedTmpDir,false);
}
 else if (out != null) mergeOutputs(new Path(out),forceLocal);
}
 catch (IOException e) {
System.err.printf("String_Node_Str",e);
return 5;
}
if (sort) {
if (!doSorting(sortedTmpDir)) return 6;
if (out != null) try {
mergeOutputs(new Path(out),forceLocal);
}
 catch (IOException e) {
System.err.printf("String_Node_Str",e);
return 7;
}
}
}
 catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
catch (InterruptedException e) {
throw new RuntimeException(e);
}
return 0;
}

Fixed version (ground truth):
@Override protected int run(CmdLineParser parser){
  final List<String> args=parser.getRemainingArgs();
switch (args.size()) {
case 0:
    return missingArg("String_Node_Str");
case 1:
  return missingArg("String_Node_Str");
case 2:
return missingArg("String_Node_Str");
default :
break;
}
final String wrkDirS=args.get(0), bam=args.get(2), outAny=(String)parser.getOptionValue(outputDirOpt), outLoc=(String)parser.getOptionValue(outputLocalDirOpt), out;
final boolean sort=parser.getBoolean(sortOpt);
verbose=parser.getBoolean(verboseOpt);
if (outAny != null) {
if (outLoc != null) {
System.err.println("String_Node_Str");
return 3;
}
out=outAny;
}
 else out=outLoc;
levels=args.get(1).split("String_Node_Str");
for (String l : levels) {
try {
int lvl=Integer.parseInt(l);
if (lvl > 0) continue;
System.err.printf("String_Node_Str",lvl);
}
 catch (NumberFormatException e) {
System.err.printf("String_Node_Str",l);
}
return 3;
}
wrkDir=new Path(wrkDirS);
mainSortOutputDir=sort ? new Path(wrkDir,"String_Node_Str") : null;
final Path bamPath=new Path(bam);
final boolean forceLocal=out == outLoc;
final Configuration conf=getConf();
conf.set(SummarizeOutputFormat.OUTPUT_NAME_PROP,bamPath.getName());
conf.setStrings(SummarizeReducer.SUMMARY_LEVELS_PROP,levels);
try {
try {
@SuppressWarnings("String_Node_Str") final int maxReduceTasks=new JobClient(new JobConf(conf)).getClusterStatus().getMaxReduceTasks();
conf.setInt("String_Node_Str",Math.max(1,maxReduceTasks * 9 / 10));
if (!runSummary(bamPath)) return 4;
}
 catch (IOException e) {
System.err.printf("String_Node_Str",e);
return 4;
}
Path mergedTmpDir=null;
try {
if (sort) {
mergedTmpDir=new Path(wrkDir,"String_Node_Str");
mergeOutputs(mergedTmpDir,false);
}
 else if (out != null) mergeOutputs(new Path(out),forceLocal);
}
 catch (IOException e) {
System.err.printf("String_Node_Str",e);
return 5;
}
if (sort) {
if (!doSorting(mergedTmpDir)) return 6;
tryDelete(mergedTmpDir);
if (out != null) try {
sorted=true;
mergeOutputs(new Path(out),forceLocal);
}
 catch (IOException e) {
System.err.printf("String_Node_Str",e);
return 7;
}
 else {
System.out.println("String_Node_Str");
t.start();
try {
  final FileSystem fs=wrkDir.getFileSystem(conf);
  for (  String lvl : levels) {
    final FileStatus[] parts;
    try {
      parts=fs.globStatus(new Path(new Path(mainSortOutputDir,lvl),"String_Node_Str"));
    }
 catch (    IOException e) {
      System.err.printf("String_Node_Str",lvl,e);
      continue;
    }
    for (    FileStatus part : parts) {
      final Path path=part.getPath();
      try {
        fs.rename(path,new Path(wrkDir,path.getName()));
      }
 catch (      IOException e) {
        System.err.printf("String_Node_Str",path,e);
      }
    }
  }
}
 catch (IOException e) {
  System.err.printf("String_Node_Str",e);
}
System.out.printf("String_Node_Str",t.stopS(),t.fms());
}
tryDelete(mainSortOutputDir);
}
}
 catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
catch (InterruptedException e) {
throw new RuntimeException(e);
}
return 0;
}