nus-yam/ex-repair huggingface dataset:
Program: 59680
Project: 59680
Buggy source:
public void init() throws IOException {
  this.clearProcessList();
  this.addProcesses(this.args.getStages().createProcesses(this.conanExecutorService));
  if (!this.isOperational(new DefaultExecutionContext(new Local(),null,this.args.getExecutionContext().getExternalProcessConfiguration()))) {
    throw new IOException("String_Node_Str" + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void init() throws IOException {
  this.clearProcessList();
  this.addProcesses(this.args.getStages().createProcesses(this.conanExecutorService));
  if (this.args.isDoInitialChecks() && !this.isOperational(new DefaultExecutionContext(new Local(),null,this.args.getExecutionContext().getExternalProcessConfiguration()))) {
    throw new IOException("String_Node_Str" + "String_Node_Str");
  }
}
Program: 59681
Project: 59681
Buggy source:
protected AssemblyEnhancer makeStage(Args args,List<Library> libs) throws IOException {
  AssemblyEnhancer proc=AssemblyEnhancerFactory.create(args.getTool(),args.getInputAssembly(),args.getOutputDir(),"String_Node_Str" + args.getIndex(),libs,args.getThreads(),args.getMemory(),args.getOtherArgs(),this.conanExecutorService);
  if (proc == null)   throw new IOException("String_Node_Str" + args.getTool());
  return proc;
}

Fixed version (ground truth):
protected AssemblyEnhancer makeStage(Args args,List<Library> libs) throws IOException {
  return AssemblyEnhancerFactory.create(args.getTool(),args.getInputAssembly(),args.getOutputDir(),"String_Node_Str" + args.getIndex(),libs,args.getThreads(),args.getMemory(),args.getOtherArgs(),this.conanExecutorService);
}
Program: 59682
Project: 59682
Buggy source:
@Override public boolean isOperational(ExecutionContext executionContext){
  Args args=(Args)this.getProcessArgs();
  AssemblyEnhancer proc=null;
  try {
    proc=this.makeStage(args,null);
  }
 catch (  IOException e) {
    log.warn("String_Node_Str");
    return false;
  }
  if (proc == null) {
    log.warn("String_Node_Str" + args.getTool() + "String_Node_Str");
    return false;
  }
  return proc.isOperational(executionContext);
}

Fixed version (ground truth):
@Override public boolean isOperational(ExecutionContext executionContext){
  Args args=(Args)this.getProcessArgs();
  AssemblyEnhancer proc=null;
  try {
    proc=this.makeStage(args,null);
  }
 catch (  IOException e) {
    log.warn("String_Node_Str" + args.getIndex() + "String_Node_Str"+ args.getTool()+ "String_Node_Str");
    return false;
  }
  if (proc == null) {
    log.warn("String_Node_Str" + args.getIndex() + "String_Node_Str"+ args.getTool()+ "String_Node_Str");
    return false;
  }
  return proc.isOperational(executionContext);
}
Program: 59683
Project: 59683
Buggy source:
protected List<Library> validateInputs(int ampIndex,List<ReadsInput> inputs,List<Library> allLibraries,List<Mecq.EcqArgs> allMecqs) throws IOException {
  List<Library> selectedLibs=new ArrayList<>();
  for (  ReadsInput mi : inputs) {
    Library lib=mi.findLibrary(allLibraries);
    Mecq.EcqArgs ecqArgs=mi.findMecq(allMecqs);
    if (lib == null) {
      throw new IOException("String_Node_Str" + mi.getLib() + "String_Node_Str"+ ampIndex);
    }
    if (ecqArgs == null) {
      if (mi.getEcq().equalsIgnoreCase(Mecq.EcqArgs.RAW)) {
        selectedLibs.add(lib);
      }
 else {
        throw new IOException("String_Node_Str" + mi.getEcq() + "String_Node_Str"+ ampIndex);
      }
    }
 else {
      Library modLib=lib.copy();
      AbstractErrorCorrector ec=ecqArgs.makeErrorCorrector(modLib);
      List<File> files=ec.getArgs().getCorrectedFiles();
      if (modLib.isPairedEnd()) {
        if (files.size() < 2 || files.size() > 3) {
          throw new IOException("String_Node_Str" + modLib.getName() + "String_Node_Str"+ ecqArgs.getName()+ "String_Node_Str");
        }
        modLib.setFiles(files.get(0),files.get(1));
      }
 else {
        if (files.size() != 1) {
          throw new IOException("String_Node_Str" + modLib.getName() + "String_Node_Str"+ ecqArgs.getName()+ "String_Node_Str");
        }
        modLib.setFiles(files.get(0),null);
      }
      selectedLibs.add(modLib);
    }
    log.info("String_Node_Str" + mi.getLib() + "String_Node_Str"+ mi.getEcq()+ "String_Node_Str"+ ampIndex);
  }
  return selectedLibs;
}

Fixed version (ground truth):
protected List<Library> validateInputs(int ampIndex,List<ReadsInput> inputs,List<Library> allLibraries,List<Mecq.EcqArgs> allMecqs) throws IOException {
  List<Library> selectedLibs=new ArrayList<>();
  for (  ReadsInput mi : inputs) {
    Library lib=mi.findLibrary(allLibraries);
    Mecq.EcqArgs ecqArgs=mi.findMecq(allMecqs);
    if (lib == null) {
      throw new IOException("String_Node_Str" + mi.getLib() + "String_Node_Str"+ ampIndex);
    }
    if (ecqArgs == null) {
      if (mi.getEcq().equalsIgnoreCase(Mecq.EcqArgs.RAW)) {
        selectedLibs.add(lib);
      }
 else {
        throw new IOException("String_Node_Str" + mi.getEcq() + "String_Node_Str"+ ampIndex);
      }
    }
 else {
      Library modLib=lib.copy();
      AbstractErrorCorrector ec=ecqArgs.makeErrorCorrector(modLib);
      List<File> files=ec.getArgs().getCorrectedFiles();
      if (modLib.isPairedEnd()) {
        if (files.size() < 2 || files.size() > 3) {
          throw new IOException("String_Node_Str" + modLib.getName() + "String_Node_Str"+ ecqArgs.getName()+ "String_Node_Str");
        }
        modLib.setFiles(files.get(0),files.get(1));
      }
 else {
        if (files.size() != 1) {
          throw new IOException("String_Node_Str" + modLib.getName() + "String_Node_Str"+ ecqArgs.getName()+ "String_Node_Str");
        }
        modLib.setFiles(files.get(0),null);
      }
      selectedLibs.add(modLib);
    }
    log.info("String_Node_Str" + mi.getLib() + "String_Node_Str"+ mi.getEcq());
  }
  return selectedLibs;
}
Program: 59685
Project: 59685
Buggy source:
File selectAssembly(AssemblyStatsTable table,long estimatedGenomeSize,double estimatedGcPercentage);

Fixed version (ground truth):
File selectAssembly(AssemblyStatsTable table,long estimatedGenomeSize,double estimatedGcPercentage,File massDir);
Program: 59686
Project: 59686
Buggy source:
@Override public File selectAssembly(AssemblyStatsTable table,long estimatedGenomeSize,double estimatedGcPercentage){
  AssemblyStatsMatrix matrix=table.generateStatsMatrix();
  matrix.normalise(estimatedGenomeSize,estimatedGcPercentage);
  log.debug("String_Node_Str");
  matrix.weight(weightings);
  double[] scores=matrix.calcScores();
  log.debug("String_Node_Str");
  table.addScores(scores);
  log.debug("String_Node_Str" + ArrayUtils.toString(scores));
  log.info("String_Node_Str" + table.getBest().toString());
  return new File(table.getBest().getFilePath());
}

Fixed version (ground truth):
@Override public File selectAssembly(AssemblyStatsTable table,long estimatedGenomeSize,double estimatedGcPercentage,File massDir){
  AssemblyStatsMatrix matrix=table.generateStatsMatrix();
  matrix.normalise(estimatedGenomeSize,estimatedGcPercentage);
  log.debug("String_Node_Str");
  matrix.weight(weightings);
  double[] scores=matrix.calcScores();
  log.debug("String_Node_Str");
  table.addScores(scores);
  log.debug("String_Node_Str" + ArrayUtils.toString(scores));
  log.info("String_Node_Str" + table.getBest().toString());
  File massGroupDir=new File(massDir,table.getBest().getDataset());
  File aUnitigsDir=new File(massGroupDir,"String_Node_Str");
  File aContigsDir=new File(massGroupDir,"String_Node_Str");
  File aScaffoldsDir=new File(massGroupDir,"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" + table.getBest().getDataset());
  }
  return new File(asmDir,table.getBest().getFilePath());
}
Program: 59687
Project: 59687
Buggy source:
public AnalyseReads(ConanExecutorService ces,Args args){
  super("String_Node_Str",args,new Params());
}

Fixed version (ground truth):
public AnalyseReads(ConanExecutorService ces,Args args){
  super("String_Node_Str",args,new Params(),ces);
}
Program: 59688
Project: 59688
Buggy source:
public ExecutionResult executeSubsampler(double probability,long timestamp,File input,File output,String jobName,boolean runParallel) throws ProcessExecutionException, InterruptedException, IOException, ConanParameterException {
  SubsamplerV1_0Args ssArgs=new SubsamplerV1_0Args();
  ssArgs.setInputFile(input);
  ssArgs.setOutputFile(output);
  ssArgs.setLogFile(new File(output.getParentFile(),output.getName() + "String_Node_Str"));
  ssArgs.setSeed(timestamp);
  ssArgs.setProbability(probability);
  SubsamplerV1_0Process ssProc=new SubsamplerV1_0Process(ssArgs);
  return this.conanExecutorService.executeProcess(ssProc,output.getParentFile(),jobName,1,2000,this.conanExecutorService.usingScheduler() ? !runParallel : true);
}

Fixed version (ground truth):
public ExecutionResult executeSubsampler(double probability,long timestamp,File input,File output,String jobName,boolean runParallel) throws ProcessExecutionException, InterruptedException, IOException, ConanParameterException {
  SubsamplerV1_0Args ssArgs=new SubsamplerV1_0Args();
  ssArgs.setInputFile(input);
  ssArgs.setOutputFile(output);
  ssArgs.setLogFile(new File(output.getParentFile(),output.getName() + "String_Node_Str"));
  ssArgs.setSeed(timestamp);
  ssArgs.setProbability(probability);
  SubsamplerV1_0Process ssProc=new SubsamplerV1_0Process(ssArgs);
  return this.conanExecutorService.executeProcess(ssProc,output.getParentFile(),jobName,1,2000,this.conanExecutorService.usingScheduler() ? runParallel : false);
}
Program: 59689
Project: 59689
Buggy source:
@Test public void testConfigLoad() throws IOException {
  File cfgFile=FileUtils.toFile(this.getClass().getResource("String_Node_Str"));
  File outDir=temp.newFolder("String_Node_Str");
  String jobPrefix="String_Node_Str";
  RampartArgs args=new RampartArgs(cfgFile,outDir,jobPrefix,RampartStageList.parse("String_Node_Str"),null);
  assertTrue(true);
}

Fixed version (ground truth):
@Test public void testConfigLoad() throws IOException {
  File cfgFile=FileUtils.toFile(this.getClass().getResource("String_Node_Str"));
  File outDir=temp.newFolder("String_Node_Str");
  String jobPrefix="String_Node_Str";
  RampartArgs args=new RampartArgs(cfgFile,outDir,jobPrefix,RampartStageList.parse("String_Node_Str"),null,true);
  assertTrue(true);
}
Program: 59691
Project: 59691
Buggy source:
@Override public boolean execute(ExecutionContext executionContext) throws InterruptedException, ProcessExecutionException {
  AmpArgs args=(AmpArgs)this.getProcessArgs();
  this.ampExecutor.initialise(this.conanProcessService,executionContext);
  AmpPipeline ampPipeline=new AmpPipeline();
  ampPipeline.setConanProcessService(this.getConanProcessService());
  ampPipeline.configureProcesses();
  args.getAssembliesDir().mkdirs();
  this.ampExecutor.createInitialLink(args.getInputAssembly(),args.getAssembliesDir());
  ConanUser rampartUser=new GuestUser("String_Node_Str");
  ConanTask<AmpPipeline> ampTask=new DefaultTaskFactory().createTask(ampPipeline,0,ampPipeline.getArgs().getArgMap(),ConanTask.Priority.HIGHEST,rampartUser);
  ampTask.setId("String_Node_Str");
  ampTask.submit();
  try {
    ampTask.execute(executionContext);
  }
 catch (  TaskExecutionException e) {
    throw new ProcessExecutionException(-1,e);
  }
  try {
    this.ampExecutor.executeAnalysisJob(args);
  }
 catch (  ProcessExecutionException pee) {
    log.error(pee.getMessage(),pee);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(ExecutionContext executionContext) throws InterruptedException, ProcessExecutionException {
  AmpArgs args=(AmpArgs)this.getProcessArgs();
  this.ampExecutor.initialise(this.conanProcessService,executionContext);
  AmpPipeline ampPipeline=new AmpPipeline();
  ampPipeline.setConanProcessService(this.getConanProcessService());
  ampPipeline.configureProcesses();
  log.debug("String_Node_Str" + ampPipeline.getProcesses().size() + "String_Node_Str");
  args.getAssembliesDir().mkdirs();
  this.ampExecutor.createInitialLink(args.getInputAssembly(),args.getAssembliesDir());
  ConanUser rampartUser=new GuestUser("String_Node_Str");
  ConanTask<AmpPipeline> ampTask=new DefaultTaskFactory().createTask(ampPipeline,0,ampPipeline.getArgs().getArgMap(),ConanTask.Priority.HIGHEST,rampartUser);
  ampTask.setId("String_Node_Str");
  ampTask.submit();
  try {
    ampTask.execute(executionContext);
  }
 catch (  TaskExecutionException e) {
    throw new ProcessExecutionException(-1,e);
  }
  try {
    this.ampExecutor.executeAnalysisJob(args);
  }
 catch (  ProcessExecutionException pee) {
    log.error(pee.getMessage(),pee);
  }
  return true;
}
Program: 59692
Project: 59692
Buggy source:
public File getFile1(List<EcqArgs> allMecqs){
  return getFiles(allMecqs).get(0);
}

Fixed version (ground truth):
public File getFile1(List<EcqArgs> allEcqs,List<Library> allLibraries){
  return getFiles(allEcqs,allLibraries).get(0);
}
Program: 59693
Project: 59693
Buggy source:
public File getFile2(List<EcqArgs> allMecqs){
  return getFiles(allMecqs).get(0);
}

Fixed version (ground truth):
public File getFile2(List<EcqArgs> allEcqs,List<Library> allLibraries){
  return getFiles(allEcqs,allLibraries).get(0);
}
Program: 59694
Project: 59694
Buggy source:
public List<File> getFiles(List<EcqArgs> allMecqs){
  EcqArgs actualMecq=findMecq(allMecqs);
  return actualMecq.getOutputFiles(this.lib.trim());
}

Fixed version (ground truth):
public List<File> getFiles(List<EcqArgs> allEcqs,List<Library> allLibraries){
  EcqArgs actualEcq=findMecq(allEcqs);
  Library lib=findLibrary(allLibraries);
  return actualEcq.getOutputFiles(lib);
}
Program: 59695
Project: 59695
Buggy source:
public MassInput(Element ele){
  this.mecq=XmlHelper.getTextValue(ele,KEY_ATTR_MECQ);
  this.lib=XmlHelper.getTextValue(ele,KEY_ATTR_LIB);
}

Fixed version (ground truth):
public MassInput(Element ele){
  this.ecq=XmlHelper.getTextValue(ele,KEY_ATTR_ECQ);
  this.lib=XmlHelper.getTextValue(ele,KEY_ATTR_LIB);
}
Program: 59696
Project: 59696
Buggy source:
public EcqArgs findMecq(List<EcqArgs> allMecqs){
  if (allMecqs == null)   return null;
  for (  EcqArgs currentMecq : allMecqs) {
    if (currentMecq.getName().equalsIgnoreCase(this.mecq.trim())) {
      return currentMecq;
    }
  }
  return null;
}

Fixed version (ground truth):
public EcqArgs findMecq(List<EcqArgs> allMecqs){
  if (allMecqs == null)   return null;
  for (  EcqArgs currentMecq : allMecqs) {
    if (currentMecq.getName().equalsIgnoreCase(this.ecq.trim())) {
      return currentMecq;
    }
  }
  return null;
}
Program: 59697
Project: 59697
Buggy source:
protected List<Library> validateInputs(String massName,List<MassInput> inputs,List<Library> allLibraries,List<EcqArgs> allMecqs) throws IOException {
  List<Library> selectedLibs=new ArrayList<Library>();
  for (  MassInput mi : inputs) {
    Library lib=mi.findLibrary(allLibraries);
    EcqArgs ecqArgs=mi.findMecq(allMecqs);
    if (lib == null) {
      throw new IOException("String_Node_Str" + mi.getLib() + "String_Node_Str"+ massName);
    }
    if (ecqArgs == null) {
      if (mi.getMecq().equalsIgnoreCase(EcqArgs.RAW)) {
        selectedLibs.add(lib);
      }
 else {
        throw new IOException("String_Node_Str" + mi.getMecq() + "String_Node_Str"+ massName);
      }
    }
 else {
      Library modLib=lib.copy();
      List<File> files=ecqArgs.getOutputFiles(lib.getName());
      if (modLib.isPairedEnd()) {
        if (files.size() != 2) {
          throw new IOException("String_Node_Str" + modLib.getName() + "String_Node_Str"+ ecqArgs.getName()+ "String_Node_Str");
        }
        modLib.setFiles(files.get(0),files.get(1));
      }
 else {
        if (files.size() != 1) {
          throw new IOException("String_Node_Str" + modLib.getName() + "String_Node_Str"+ ecqArgs.getName()+ "String_Node_Str");
        }
        modLib.setFiles(files.get(0),null);
      }
      selectedLibs.add(modLib);
    }
  }
  return selectedLibs;
}

Fixed version (ground truth):
protected List<Library> validateInputs(String massName,List<MassInput> inputs,List<Library> allLibraries,List<EcqArgs> allMecqs) throws IOException {
  List<Library> selectedLibs=new ArrayList<Library>();
  for (  MassInput mi : inputs) {
    Library lib=mi.findLibrary(allLibraries);
    EcqArgs ecqArgs=mi.findMecq(allMecqs);
    if (lib == null) {
      throw new IOException("String_Node_Str" + mi.getLib() + "String_Node_Str"+ massName);
    }
    if (ecqArgs == null) {
      if (mi.getEcq().equalsIgnoreCase(EcqArgs.RAW)) {
        selectedLibs.add(lib);
      }
 else {
        throw new IOException("String_Node_Str" + mi.getEcq() + "String_Node_Str"+ massName);
      }
    }
 else {
      Library modLib=lib.copy();
      List<File> files=ecqArgs.getOutputFiles(modLib);
      if (modLib.isPairedEnd()) {
        if (files.size() != 2 || files.size() != 3) {
          throw new IOException("String_Node_Str" + modLib.getName() + "String_Node_Str"+ ecqArgs.getName()+ "String_Node_Str");
        }
        modLib.setFiles(files.get(0),files.get(1));
      }
 else {
        if (files.size() != 1) {
          throw new IOException("String_Node_Str" + modLib.getName() + "String_Node_Str"+ ecqArgs.getName()+ "String_Node_Str");
        }
        modLib.setFiles(files.get(0),null);
      }
      selectedLibs.add(modLib);
    }
    log.info("String_Node_Str" + mi.getLib() + "String_Node_Str"+ mi.getEcq()+ "String_Node_Str"+ massName);
  }
  return selectedLibs;
}
Program: 59698
Project: 59698
Buggy source:
/** 
 * Create an Assembler from the Mass args and details of the current context
 * @param massArgs
 * @param k
 * @param cvg
 * @param selectedLibs
 * @param outputDir
 * @return An assembler built using a combinarion of single mass args and user specified args
 */
protected Assembler makeAssembler(SingleMassArgs massArgs,int k,int cvg,List<Library> selectedLibs,File outputDir){
  Assembler asm=AssemblerFactory.valueOf(massArgs.getTool()).create();
  AssemblerArgs asmArgs=asm.getArgs();
  asmArgs.setLibraries(selectedLibs);
  asmArgs.setDesiredCoverage(cvg);
  asmArgs.setKmer(k);
  asmArgs.setThreads(massArgs.getThreads());
  asmArgs.setMemory(massArgs.getMemory());
  asmArgs.setOrganism(massArgs.getOrganism());
  asmArgs.setOutputDir(outputDir);
  return asm;
}

Fixed version (ground truth):
/** 
 * Create an Assembler from the Mass args and details of the current context
 * @param massArgs
 * @param k
 * @param cvg
 * @param selectedLibs
 * @param outputDir
 * @return An assembler built using a combination of single mass args and user specified args
 */
protected Assembler makeAssembler(SingleMassArgs massArgs,int k,int cvg,List<Library> selectedLibs,File outputDir){
  Assembler asm=AssemblerFactory.valueOf(massArgs.getTool()).create();
  AssemblerArgs asmArgs=asm.getArgs();
  asmArgs.setLibraries(selectedLibs);
  asmArgs.setDesiredCoverage(cvg);
  asmArgs.setKmer(k);
  asmArgs.setThreads(massArgs.getThreads());
  asmArgs.setMemory(massArgs.getMemory());
  asmArgs.setOrganism(massArgs.getOrganism());
  asmArgs.setOutputDir(outputDir);
  return asm;
}
Program: 59699
Project: 59699
Buggy source:
protected CoverageRange validateCoverageRange(String massName,Organism organism,CoverageRange coverageRange) throws CommandExecutionException {
  if (coverageRange == null) {
    CoverageRange defaultCoverageRange=new CoverageRange();
    log.info("String_Node_Str" + massName + "String_Node_Str"+ defaultCoverageRange.toString());
    return defaultCoverageRange;
  }
 else   if (organism == null || organism.getEstGenomeSize() <= 0) {
    CoverageRange defaultCoverageRange=new CoverageRange();
    log.info("String_Node_Str" + defaultCoverageRange.toString());
    return defaultCoverageRange;
  }
 else   if (coverageRange.validate()) {
    log.info("String_Node_Str" + massName + "String_Node_Str"+ coverageRange.toString());
    return coverageRange;
  }
 else {
    throw new CommandExecutionException("String_Node_Str" + coverageRange.toString() + "String_Node_Str"+ massName);
  }
}

Fixed version (ground truth):
protected CoverageRange validateCoverageRange(String massName,Organism organism,CoverageRange coverageRange) throws CommandExecutionException {
  if (coverageRange == null) {
    CoverageRange defaultCoverageRange=new CoverageRange();
    log.info("String_Node_Str" + massName + "String_Node_Str"+ defaultCoverageRange.toString());
    return defaultCoverageRange;
  }
 else   if (organism == null || organism.getEstGenomeSize() <= 0) {
    CoverageRange defaultCoverageRange=new CoverageRange();
    log.info("String_Node_Str" + "String_Node_Str" + defaultCoverageRange.toString());
    return defaultCoverageRange;
  }
 else   if (coverageRange.validate()) {
    log.info("String_Node_Str" + massName + "String_Node_Str"+ coverageRange.toString());
    return coverageRange;
  }
 else {
    throw new CommandExecutionException("String_Node_Str" + coverageRange.toString() + "String_Node_Str"+ massName);
  }
}
Program: 59700
Project: 59700
Buggy source:
public List<File> getOutputFiles(String libName){
  Library lib=this.findLibrary(libName);
  return lib.getFiles();
}

Fixed version (ground truth):
public List<File> getOutputFiles(Library lib){
  ErrorCorrector ec=ErrorCorrectorFactory.createQualityTrimmer(this.getTool());
  List<File> altInputFiles=new ArrayList<>();
  if (lib.isPairedEnd()) {
    altInputFiles.add(new File(outputDir,lib.getFile1().getName()));
    altInputFiles.add(new File(outputDir,lib.getFile2().getName()));
  }
 else {
    altInputFiles.add(new File(outputDir,lib.getFile1().getName()));
  }
  ec.getArgs().setFromLibrary(lib,altInputFiles);
  return ec.getArgs().getCorrectedFiles();
}
Program: 59701
Project: 59701
Buggy source:
/** 
 * Using a set of ECQ specific args, creates an ErrorCorrector object for execution
 * @param mecqArgs
 * @param inputLib
 * @param outputDir
 * @return
 */
public ErrorCorrector makeErrorCorrector(EcqArgs mecqArgs,Library inputLib,File outputDir){
  ErrorCorrector ec=ErrorCorrectorFactory.valueOf(mecqArgs.getTool()).create();
  ErrorCorrectorArgs ecArgs=ec.getArgs();
  ecArgs.setMinLength(mecqArgs.getMinLen());
  ecArgs.setQualityThreshold(mecqArgs.getMinQual());
  ecArgs.setKmer(mecqArgs.getKmer());
  ecArgs.setThreads(mecqArgs.getThreads());
  ecArgs.setMemoryGb(mecqArgs.getMemory());
  ecArgs.setOutputDir(outputDir);
  if (inputLib.isPairedEnd()) {
    ((ErrorCorrectorPairedEndArgs)ec.getArgs()).setFromLibrary(inputLib,new File(outputDir,inputLib.getFile1().getName()),new File(outputDir,inputLib.getFile2().getName()));
  }
 else {
    ((ErrorCorrectorSingleEndArgs)ec.getArgs()).setFromLibrary(inputLib,new File(outputDir,inputLib.getFile1().getName()));
  }
  return ec;
}

Fixed version (ground truth):
/** 
 * Using a set of ECQ specific args, creates an ErrorCorrector object for execution
 * @param mecqArgs
 * @param inputLib
 * @param outputDir
 * @return
 */
public ErrorCorrector makeErrorCorrector(EcqArgs mecqArgs,Library inputLib,File outputDir){
  ErrorCorrector ec=ErrorCorrectorFactory.valueOf(mecqArgs.getTool()).create();
  ErrorCorrectorArgs ecArgs=ec.getArgs();
  ecArgs.setMinLength(mecqArgs.getMinLen());
  ecArgs.setQualityThreshold(mecqArgs.getMinQual());
  ecArgs.setKmer(mecqArgs.getKmer());
  ecArgs.setThreads(mecqArgs.getThreads());
  ecArgs.setMemoryGb(mecqArgs.getMemory());
  ecArgs.setOutputDir(outputDir);
  List<File> altInputFiles=new ArrayList<>();
  if (inputLib.isPairedEnd()) {
    altInputFiles.add(new File(outputDir,inputLib.getFile1().getName()));
    altInputFiles.add(new File(outputDir,inputLib.getFile2().getName()));
  }
 else {
    altInputFiles.add(new File(outputDir,inputLib.getFile1().getName()));
  }
  ec.getArgs().setFromLibrary(inputLib,altInputFiles);
  return ec;
}
Program: 59702
Project: 59702
Buggy source:
@Override public void executeAnalysisJob(AmpArgs args) throws InterruptedException, ProcessExecutionException, IOException, CommandExecutionException {
  if (args.getStatsLevels() != null) {
    this.statsExecutor.dispatchAnalyserJobs(args.getStatsLevels(),args.getAssembliesDir(),1,args.getOrganism() != null ? args.getOrganism().getEstGenomeSize() : 0,true,args.isRunParallel(),null,args.getJobPrefix() + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void executeAnalysisJob(AmpArgs args) throws InterruptedException, ProcessExecutionException, IOException, CommandExecutionException {
  if (args.getStatsLevels() != null) {
    this.statsExecutor.dispatchAnalyserJobs(args.getStatsLevels(),args.getAssembliesDir(),null,1,0,args.getOrganism(),true,args.isRunParallel(),null,args.getJobPrefix() + "String_Node_Str");
  }
}
Program: 59703
Project: 59703
Buggy source:
@Test public void testGetOutputFiles(){
  EcqArgs args=new EcqArgs();
  args.setTool("String_Node_Str");
  args.setOutputDir(new File("String_Node_Str"));
  Library lib=new Library();
  lib.setFiles(new File("String_Node_Str"),new File("String_Node_Str"));
  ErrorCorrector ec=new MecqExecutorImpl().makeErrorCorrector(args,lib,new File("String_Node_Str"));
  List<File> files=args.getOutputFiles(ec);
  assertTrue(files.size() == 3);
}

Fixed version (ground truth):
@Test public void testGetOutputFiles(){
  EcqArgs args=new EcqArgs();
  args.setTool("String_Node_Str");
  args.setOutputDir(new File("String_Node_Str"));
  Library lib=new Library();
  lib.setFiles(new File("String_Node_Str"),new File("String_Node_Str"));
  ErrorCorrector ec=new MecqProcess().makeErrorCorrector(args,lib,new File("String_Node_Str"));
  List<File> files=args.getOutputFiles(ec);
  assertTrue(files.size() == 3);
}
Program: 59704
Project: 59704
Buggy source:
/** 
 * Creates a new RAMPART instance based on command line arguments
 * @param args List of command line arguments containing information to setup RAMPART
 * @throws ParseException Thrown if an invalid command line was encountered
 */
public Rampart(String[] args) throws ParseException {
  CommandLine cmdLine=new PosixParser().parse(createOptions(),args,true);
  this.help=cmdLine.hasOption(OPT_HELP);
  this.verbose=cmdLine.hasOption(OPT_VERBOSE);
  this.environmentConfig=cmdLine.hasOption(OPT_ENV_CONFIG) ? new File(cmdLine.getOptionValue(OPT_ENV_CONFIG)) : DEFAULT_ENV_CONFIG;
  this.logConfig=cmdLine.hasOption(OPT_LOG_CONFIG) ? new File(cmdLine.getOptionValue(OPT_LOG_CONFIG)) : DEFAULT_LOG_CONFIG;
  this.weightingsFile=cmdLine.hasOption(OPT_WEIGHTINGS) ? new File(cmdLine.getOptionValue(OPT_WEIGHTINGS)) : DEFAULT_WEIGHTINGS_FILE;
  this.outputDir=cmdLine.hasOption(OPT_OUTPUT_DIR) ? new File(cmdLine.getOptionValue(OPT_OUTPUT_DIR)) : DEFAULT_OUTPUT_DIR;
  this.jobPrefix=cmdLine.hasOption(OPT_JOB_PREFIX) ? cmdLine.getOptionValue(OPT_JOB_PREFIX) : DEFAULT_JOB_PREFIX;
  this.stages=cmdLine.hasOption(OPT_STAGES) ? cmdLine.getOptionValue(OPT_STAGES) : DEFAULT_STAGES;
}

Fixed version (ground truth):
/** 
 * Creates a new RAMPART instance based on command line arguments
 * @param args List of command line arguments containing information to setup RAMPART
 * @throws ParseException Thrown if an invalid command line was encountered
 */
public Rampart(String[] args) throws ParseException {
  CommandLine cmdLine=new PosixParser().parse(createOptions(),args,true);
  this.help=cmdLine.hasOption(OPT_HELP);
  this.verbose=cmdLine.hasOption(OPT_VERBOSE);
  this.environmentConfig=cmdLine.hasOption(OPT_ENV_CONFIG) ? new File(cmdLine.getOptionValue(OPT_ENV_CONFIG)) : DEFAULT_ENV_CONFIG;
  this.logConfig=cmdLine.hasOption(OPT_LOG_CONFIG) ? new File(cmdLine.getOptionValue(OPT_LOG_CONFIG)) : DEFAULT_LOG_CONFIG;
  this.weightingsFile=cmdLine.hasOption(OPT_WEIGHTINGS) ? new File(cmdLine.getOptionValue(OPT_WEIGHTINGS)) : DEFAULT_WEIGHTINGS_FILE;
  this.outputDir=cmdLine.hasOption(OPT_OUTPUT_DIR) ? new File(cmdLine.getOptionValue(OPT_OUTPUT_DIR)) : DEFAULT_OUTPUT_DIR;
  this.jobPrefix=cmdLine.hasOption(OPT_JOB_PREFIX) ? cmdLine.getOptionValue(OPT_JOB_PREFIX) : DEFAULT_JOB_PREFIX;
  this.stages=cmdLine.hasOption(OPT_STAGES) ? cmdLine.getOptionValue(OPT_STAGES) : DEFAULT_STAGES;
  if (cmdLine.getArgs().length != 1)   throw new ParseException("String_Node_Str");
  this.jobConfig=new File(cmdLine.getArgs()[0]);
}
Program: 59705
Project: 59705
Buggy source:
@Override public boolean execute(ExecutionContext executionContext) throws InterruptedException, ProcessExecutionException {
  AmpArgs args=(AmpArgs)this.getProcessArgs();
  this.ampExecutor.initialise(this.conanProcessService,executionContext);
  AmpPipeline ampPipeline=new AmpPipeline(args,this.getConanProcessService());
  if (!args.isStatsOnly()) {
    log.debug("String_Node_Str" + ampPipeline.getProcesses().size() + "String_Node_Str");
    args.getAssembliesDir().mkdirs();
    this.conanProcessService.createLocalSymbolicLink(args.getInputAssembly(),new File(args.getAssembliesDir(),"String_Node_Str"));
    this.execute(ampPipeline.getArgs().getArgMap(),executionContext);
  }
  try {
    this.ampExecutor.executeAnalysisJob(args);
  }
 catch (  ProcessExecutionException|IOException|CommandExecutionException e) {
    throw new ProcessExecutionException(-2,e);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(ExecutionContext executionContext) throws InterruptedException, ProcessExecutionException {
  AmpArgs args=(AmpArgs)this.getProcessArgs();
  this.ampExecutor.initialise(this.conanProcessService,executionContext);
  if (!args.isStatsOnly()) {
    AmpPipeline ampPipeline=new AmpPipeline(args,this.getConanProcessService());
    log.debug("String_Node_Str" + ampPipeline.getProcesses().size() + "String_Node_Str");
    args.getAssembliesDir().mkdirs();
    this.conanProcessService.createLocalSymbolicLink(args.getInputAssembly(),new File(args.getAssembliesDir(),"String_Node_Str"));
    ConanUser rampartUser=new GuestUser("String_Node_Str");
    ConanTask<AmpPipeline> ampTask=new DefaultTaskFactory().createTask(ampPipeline,0,ampPipeline.getArgs().getArgMap(),ConanTask.Priority.HIGHEST,rampartUser);
    ampTask.setId("String_Node_Str");
    ampTask.submit();
    try {
      ampTask.execute(executionContext);
    }
 catch (    TaskExecutionException e) {
      throw new ProcessExecutionException(-1,e);
    }
  }
  try {
    this.ampExecutor.executeAnalysisJob(args);
  }
 catch (  IOException|CommandExecutionException e) {
    throw new ProcessExecutionException(-2,e);
  }
  return true;
}
Program: 59706
Project: 59706
Buggy source:
@Override protected void internalParseXml(Element element) throws IOException {
  Element librariesElement=XmlHelper.getDistinctElementByName(element,KEY_ELEM_LIBRARIES);
  NodeList libraries=librariesElement.getElementsByTagName(KEY_ELEM_LIBRARY);
  this.libs=new ArrayList<>();
  for (int i=0; i < libraries.getLength(); i++) {
    this.libs.add(new Library((Element)libraries.item(i)));
  }
  Element pipelineElement=XmlHelper.getDistinctElementByName(element,KEY_ELEM_PIPELINE);
  Element mecqElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_MECQ);
  this.mecqArgs=mecqElement == null ? null : new MecqArgs(mecqElement,this.rampartJobFileSystem.getMeqcDir(),this.getJobPrefix() + "String_Node_Str",this.libs);
  Element massElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_MASS);
  this.massArgs=massElement == null ? null : new MassArgs(massElement,this.rampartJobFileSystem.getMassDir(),this.rampartJobFileSystem.getMeqcDir(),this.getJobPrefix() + "String_Node_Str",this.libs,this.mecqArgs == null ? null : this.mecqArgs.getEqcArgList(),this.getOrganism());
  Element ampElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_AMP);
  this.ampArgs=ampElement == null ? null : new AmpArgs(ampElement,this.rampartJobFileSystem.getAmpDir(),this.getJobPrefix() + "String_Node_Str",this.rampartJobFileSystem.getMassOutFile(),this.libs,this.mecqArgs.getEqcArgList(),this.getOrganism());
}

Fixed version (ground truth):
@Override protected void internalParseXml(Element element) throws IOException {
  Element librariesElement=XmlHelper.getDistinctElementByName(element,KEY_ELEM_LIBRARIES);
  NodeList libraries=librariesElement.getElementsByTagName(KEY_ELEM_LIBRARY);
  this.libs=new ArrayList<>();
  for (int i=0; i < libraries.getLength(); i++) {
    this.libs.add(new Library((Element)libraries.item(i)));
  }
  Element pipelineElement=XmlHelper.getDistinctElementByName(element,KEY_ELEM_PIPELINE);
  Element mecqElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_MECQ);
  this.mecqArgs=mecqElement == null ? null : new MecqArgs(mecqElement,this.rampartJobFileSystem.getMeqcDir(),this.getJobPrefix() + "String_Node_Str",this.libs);
  Element massElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_MASS);
  this.massArgs=massElement == null ? null : new MassArgs(massElement,this.rampartJobFileSystem.getMassDir(),this.rampartJobFileSystem.getMeqcDir(),this.getJobPrefix() + "String_Node_Str",this.libs,this.mecqArgs == null ? null : this.mecqArgs.getEqcArgList(),this.getOrganism());
  Element ampElement=XmlHelper.getDistinctElementByName(pipelineElement,KEY_ELEM_AMP);
  this.ampArgs=ampElement == null ? null : new AmpArgs(ampElement,this.rampartJobFileSystem.getAmpDir(),this.getJobPrefix() + "String_Node_Str",this.rampartJobFileSystem.getMassOutFile(),this.libs,this.mecqArgs == null ? null : this.mecqArgs.getEqcArgList(),this.getOrganism());
}
Program: 59708
Project: 59708
Buggy source:
@Override public void dispatchAnalyserJobs(Assembler assembler,SingleMassArgs args,String waitCondition,String jobName) throws InterruptedException, ProcessExecutionException, IOException, CommandExecutionException {
  File inputDir=null;
  if (assembler.makesScaffolds()) {
    inputDir=args.getScaffoldsDir();
  }
 else   if (assembler.makesContigs()) {
    inputDir=args.getContigsDir();
  }
 else   if (assembler.makesUnitigs()) {
    inputDir=args.getUnitigsDir();
  }
 else {
    throw new IOException("String_Node_Str" + MassArgs.OutputLevel.getListAsString());
  }
  this.statsExecutor.dispatchAnalyserJobs(args.getStatsLevels(),inputDir,args.getThreads(),args.getOrganism() == null ? 0 : args.getOrganism().getEstGenomeSize(),assembler.makesScaffolds(),args.isRunParallel(),waitCondition,jobName);
}

Fixed version (ground truth):
@Override public void dispatchAnalyserJobs(Assembler assembler,SingleMassArgs args,String waitCondition,String jobName) throws InterruptedException, ProcessExecutionException, IOException, CommandExecutionException {
  File inputDir=null;
  if (assembler.makesScaffolds()) {
    inputDir=args.getScaffoldsDir();
  }
 else   if (assembler.makesContigs()) {
    inputDir=args.getContigsDir();
  }
 else   if (assembler.makesUnitigs()) {
    inputDir=args.getUnitigsDir();
  }
 else {
    throw new IOException("String_Node_Str" + MassArgs.OutputLevel.getListAsString());
  }
  List<Integer> jobIds=this.statsExecutor.dispatchAnalyserJobs(args.getStatsLevels(),inputDir,args.getThreads(),args.getOrganism() == null ? 0 : args.getOrganism().getEstGenomeSize(),assembler.makesScaffolds(),args.isRunParallel(),waitCondition,jobName);
  this.jobIds.addAll(jobIds);
}
Program: 59709
Project: 59709
Buggy source:
@Override public void initialise(ConanProcessService conanProcessService,ExecutionContext executionContext){
  super.initialise(conanProcessService,executionContext);
  statsExecutor.initialise(conanProcessService,executionContext);
}

Fixed version (ground truth):
@Override public void initialise(ConanProcessService conanProcessService,ExecutionContext executionContext){
  super.initialise(conanProcessService,executionContext);
  this.jobIds.clear();
  this.statsExecutor.initialise(conanProcessService,executionContext);
}
Program: 59710
Project: 59710
Buggy source:
public JobCleaner(String[] args) throws ParseException {
  CommandLine cmdLine=new PosixParser().parse(createOptions(),args,true);
  this.help=cmdLine.hasOption(OPT_HELP);
  this.verbose=cmdLine.hasOption(OPT_VERBOSE);
  this.targetDir=cmdLine.getArgList().isEmpty() ? new File("String_Node_Str") : new File((String)cmdLine.getArgList().get(0));
}

Fixed version (ground truth):
public JobCleaner(String[] args) throws ParseException {
  CommandLine cmdLine=new PosixParser().parse(createOptions(),args,true);
  this.help=cmdLine.hasOption(OPT_HELP);
  this.verbose=cmdLine.hasOption(OPT_VERBOSE);
  this.targetDir=cmdLine.getArgList().isEmpty() ? new File("String_Node_Str").getAbsoluteFile() : new File((String)cmdLine.getArgList().get(0));
}
Program: 59711
Project: 59711
Buggy source:
/** 
 * Creates a new RAMPART instance based on command line arguments
 * @param args List of command line arguments containing information to setup RAMPART
 * @throws ParseException Thrown if an invalid command line was encountered
 */
public Rampart(String[] args) throws ParseException, IOException {
  super(APP_NAME,SETTINGS_DIR);
  this.parse(new PosixParser().parse(createOptions(),args,true));
  this.init();
  this.args=new RampartArgs(this.jobConfig,this.getOutputDir(),this.getJobPrefix().replaceAll("String_Node_Str",createTimestamp()),this.stages);
  this.args.parseXml();
  this.configureSystem();
}

Fixed version (ground truth):
/** 
 * Creates a new RAMPART instance based on command line arguments
 * @param args List of command line arguments containing information to setup RAMPART
 * @throws ParseException Thrown if an invalid command line was encountered
 */
public Rampart(String[] args) throws ParseException, IOException {
  super(APP_NAME,SETTINGS_DIR);
  this.parse(new PosixParser().parse(createOptions(),args,true));
  if (!this.isHelp()) {
    this.init();
    this.args=new RampartArgs(this.jobConfig,this.getOutputDir(),this.getJobPrefix().replaceAll("String_Node_Str",createTimestamp()),this.stages);
    this.args.parseXml();
    this.configureSystem();
    log.info("String_Node_Str" + this.getOutputDir().getAbsolutePath());
    log.info("String_Node_Str" + this.getEnvironmentConfig().getAbsolutePath());
  }
}
Program: 59713
Project: 59713
Buggy source:
public RampartArgs(File configFile,File outputDir,String jobPrefix,List<RampartStage> stages) throws IOException {
  super(configFile,outputDir,jobPrefix);
  this.stages=stages;
  this.libs=new ArrayList<>();
  this.mecqArgs=null;
  this.kmerCountReadsArgs=null;
  this.massArgs=null;
  this.ampArgs=null;
  this.finaliseArgs=null;
  this.rampartJobFileSystem=new RampartJobFileSystem(outputDir);
}

Fixed version (ground truth):
public RampartArgs(File configFile,File outputDir,String jobPrefix,List<RampartStage> stages) throws IOException {
  super(configFile,outputDir,jobPrefix);
  this.stages=stages;
  this.libs=new ArrayList<>();
  this.mecqArgs=null;
  this.kmerCountReadsArgs=null;
  this.massArgs=null;
  this.ampArgs=null;
  this.finaliseArgs=null;
  this.rampartJobFileSystem=new RampartJobFileSystem(outputDir.getAbsoluteFile());
}
Program: 59714
Project: 59714
Buggy source:
public void init() throws IOException {
  this.clearProcessList();
  addProcessIfRequested(RampartStage.MECQ,this.args.getMecqArgs());
  addProcessIfRequested(RampartStage.MASS,this.args.getMassArgs());
  addProcessIfRequested(RampartStage.AMP,this.args.getAmpArgs());
  addProcessIfRequested(RampartStage.FINALISE,this.args.getFinaliseArgs());
}

Fixed version (ground truth):
public void init() throws IOException {
  this.clearProcessList();
  addProcessIfRequested(RampartStage.MECQ,this.args.getMecqArgs());
  addProcessIfRequested(RampartStage.KMER_READS,this.args.getKmerCountReadsArgs());
  addProcessIfRequested(RampartStage.MASS,this.args.getMassArgs());
  addProcessIfRequested(RampartStage.AMP,this.args.getAmpArgs());
  addProcessIfRequested(RampartStage.FINALISE,this.args.getFinaliseArgs());
}
Program: 59715
Project: 59715
Buggy source:
@Override public void setFromArgMap(Map<ConanParameter,String> pvp) throws IOException {
}

Fixed version (ground truth):
@Override public void setFromArgMap(Map<ConanParameter,String> pvp) throws IOException {
  for (  Map.Entry<ConanParameter,String> entry : pvp.entrySet()) {
    if (!entry.getKey().validateParameterValue(entry.getValue())) {
      throw new IllegalArgumentException("String_Node_Str" + entry.getKey() + "String_Node_Str"+ entry.getValue());
    }
    String param=entry.getKey().getName();
  }
}
Program: 59716
Project: 59716
Buggy source:
@Override public List<ConanParameter> getConanParameters(){
  return null;
}

Fixed version (ground truth):
@Override public List<ConanParameter> getConanParameters(){
  return new ArrayList<>(Arrays.asList(new ConanParameter[]{this.jobPrefix,this.minN,this.outputDir,this.inputFile}));
}
Program: 59717
Project: 59717
Buggy source:
protected void executeAssembler(Assembler assembler,String jobName,ExecutionContext executionContext) throws IOException, ProcessExecutionException, InterruptedException {
  ExecutionContext executionContextCopy=executionContext.copy();
  assembler.initialise();
  SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
  File outputDir=assembler.getArgs().getOutputDir();
  if (outputDir.exists()) {
    FileUtils.deleteDirectory(outputDir);
  }
  outputDir.mkdir();
  if (executionContextCopy.usingScheduler()) {
    SchedulerArgs schArgs=executionContextCopy.getScheduler().getArgs();
    schArgs.setJobName(jobName);
    schArgs.setMonitorFile(new File(outputDir,jobName + "String_Node_Str"));
    schArgs.setThreads(args.getThreads());
    schArgs.setMemoryMB(args.getMemory());
    if (assembler.usesOpenMpi() && args.getThreads() > 1) {
      schArgs.setOpenmpi(true);
    }
    executionContextCopy.setForegroundJob(!args.getParallelismLevel().doParallelAssemblies());
  }
  this.conanProcessService.execute(assembler,executionContextCopy);
}

Fixed version (ground truth):
protected void executeAssembler(Assembler assembler,String jobName,ExecutionContext executionContext) throws IOException, ProcessExecutionException, InterruptedException {
  ExecutionContext executionContextCopy=executionContext.copy();
  SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
  File outputDir=assembler.getArgs().getOutputDir();
  if (outputDir.exists()) {
    FileUtils.deleteDirectory(outputDir);
  }
  outputDir.mkdir();
  assembler.initialise();
  if (executionContextCopy.usingScheduler()) {
    SchedulerArgs schArgs=executionContextCopy.getScheduler().getArgs();
    schArgs.setJobName(jobName);
    schArgs.setMonitorFile(new File(outputDir,jobName + "String_Node_Str"));
    schArgs.setThreads(args.getThreads());
    schArgs.setMemoryMB(args.getMemory());
    if (assembler.usesOpenMpi() && args.getThreads() > 1) {
      schArgs.setOpenmpi(true);
    }
    executionContextCopy.setForegroundJob(!args.getParallelismLevel().doParallelAssemblies());
  }
  this.conanProcessService.execute(assembler,executionContextCopy);
}
Program: 59718
Project: 59718
Buggy source:
protected void executePlots(File inputFile,File outputFile,String jobName,ExecutionContext executionContext) throws InterruptedException {
  ExecutionContext executionContextCopy=executionContext.copy();
  if (executionContextCopy.usingScheduler()) {
    SchedulerArgs schedulerArgs=executionContextCopy.getScheduler().getArgs();
    schedulerArgs.setJobName(jobName);
    schedulerArgs.setMonitorFile(new File(inputFile.getParentFile(),jobName + "String_Node_Str"));
  }
  AscV10Args ascArgs=new AscV10Args();
  ascArgs.setInput(inputFile);
  ascArgs.setOutput(outputFile);
  AscV10Process ascProcess=new AscV10Process(ascArgs);
  try {
    this.conanProcessService.execute(ascProcess,executionContextCopy);
  }
 catch (  ProcessExecutionException pee) {
    log.error(pee.getMessage(),pee);
  }
}

Fixed version (ground truth):
protected void executePlots(File inputFile,File outputFile,String jobName,ExecutionContext executionContext) throws InterruptedException {
  ExecutionContext executionContextCopy=executionContext.copy();
  if (executionContextCopy.usingScheduler()) {
    SchedulerArgs schedulerArgs=executionContextCopy.getScheduler().getArgs();
    schedulerArgs.setJobName(jobName);
    schedulerArgs.setMonitorFile(new File(inputFile.getParentFile(),jobName + "String_Node_Str"));
  }
  AscV10Args ascArgs=new AscV10Args();
  ascArgs.setInput(inputFile);
  ascArgs.setOutput(outputFile);
  ascArgs.setMode("String_Node_Str");
  AscV10Process ascProcess=new AscV10Process(ascArgs);
  try {
    this.conanProcessService.execute(ascProcess,executionContextCopy);
  }
 catch (  ProcessExecutionException pee) {
    log.error(pee.getMessage(),pee);
  }
}
Program: 59719
Project: 59719
Buggy source:
protected void createConfig(File baseConfigFile,ErrorCorrector errorCorrector,File configDir) throws IOException {
  RampartConfiguration baseConfig=RampartConfiguration.loadFile(baseConfigFile);
  String name=errorCorrector == null ? "String_Node_Str" : errorCorrector.getName().toLowerCase();
  baseConfig.getMassSettings().add("String_Node_Str",name);
  if (errorCorrector != null) {
    for (    Library lib : baseConfig.getLibs()) {
      if (lib.testUsage(Library.Usage.QUALITY_TRIMMING)) {
        if (errorCorrector.getArgs().isSingleEndOnly()) {
          ErrorCorrectorSingleEndArgs ecPairedEndArgs=(ErrorCorrectorSingleEndArgs)errorCorrector.getArgs();
          lib.setSeFile(new SeqFile(ecPairedEndArgs.getCorrectedFile()));
        }
 else {
          ErrorCorrectorPairedEndArgs ecPairedEndArgs=(ErrorCorrectorPairedEndArgs)errorCorrector.getArgs();
          lib.setFilePaired1(new SeqFile(ecPairedEndArgs.getPairedEndCorrectedFiles().getFile1()));
          lib.setFilePaired2(new SeqFile(ecPairedEndArgs.getPairedEndCorrectedFiles().getFile2()));
          lib.setSeFile(new SeqFile(ecPairedEndArgs.getSingleEndCorrectedFiles().get(0)));
        }
      }
    }
  }
  baseConfig.save(new File(configDir,name + "String_Node_Str"));
}

Fixed version (ground truth):
protected void createConfig(File baseConfigFile,ErrorCorrector errorCorrector,File configDir) throws IOException {
  RampartConfiguration baseConfig=RampartConfiguration.loadFile(baseConfigFile);
  String name=errorCorrector == null ? "String_Node_Str" : errorCorrector.getName().toLowerCase();
  baseConfig.getMassSettings().add("String_Node_Str",name);
  if (errorCorrector != null) {
    for (    Library lib : baseConfig.getLibs()) {
      if (lib.testUsage(Library.Usage.QUALITY_TRIMMING)) {
        if (errorCorrector.getArgs().isSingleEndOnly()) {
          ErrorCorrectorSingleEndArgs ecPairedEndArgs=(ErrorCorrectorSingleEndArgs)errorCorrector.getArgs();
          lib.setSeFile(new SeqFile(ecPairedEndArgs.getCorrectedFile()));
        }
 else {
          ErrorCorrectorPairedEndArgs ecPairedEndArgs=(ErrorCorrectorPairedEndArgs)errorCorrector.getArgs();
          lib.setFilePaired1(new SeqFile(ecPairedEndArgs.getPairedEndCorrectedFiles().getFile1()));
          lib.setFilePaired2(new SeqFile(ecPairedEndArgs.getPairedEndCorrectedFiles().getFile2()));
          if (ecPairedEndArgs.getSingleEndCorrectedFiles() != null && !ecPairedEndArgs.getSingleEndCorrectedFiles().isEmpty()) {
            lib.setSeFile(new SeqFile(ecPairedEndArgs.getSingleEndCorrectedFiles().get(0)));
          }
 else {
            lib.setSeFile(null);
          }
        }
      }
    }
  }
  baseConfig.save(new File(configDir,name + "String_Node_Str"));
}