Program: 59684
Project: 59684
Buggy source:
@Override public boolean execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  log.info("String_Node_Str");
  Args args=this.getArgs();
  if (!args.getOutputDir().exists()) {
    args.getOutputDir().mkdirs();
  }
  Set<AssemblyAnalyser> requestedServices=new HashSet<>();
  for (  String requestedService : this.getArgs().getAsmAnalyses()) {
    requestedServices.add(this.assemblyAnalyserFactory.create(requestedService,this.getConanProcessService()));
  }
  try {
    List<Integer> jobIds=new ArrayList<>();
    for (    AssemblyAnalyser analyser : requestedServices) {
      for (      MassJob.Args singleMassArgs : args.getMassGroups()) {
        String massGroup=singleMassArgs.getName();
        File inputDir=new File(args.getMassDir(),massGroup);
        if (!inputDir.exists()) {
          throw new ProcessExecutionException(-1,"String_Node_Str" + massGroup + "String_Node_Str"+ inputDir.getAbsolutePath());
        }
        File unitigsDir=new File(inputDir,"String_Node_Str");
        File contigsDir=new File(inputDir,"String_Node_Str");
        File scaffoldsDir=new File(inputDir,"String_Node_Str");
        File outputDir=new File(args.getOutputDir(),massGroup + "String_Node_Str" + analyser.getName().toLowerCase());
        String jobPrefix=this.getArgs().getJobPrefix() + "String_Node_Str" + massGroup+ "String_Node_Str"+ analyser.getName().toLowerCase();
        if (analyser.isFast()) {
          if (unitigsDir.exists()) {
            jobIds.addAll(analyser.execute(AnalyseMassAssemblies.assembliesFromDir(unitigsDir),new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.getArgs(),this.conanExecutorService));
          }
          if (contigsDir.exists()) {
            jobIds.addAll(analyser.execute(AnalyseMassAssemblies.assembliesFromDir(contigsDir),new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.getArgs(),this.conanExecutorService));
          }
          if (scaffoldsDir.exists()) {
            jobIds.addAll(analyser.execute(AnalyseMassAssemblies.assembliesFromDir(scaffoldsDir),new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.getArgs(),this.conanExecutorService));
          }
        }
 else {
          File seqDir=null;
          if (scaffoldsDir.exists()) {
            seqDir=scaffoldsDir;
          }
 else           if (contigsDir.exists()) {
            seqDir=contigsDir;
          }
 else           if (unitigsDir.exists()) {
            seqDir=unitigsDir;
          }
 else {
            throw new ProcessExecutionException(-2,"String_Node_Str" + massGroup);
          }
          jobIds.addAll(analyser.execute(AnalyseMassAssemblies.assembliesFromDir(seqDir),outputDir,jobPrefix,this.getArgs(),this.conanExecutorService));
        }
      }
    }
    if (this.conanExecutorService.usingScheduler() && args.isRunParallel() && !jobIds.isEmpty()) {
      log.debug("String_Node_Str");
      this.conanExecutorService.executeScheduledWait(jobIds,args.getJobPrefix() + "String_Node_Str",ExitStatus.Type.COMPLETED_ANY,args.getJobPrefix() + "String_Node_Str",args.getOutputDir());
    }
  }
 catch (  ConanParameterException|IOException e) {
    throw new ProcessExecutionException(4,e);
  }
  try {
    AssemblyStatsTable table=new AssemblyStatsTable();
    for (    AssemblyAnalyser analyser : requestedServices) {
      for (      MassJob.Args singleMassArgs : args.getMassGroups()) {
        String massGroup=singleMassArgs.getName();
        File asmDirs=new File(args.getMassDir(),massGroup);
        File aUnitigsDir=new File(asmDirs,"String_Node_Str");
        File aContigsDir=new File(asmDirs,"String_Node_Str");
        File aScaffoldsDir=new File(asmDirs,"String_Node_Str");
        File asmDir=null;
        if (aScaffoldsDir.exists()) {
          asmDir=aScaffoldsDir;
        }
 else         if (aContigsDir.exists()) {
          asmDir=aContigsDir;
        }
 else         if (aUnitigsDir.exists()) {
          asmDir=aUnitigsDir;
        }
 else {
          throw new IllegalStateException("String_Node_Str" + massGroup);
        }
        File reportDir=new File(args.getOutputDir(),massGroup + "String_Node_Str" + analyser.getName().toLowerCase());
        analyser.updateTable(table,assembliesFromDir(asmDir),reportDir,massGroup);
      }
    }
    AssemblySelector assemblySelector=new DefaultAssemblySelector(args.getWeightings());
    File selectedAssembly=assemblySelector.selectAssembly(table,args.getOrganism().getEstGenomeSize(),args.getOrganism().getEstGcPercentage());
    File outputAssembly=new File(args.getOutputDir(),"String_Node_Str");
    log.info("String_Node_Str" + selectedAssembly.getAbsolutePath());
    this.getConanProcessService().createLocalSymbolicLink(selectedAssembly,outputAssembly);
    File finalFile=new File(args.getOutputDir(),"String_Node_Str");
    table.save(finalFile);
    log.debug("String_Node_Str" + finalFile.getAbsolutePath());
  }
 catch (  IOException ioe) {
    throw new ProcessExecutionException(5,ioe);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  log.info("String_Node_Str");
  Args args=this.getArgs();
  if (!args.getOutputDir().exists()) {
    args.getOutputDir().mkdirs();
  }
  Set<AssemblyAnalyser> requestedServices=new HashSet<>();
  for (  String requestedService : this.getArgs().getAsmAnalyses()) {
    requestedServices.add(this.assemblyAnalyserFactory.create(requestedService,this.getConanProcessService()));
  }
  try {
    List<Integer> jobIds=new ArrayList<>();
    for (    AssemblyAnalyser analyser : requestedServices) {
      for (      MassJob.Args singleMassArgs : args.getMassGroups()) {
        String massGroup=singleMassArgs.getName();
        File inputDir=new File(args.getMassDir(),massGroup);
        if (!inputDir.exists()) {
          throw new ProcessExecutionException(-1,"String_Node_Str" + massGroup + "String_Node_Str"+ inputDir.getAbsolutePath());
        }
        File unitigsDir=new File(inputDir,"String_Node_Str");
        File contigsDir=new File(inputDir,"String_Node_Str");
        File scaffoldsDir=new File(inputDir,"String_Node_Str");
        File outputDir=new File(args.getOutputDir(),massGroup + "String_Node_Str" + analyser.getName().toLowerCase());
        String jobPrefix=this.getArgs().getJobPrefix() + "String_Node_Str" + massGroup+ "String_Node_Str"+ analyser.getName().toLowerCase();
        if (analyser.isFast()) {
          if (unitigsDir.exists()) {
            jobIds.addAll(analyser.execute(AnalyseMassAssemblies.assembliesFromDir(unitigsDir),new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.getArgs(),this.conanExecutorService));
          }
          if (contigsDir.exists()) {
            jobIds.addAll(analyser.execute(AnalyseMassAssemblies.assembliesFromDir(contigsDir),new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.getArgs(),this.conanExecutorService));
          }
          if (scaffoldsDir.exists()) {
            jobIds.addAll(analyser.execute(AnalyseMassAssemblies.assembliesFromDir(scaffoldsDir),new File(outputDir,"String_Node_Str"),jobPrefix + "String_Node_Str",this.getArgs(),this.conanExecutorService));
          }
        }
 else {
          File seqDir=null;
          if (scaffoldsDir.exists()) {
            seqDir=scaffoldsDir;
          }
 else           if (contigsDir.exists()) {
            seqDir=contigsDir;
          }
 else           if (unitigsDir.exists()) {
            seqDir=unitigsDir;
          }
 else {
            throw new ProcessExecutionException(-2,"String_Node_Str" + massGroup);
          }
          jobIds.addAll(analyser.execute(AnalyseMassAssemblies.assembliesFromDir(seqDir),outputDir,jobPrefix,this.getArgs(),this.conanExecutorService));
        }
      }
    }
    if (this.conanExecutorService.usingScheduler() && args.isRunParallel() && !jobIds.isEmpty()) {
      log.debug("String_Node_Str");
      this.conanExecutorService.executeScheduledWait(jobIds,args.getJobPrefix() + "String_Node_Str",ExitStatus.Type.COMPLETED_ANY,args.getJobPrefix() + "String_Node_Str",args.getOutputDir());
    }
  }
 catch (  ConanParameterException|IOException e) {
    throw new ProcessExecutionException(4,e);
  }
  try {
    AssemblyStatsTable table=new AssemblyStatsTable();
    for (    AssemblyAnalyser analyser : requestedServices) {
      for (      MassJob.Args singleMassArgs : args.getMassGroups()) {
        String massGroup=singleMassArgs.getName();
        File asmDirs=new File(args.getMassDir(),massGroup);
        File aUnitigsDir=new File(asmDirs,"String_Node_Str");
        File aContigsDir=new File(asmDirs,"String_Node_Str");
        File aScaffoldsDir=new File(asmDirs,"String_Node_Str");
        File asmDir=null;
        if (aScaffoldsDir.exists()) {
          asmDir=aScaffoldsDir;
        }
 else         if (aContigsDir.exists()) {
          asmDir=aContigsDir;
        }
 else         if (aUnitigsDir.exists()) {
          asmDir=aUnitigsDir;
        }
 else {
          throw new IllegalStateException("String_Node_Str" + massGroup);
        }
        File reportDir=new File(args.getOutputDir(),massGroup + "String_Node_Str" + analyser.getName().toLowerCase());
        analyser.updateTable(table,assembliesFromDir(asmDir),analyser.isFast() ? new File(reportDir,asmDir.getName()) : reportDir,massGroup);
      }
    }
    AssemblySelector assemblySelector=new DefaultAssemblySelector(args.getWeightings());
    File selectedAssembly=assemblySelector.selectAssembly(table,args.getOrganism().getEstGenomeSize(),args.getOrganism().getEstGcPercentage(),args.getMassDir());
    File outputAssembly=new File(args.getOutputDir(),"String_Node_Str");
    log.info("String_Node_Str" + selectedAssembly.getAbsolutePath());
    this.getConanProcessService().createLocalSymbolicLink(selectedAssembly,outputAssembly);
    File finalFile=new File(args.getOutputDir(),"String_Node_Str");
    table.save(finalFile);
    log.debug("String_Node_Str" + finalFile.getAbsolutePath());
  }
 catch (  IOException ioe) {
    throw new ProcessExecutionException(5,ioe);
  }
  return true;
}