Program: 59655
Project: 59655
Buggy source:
@Override public ExecutionResult execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  try {
    StopWatch stopWatch=new StopWatch();
    stopWatch.start();
    log.info("String_Node_Str");
    Args args=this.getArgs();
    if (!args.getOutputDir().exists()) {
      args.getOutputDir().mkdirs();
    }
    Set<AssemblyAnalyser> requestedServices=args.getAssemblyAnalysers();
    for (    AssemblyAnalyser requestedService : requestedServices) {
      requestedService.setConanExecutorService(this.conanExecutorService);
    }
    List<ExecutionResult> jobResults=new ArrayList<>();
    List<File> unitigAssemblies=new ArrayList<>();
    List<File> contigAssemblies=new ArrayList<>();
    List<File> scaffoldAssemblies=new ArrayList<>();
    List<File> bestAssemblies=new ArrayList<>();
    List<File> bubbles=new ArrayList<>();
    List<String> mappings=new ArrayList<>();
    int index=1;
    if (args.kmerCalcResults != null && args.kmerCalcResults.exists()) {
      Mass.setKmerValues(args.getKmerCalcResults(),args.getMassJobs());
    }
    for (    MassJob.Args jobArgs : args.getMassJobs()) {
      String massGroup=jobArgs.getName();
      File inputDir=new File(args.getMassDir(),massGroup);
      if (!inputDir.exists()) {
        throw new ProcessExecutionException(-1,"String_Node_Str" + massGroup + "String_Node_Str"+ inputDir.getAbsolutePath());
      }
      final File unitigsDir=jobArgs.getUnitigsDir();
      final File contigsDir=jobArgs.getContigsDir();
      final File scaffoldsDir=jobArgs.getScaffoldsDir();
      final File longestDir=jobArgs.getLongestDir();
      if (unitigsDir.exists()) {
        unitigAssemblies.addAll(AnalyseMassAssemblies.assembliesFromDir(unitigsDir));
      }
      if (contigsDir.exists()) {
        contigAssemblies.addAll(AnalyseMassAssemblies.assembliesFromDir(contigsDir));
      }
      if (scaffoldsDir.exists()) {
        scaffoldAssemblies.addAll(AnalyseMassAssemblies.assembliesFromDir(scaffoldsDir));
      }
      bestAssemblies.addAll(AnalyseMassAssemblies.assembliesFromDir(longestDir));
      for (      Assembler assembler : jobArgs.getAssemblers()) {
        File assembly=assembler.getBestAssembly();
        if (assembler.getBubbleFile() != null) {
          bubbles.add(assembler.getBubbleFile());
        }
        String run=assembler.getAssemblerArgs().getOutputDir().getName();
        String line=Integer.toString(index) + "String_Node_Str" + massGroup+ "String_Node_Str"+ run+ "String_Node_Str"+ assembly.getAbsolutePath()+ "String_Node_Str"+ (assembler.getBubbleFile() != null ? assembler.getBubbleFile().getAbsolutePath() : "String_Node_Str");
        mappings.add(line);
        index++;
      }
    }
    File unitigsDir=new File(args.getAssembliesDir(),"String_Node_Str");
    File contigsDir=new File(args.getAssembliesDir(),"String_Node_Str");
    File scaffoldsDir=new File(args.getAssembliesDir(),"String_Node_Str");
    File bestDir=new File(args.getAssembliesDir(),"String_Node_Str");
    File bubblesDir=new File(args.getAssembliesDir(),"String_Node_Str");
    this.makeLinks(unitigAssemblies,unitigsDir);
    this.makeLinks(contigAssemblies,contigsDir);
    this.makeLinks(scaffoldAssemblies,scaffoldsDir);
    this.makeLinks(bestAssemblies,bestDir);
    this.makeLinks(bubbles,bubblesDir);
    FileUtils.writeLines(args.getAssemblyLinkageFile(),mappings);
    for (    AssemblyAnalyser analyser : requestedServices) {
      File outputDir=new File(args.getOutputDir(),analyser.getName().toLowerCase());
      String jobPrefix=this.getArgs().getJobPrefix() + "String_Node_Str" + analyser.getName().toLowerCase();
      if (analyser.isFast()) {
        if (!unitigAssemblies.isEmpty()) {
          jobResults.addAll(analyser.execute(unitigAssemblies,new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.conanExecutorService));
        }
        if (!contigAssemblies.isEmpty()) {
          jobResults.addAll(analyser.execute(contigAssemblies,new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.conanExecutorService));
        }
        if (!scaffoldAssemblies.isEmpty()) {
          jobResults.addAll(analyser.execute(scaffoldAssemblies,new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.conanExecutorService));
        }
      }
      File bestOutDir=analyser.isFast() ? new File(outputDir,"String_Node_Str") : outputDir;
      jobResults.addAll(analyser.execute(bestAssemblies,bestOutDir,jobPrefix,this.conanExecutorService));
    }
    stopWatch.stop();
    TaskResult taskResult=new DefaultTaskResult("String_Node_Str",true,jobResults,stopWatch.getTime() / 1000L);
    FileUtils.writeLines(new File(args.getOutputDir(),args.getJobPrefix() + "String_Node_Str"),taskResult.getOutput());
    return new DefaultExecutionResult(taskResult.getTaskName(),0,new String[]{},null,-1,new ResourceUsage(taskResult.getMaxMemUsage(),taskResult.getActualTotalRuntime(),taskResult.getTotalExternalCputime()));
  }
 catch (  ConanParameterException|IOException e) {
    throw new ProcessExecutionException(4,e);
  }
}

