Program: 59726
Project: 59726
Buggy source:
/** 
 * Dispatches assembly jobs to the specified environments
 * @param executionContext The environment to dispatch jobs too
 * @throws IOException
 * @throws IllegalArgumentException
 * @throws ProcessExecutionException
 * @throws InterruptedException
 */
@Override public boolean execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  try {
    SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
    log.info("String_Node_Str" + args.getConfig().getAbsolutePath());
    log.debug("String_Node_Str");
    args.validateKmers(args.getKmin(),args.getKmax());
    log.debug("String_Node_Str");
    this.createSupportDirectories();
    WaitCondition assemblerWait=null;
    if (!args.isStatsOnly()) {
      for (int k=getFirstValidKmer(args.getKmin()); k <= args.getKmax(); k=nextKmer(k)) {
        File outputDir=new File(args.getOutputDir(),Integer.toString(k));
        log.debug("String_Node_Str" + args.getAssembler() + "String_Node_Str"+ outputDir.getAbsolutePath());
        Assembler assembler=AssemblerFactory.createAssembler(args.getAssembler(),k,args.getLibs(),outputDir);
        log.debug("String_Node_Str" + assembler != null ? assembler.getName() : "String_Node_Str");
        AssemblerArgs asmArgs=assembler.getArgs();
        log.debug("String_Node_Str" + asmArgs.toString());
        asmArgs.setThreads(args.getThreads());
        asmArgs.setCoverageCutoff(args.getCoverageCutoff());
        this.executeAssembler(assembler,args.getJobPrefix() + "String_Node_Str" + k,executionContext);
        this.createLinks(assembler,k,executionContext);
      }
      if (executionContext.usingScheduler()) {
        if (args.getParallelismLevel() == MassArgs.ParallelismLevel.PARALLEL_ASSEMBLIES_ONLY) {
          log.debug("String_Node_Str");
          this.executeScheduledWait(args.getJobPrefix(),args.getOutputDir(),executionContext);
        }
 else         if (args.getParallelismLevel().doParallelMass()) {
          log.debug("String_Node_Str");
          assemblerWait=executionContext.getScheduler().createWaitCondition(ExitStatus.Type.COMPLETED_SUCCESS,args.getJobPrefix() + "String_Node_Str");
        }
      }
    }
    log.debug("String_Node_Str");
    this.dispatchStatsJob(assemblerWait,executionContext);
    log.info("String_Node_Str");
  }
 catch (  IOException ioe) {
    throw new ProcessExecutionException(-1,ioe);
  }
catch (  CommandExecutionException cee) {
    throw new ProcessExecutionException(-2,cee);
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Dispatches assembly jobs to the specified environments
 * @param executionContext The environment to dispatch jobs too
 * @throws IOException
 * @throws IllegalArgumentException
 * @throws ProcessExecutionException
 * @throws InterruptedException
 */
@Override public boolean execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  try {
    SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
    Assembler genericAssembler=AssemblerFactory.createAssembler(args.getAssembler());
    genericAssembler.getArgs().setLibraries(args.getLibs());
    log.info("String_Node_Str" + args.getConfig().getAbsolutePath());
    log.debug("String_Node_Str");
    args.validateKmers(args.getKmin(),args.getKmax());
    log.debug("String_Node_Str");
    this.createSupportDirectories(genericAssembler,args);
    WaitCondition assemblerWait=null;
    if (!args.isStatsOnly()) {
      for (int k=getFirstValidKmer(args.getKmin()); k <= args.getKmax(); k=args.getStepSize().nextKmer(k)) {
        File outputDir=new File(args.getOutputDir(),Integer.toString(k));
        log.debug("String_Node_Str" + args.getAssembler() + "String_Node_Str"+ outputDir.getAbsolutePath());
        Assembler assembler=AssemblerFactory.createAssembler(args.getAssembler(),k,args.getLibs(),outputDir);
        log.debug("String_Node_Str" + assembler != null ? assembler.getName() : "String_Node_Str");
        AssemblerArgs asmArgs=assembler.getArgs();
        log.debug("String_Node_Str" + asmArgs.toString());
        asmArgs.setThreads(args.getThreads());
        asmArgs.setCoverageCutoff(args.getCoverageCutoff());
        this.executeAssembler(assembler,args.getJobPrefix() + "String_Node_Str" + k,executionContext);
        this.createLinks(assembler,k,executionContext);
      }
      if (executionContext.usingScheduler()) {
        if (args.getParallelismLevel() == MassArgs.ParallelismLevel.PARALLEL_ASSEMBLIES_ONLY) {
          log.debug("String_Node_Str");
          this.executeScheduledWait(args.getJobPrefix(),args.getOutputDir(),executionContext);
        }
 else         if (args.getParallelismLevel().doParallelMass()) {
          log.debug("String_Node_Str");
          assemblerWait=executionContext.getScheduler().createWaitCondition(ExitStatus.Type.COMPLETED_SUCCESS,args.getJobPrefix() + "String_Node_Str");
        }
      }
    }
    log.debug("String_Node_Str");
    this.dispatchStatsJob(genericAssembler,assemblerWait,executionContext);
    log.info("String_Node_Str");
  }
 catch (  IOException ioe) {
    throw new ProcessExecutionException(-1,ioe);
  }
catch (  CommandExecutionException cee) {
    throw new ProcessExecutionException(-2,cee);
  }
  return true;
}