Fixed version (ground truth):
@Override public ExecutionResult execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  try {
    StopWatch stopWatch=new StopWatch();
    stopWatch.start();
    log.info("String_Node_Str");
    Args args=this.getArgs();
    if (!args.getOutputDir().exists()) {
      args.getOutputDir().mkdirs();
    }
    Set<AssemblyAnalyser> requestedServices=args.getAssemblyAnalysers();
    for (    AssemblyAnalyser requestedService : requestedServices) {
      requestedService.setConanExecutorService(this.conanExecutorService);
    }
    List<ExecutionResult> jobResults=new ArrayList<>();
    List<File> unitigAssemblies=new ArrayList<>();
    List<File> contigAssemblies=new ArrayList<>();
    List<File> scaffoldAssemblies=new ArrayList<>();
    List<File> bestAssemblies=new ArrayList<>();
    List<File> bubbles=new ArrayList<>();
    List<String> mappings=new ArrayList<>();
    int index=1;
    if (args.kmerCalcResults != null && args.kmerCalcResults.exists()) {
      Mass.setKmerValues(args.getKmerCalcResults(),args.getMassJobs());
    }
    for (    MassJob.Args jobArgs : args.getMassJobs()) {
      jobArgs.initialise();
      String massGroup=jobArgs.getName();
      File inputDir=new File(args.getMassDir(),massGroup);
      if (!inputDir.exists()) {
        throw new ProcessExecutionException(-1,"String_Node_Str" + massGroup + "String_Node_Str"+ inputDir.getAbsolutePath());
      }
      final File unitigsDir=jobArgs.getUnitigsDir();
      final File contigsDir=jobArgs.getContigsDir();
      final File scaffoldsDir=jobArgs.getScaffoldsDir();
      final File longestDir=jobArgs.getLongestDir();
      if (unitigsDir.exists()) {
        unitigAssemblies.addAll(AnalyseMassAssemblies.assembliesFromDir(unitigsDir));
      }
      if (contigsDir.exists()) {
        contigAssemblies.addAll(AnalyseMassAssemblies.assembliesFromDir(contigsDir));
      }
      if (scaffoldsDir.exists()) {
        scaffoldAssemblies.addAll(AnalyseMassAssemblies.assembliesFromDir(scaffoldsDir));
      }
      bestAssemblies.addAll(AnalyseMassAssemblies.assembliesFromDir(longestDir));
      for (      Assembler assembler : jobArgs.getAssemblers()) {
        File assembly=assembler.getBestAssembly();
        if (assembler.getBubbleFile() != null) {
          bubbles.add(assembler.getBubbleFile());
        }
        String run=assembler.getAssemblerArgs().getOutputDir().getName();
        String line=Integer.toString(index) + "String_Node_Str" + massGroup+ "String_Node_Str"+ run+ "String_Node_Str"+ assembly.getAbsolutePath()+ "String_Node_Str"+ (assembler.getBubbleFile() != null ? assembler.getBubbleFile().getAbsolutePath() : "String_Node_Str");
        mappings.add(line);
        index++;
      }
    }
    File unitigsDir=new File(args.getAssembliesDir(),"String_Node_Str");
    File contigsDir=new File(args.getAssembliesDir(),"String_Node_Str");
    File scaffoldsDir=new File(args.getAssembliesDir(),"String_Node_Str");
    File bestDir=new File(args.getAssembliesDir(),"String_Node_Str");
    File bubblesDir=new File(args.getAssembliesDir(),"String_Node_Str");
    this.makeLinks(unitigAssemblies,unitigsDir);
    this.makeLinks(contigAssemblies,contigsDir);
    this.makeLinks(scaffoldAssemblies,scaffoldsDir);
    this.makeLinks(bestAssemblies,bestDir);
    this.makeLinks(bubbles,bubblesDir);
    FileUtils.writeLines(args.getAssemblyLinkageFile(),mappings);
    for (    AssemblyAnalyser analyser : requestedServices) {
      File outputDir=new File(args.getOutputDir(),analyser.getName().toLowerCase());
      String jobPrefix=this.getArgs().getJobPrefix() + "String_Node_Str" + analyser.getName().toLowerCase();
      if (analyser.isFast()) {
        if (!unitigAssemblies.isEmpty()) {
          jobResults.addAll(analyser.execute(unitigAssemblies,new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.conanExecutorService));
        }
        if (!contigAssemblies.isEmpty()) {
          jobResults.addAll(analyser.execute(contigAssemblies,new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.conanExecutorService));
        }
        if (!scaffoldAssemblies.isEmpty()) {
          jobResults.addAll(analyser.execute(scaffoldAssemblies,new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.conanExecutorService));
        }
      }
      File bestOutDir=analyser.isFast() ? new File(outputDir,"String_Node_Str") : outputDir;
      jobResults.addAll(analyser.execute(bestAssemblies,bestOutDir,jobPrefix,this.conanExecutorService));
    }
    stopWatch.stop();
    TaskResult taskResult=new DefaultTaskResult("String_Node_Str",true,jobResults,stopWatch.getTime() / 1000L);
    FileUtils.writeLines(new File(args.getOutputDir(),args.getJobPrefix() + "String_Node_Str"),taskResult.getOutput());
    return new DefaultExecutionResult(taskResult.getTaskName(),0,new String[]{},null,-1,new ResourceUsage(taskResult.getMaxMemUsage(),taskResult.getActualTotalRuntime(),taskResult.getTotalExternalCputime()));
  }
 catch (  ConanParameterException|IOException e) {
    throw new ProcessExecutionException(4,e);
  }
}