nus-yam/ex-repair huggingface dataset:
Program: 59721
Project: 59721
Buggy source:
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();
  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();
  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);
}
Program: 59722
Project: 59722
Buggy source:
protected void createLinks(Assembler assembler,int k,ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  ExecutionContext linkingExecutionContext=new DefaultExecutionContext(executionContext.getLocality(),null,null,true);
  StringJoiner compoundLinkCmdLine=new StringJoiner("String_Node_Str");
  SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
  compoundLinkCmdLine.add(assembler.makesUnitigs(),"String_Node_Str",makeLinkCmdLine(assembler.getUnitigsFile(),args.getUnitigsDir(),k));
  compoundLinkCmdLine.add(assembler.makesContigs(),"String_Node_Str",makeLinkCmdLine(assembler.getContigsFile(),args.getContigsDir(),k));
  compoundLinkCmdLine.add(assembler.makesScaffolds(),"String_Node_Str",makeLinkCmdLine(assembler.getScaffoldsFile(),args.getScaffoldsDir(),k));
  this.conanProcessService.execute(compoundLinkCmdLine.toString(),linkingExecutionContext);
}

Fixed version (ground truth):
protected void createLinks(Assembler assembler,int k,ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  ExecutionContext linkingExecutionContext=new DefaultExecutionContext(executionContext.getLocality(),null,null,true);
  StringJoiner compoundLinkCmdLine=new StringJoiner("String_Node_Str");
  SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
  if (assembler.makesUnitigs()) {
    compoundLinkCmdLine.add(makeLinkCmdLine(assembler.getUnitigsFile(),args.getUnitigsDir(),k));
  }
  if (assembler.makesContigs()) {
    compoundLinkCmdLine.add(makeLinkCmdLine(assembler.getContigsFile(),args.getContigsDir(),k));
  }
  if (assembler.makesScaffolds()) {
    compoundLinkCmdLine.add(makeLinkCmdLine(assembler.getScaffoldsFile(),args.getScaffoldsDir(),k));
  }
  this.conanProcessService.execute(compoundLinkCmdLine.toString(),linkingExecutionContext);
}
Program: 59723
Project: 59723
Buggy source:
protected void executeEcq(ErrorCorrector errorCorrector,String jobName,boolean runInParallel,File outputDir,ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  ExecutionContext executionContextCopy=executionContext.copy();
  errorCorrector.configure(this.getConanProcessService());
  if (executionContext.usingScheduler()) {
    executionContextCopy.getScheduler().getArgs().setJobName(jobName);
    executionContextCopy.getScheduler().getArgs().setMonitorFile(new File(outputDir,jobName + "String_Node_Str"));
    executionContextCopy.setForegroundJob(!runInParallel);
  }
  this.conanProcessService.execute(errorCorrector,executionContextCopy);
}

Fixed version (ground truth):
protected void executeEcq(ErrorCorrector errorCorrector,String jobName,boolean runInParallel,File outputDir,ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  ExecutionContext executionContextCopy=executionContext.copy();
  errorCorrector.configure(this.getConanProcessService());
  errorCorrector.initialise();
  if (executionContext.usingScheduler()) {
    SchedulerArgs schedulerArgs=executionContextCopy.getScheduler().getArgs();
    ErrorCorrectorArgs ecArgs=errorCorrector.getArgs();
    schedulerArgs.setJobName(jobName);
    schedulerArgs.setMonitorFile(new File(outputDir,jobName + "String_Node_Str"));
    schedulerArgs.setThreads(ecArgs.getThreads());
    schedulerArgs.setMemoryMB(ecArgs.getMemoryGb() * 1000);
    executionContextCopy.setForegroundJob(!runInParallel);
  }
  this.conanProcessService.execute(errorCorrector,executionContextCopy);
}
Program: 59725
Project: 59725
Buggy source:
protected void createSupportDirectories(){
  SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
  Assembler assembler=AssemblerFactory.createAssembler(args.getAssembler());
  if (assembler.makesUnitigs()) {
    args.getUnitigsDir().mkdir();
  }
  if (assembler.makesContigs()) {
    args.getContigsDir().mkdir();
  }
  if (assembler.makesScaffolds()) {
    args.getScaffoldsDir().mkdir();
  }
}

Fixed version (ground truth):
protected void createSupportDirectories(Assembler assembler,SingleMassArgs args){
  if (assembler.makesUnitigs()) {
    args.getUnitigsDir().mkdir();
  }
  if (assembler.makesContigs()) {
    args.getContigsDir().mkdir();
  }
  if (assembler.makesScaffolds()) {
    args.getScaffoldsDir().mkdir();
  }
}
Program: 59727
Project: 59727
Buggy source:
protected void dispatchStatsJob(WaitCondition waitCondition,ExecutionContext executionContext) throws InterruptedException, ProcessExecutionException, IOException, CommandExecutionException {
  SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
  ExecutionContext executionContextCopy=executionContext.copy();
  String jobName=args.getJobPrefix() + "String_Node_Str";
  if (executionContextCopy.usingScheduler()) {
    SchedulerArgs schedulerArgs=executionContextCopy.getScheduler().getArgs();
    schedulerArgs.setJobName(jobName);
    schedulerArgs.setThreads(1);
    schedulerArgs.setMemoryMB(0);
    schedulerArgs.setWaitCondition(waitCondition);
    executionContextCopy.setForegroundJob(args.getParallelismLevel() == MassArgs.ParallelismLevel.LINEAR);
  }
  Assembler assembler=AssemblerFactory.createAssembler(args.getAssembler());
  if (assembler.makesUnitigs()) {
    this.executeSingleStatsJob(args.getUnitigsDir(),jobName + "String_Node_Str",executionContextCopy);
  }
  if (assembler.makesContigs()) {
    this.executeSingleStatsJob(args.getContigsDir(),jobName + "String_Node_Str",executionContextCopy);
  }
  if (assembler.makesScaffolds()) {
    this.executeSingleStatsJob(args.getScaffoldsDir(),jobName + "String_Node_Str",executionContextCopy);
  }
  if (executionContext.usingScheduler() && args.getParallelismLevel() == MassArgs.ParallelismLevel.PARALLEL_ASSEMBLIES_ONLY) {
    log.debug("String_Node_Str");
    this.executeScheduledWait(jobName,args.getOutputDir(),executionContext);
  }
}

Fixed version (ground truth):
protected void dispatchStatsJob(Assembler assembler,WaitCondition waitCondition,ExecutionContext executionContext) throws InterruptedException, ProcessExecutionException, IOException, CommandExecutionException {
  SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
  ExecutionContext executionContextCopy=executionContext.copy();
  String jobName=args.getJobPrefix() + "String_Node_Str";
  if (executionContextCopy.usingScheduler()) {
    SchedulerArgs schedulerArgs=executionContextCopy.getScheduler().getArgs();
    schedulerArgs.setJobName(jobName);
    schedulerArgs.setThreads(1);
    schedulerArgs.setMemoryMB(0);
    schedulerArgs.setWaitCondition(waitCondition);
    executionContextCopy.setForegroundJob(args.getParallelismLevel() == MassArgs.ParallelismLevel.LINEAR);
  }
  if (assembler.makesUnitigs()) {
    this.executeSingleStatsJob(args.getUnitigsDir(),jobName + "String_Node_Str",executionContextCopy);
  }
  if (assembler.makesContigs()) {
    this.executeSingleStatsJob(args.getContigsDir(),jobName + "String_Node_Str",executionContextCopy);
  }
  if (assembler.makesScaffolds()) {
    this.executeSingleStatsJob(args.getScaffoldsDir(),jobName + "String_Node_Str",executionContextCopy);
  }
  if (executionContext.usingScheduler() && args.getParallelismLevel() == MassArgs.ParallelismLevel.PARALLEL_ASSEMBLIES_ONLY) {
    log.debug("String_Node_Str");
    this.executeScheduledWait(jobName,args.getOutputDir(),executionContext);
  }
}
Program: 59728
Project: 59728
Buggy source:
@Override public String toString(){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(KEY_JD_AUTHOR + "String_Node_Str").append(this.getAuthor()).append("String_Node_Str").append(KEY_JD_COLLABORATOR + "String_Node_Str").append(this.getAuthor()).append("String_Node_Str").append(KEY_JD_INSTITUTION + "String_Node_Str").append(this.getAuthor()).append("String_Node_Str").append(KEY_JD_TITLE + "String_Node_Str").append(this.getAuthor()).append("String_Node_Str").append(KEY_JD_JIRA_SEQINFO_ID + "String_Node_Str").append(this.getAuthor()).append("String_Node_Str").append(KEY_JD_MISO_ID + "String_Node_Str").append(this.getAuthor()).append("String_Node_Str").append(KEY_JD_NAME + "String_Node_Str").append(this.getName()).append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(KEY_JD_AUTHOR + "String_Node_Str").append(this.getAuthor()).append("String_Node_Str").append(KEY_JD_COLLABORATOR + "String_Node_Str").append(this.getCollaborator()).append("String_Node_Str").append(KEY_JD_INSTITUTION + "String_Node_Str").append(this.getInstitution()).append("String_Node_Str").append(KEY_JD_TITLE + "String_Node_Str").append(this.getTitle()).append("String_Node_Str").append(KEY_JD_JIRA_SEQINFO_ID + "String_Node_Str").append(this.getJiraSeqinfoId()).append("String_Node_Str").append(KEY_JD_MISO_ID + "String_Node_Str").append(this.getMisoId()).append("String_Node_Str").append(KEY_JD_NAME + "String_Node_Str").append(this.getName()).append("String_Node_Str");
  return sb.toString();
}
Program: 59729
Project: 59729
Buggy source:
public static Library parseIniSection(Section iniSection,int index){
  Library ld=new Library();
  ld.setName(iniSection.get(KEY_NAME));
  ld.setAverageInsertSize(Integer.parseInt(iniSection.get(KEY_AVG_INSERT_SIZE)));
  ld.setInsertErrorTolerance(Double.parseDouble(iniSection.get(KEY_INSERT_ERROR_TOLERANCE)));
  ld.setReadLength(Integer.parseInt(iniSection.get(KEY_READ_LENGTH)));
  ld.setSeqOrientation(SeqOrientation.valueOf(iniSection.get(KEY_SEQ_ORIENTATION).toUpperCase()));
  ld.setUsage(iniSection.get(KEY_USAGE));
  ld.setType(Type.valueOf(iniSection.get(KEY_TYPE).toUpperCase()));
  ld.setFilePaired1(new SeqFile(iniSection.get(KEY_FILE_1)));
  ld.setFilePaired2(new SeqFile(iniSection.get(KEY_FILE_2)));
  if (iniSection.get(KEY_DATASET) != null) {
    ld.setDataset(Dataset.valueOf(iniSection.get(KEY_DATASET)));
  }
  if (iniSection.get(KEY_FILE_SE) != null) {
    ld.setSeFile(new SeqFile(iniSection.get(KEY_FILE_SE)));
  }
  return ld;
}

Fixed version (ground truth):
public static Library parseIniSection(Section iniSection,int index){
  Library ld=new Library();
  ld.setIndex(index);
  ld.setName(iniSection.get(KEY_NAME));
  ld.setAverageInsertSize(Integer.parseInt(iniSection.get(KEY_AVG_INSERT_SIZE)));
  ld.setInsertErrorTolerance(Double.parseDouble(iniSection.get(KEY_INSERT_ERROR_TOLERANCE)));
  ld.setReadLength(Integer.parseInt(iniSection.get(KEY_READ_LENGTH)));
  ld.setSeqOrientation(SeqOrientation.valueOf(iniSection.get(KEY_SEQ_ORIENTATION).toUpperCase()));
  ld.setUsage(iniSection.get(KEY_USAGE));
  ld.setType(Type.valueOf(iniSection.get(KEY_TYPE).toUpperCase()));
  ld.setFilePaired1(new SeqFile(iniSection.get(KEY_FILE_1)));
  ld.setFilePaired2(new SeqFile(iniSection.get(KEY_FILE_2)));
  if (iniSection.get(KEY_DATASET) != null) {
    ld.setDataset(Dataset.valueOf(iniSection.get(KEY_DATASET)));
  }
  if (iniSection.get(KEY_FILE_SE) != null) {
    ld.setSeFile(new SeqFile(iniSection.get(KEY_FILE_SE)));
  }
  return ld;
}
Program: 59730
Project: 59730
Buggy source:
@Override public String toString(){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str" + SECTION_PREFIX + this.getIndex().toString()+ "String_Node_Str").append(KEY_NAME + "String_Node_Str" + this.getName()+ "String_Node_Str").append(KEY_DATASET + "String_Node_Str" + this.getDataset().toString()+ "String_Node_Str").append(KEY_AVG_INSERT_SIZE + "String_Node_Str" + this.getAverageInsertSize().toString()+ "String_Node_Str").append(KEY_INSERT_ERROR_TOLERANCE + "String_Node_Str" + this.getInsertErrorTolerance().toString()+ "String_Node_Str").append(KEY_READ_LENGTH + "String_Node_Str" + this.getReadLength()+ "String_Node_Str").append(KEY_SEQ_ORIENTATION + "String_Node_Str" + this.getSeqOrientation().toString()+ "String_Node_Str").append(KEY_USAGE + "String_Node_Str" + this.getUsage().toString()+ "String_Node_Str").append(KEY_TYPE + "String_Node_Str" + this.getType().toString()+ "String_Node_Str").append(KEY_FILE_1 + "String_Node_Str" + this.getFilePaired1().getFilePath()+ "String_Node_Str").append(KEY_FILE_2 + "String_Node_Str" + this.getFilePaired2().getFilePath()+ "String_Node_Str").append(KEY_FILE_SE + "String_Node_Str" + this.getSeFile().getFilePath()+ "String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str" + SECTION_PREFIX + this.getIndex().toString()+ "String_Node_Str").append(KEY_NAME + "String_Node_Str" + this.getName()+ "String_Node_Str").append(KEY_AVG_INSERT_SIZE + "String_Node_Str" + this.getAverageInsertSize().toString()+ "String_Node_Str").append(KEY_INSERT_ERROR_TOLERANCE + "String_Node_Str" + this.getInsertErrorTolerance().toString()+ "String_Node_Str").append(KEY_READ_LENGTH + "String_Node_Str" + this.getReadLength()+ "String_Node_Str").append(KEY_SEQ_ORIENTATION + "String_Node_Str" + this.getSeqOrientation().toString()+ "String_Node_Str").append(KEY_USAGE + "String_Node_Str" + this.getUsage().toString()+ "String_Node_Str").append(KEY_TYPE + "String_Node_Str" + this.getType().toString()+ "String_Node_Str");
  if (this.getDataset() != null)   sb.append(KEY_DATASET + "String_Node_Str" + this.getDataset().toString()+ "String_Node_Str");
  if (this.getFilePaired1() != null && this.getFilePaired2() != null && (this.getType() == Type.PE || this.getType() == Type.MP)) {
    sb.append(KEY_FILE_1 + "String_Node_Str" + this.getFilePaired1().getFile().getAbsolutePath()+ "String_Node_Str");
    sb.append(KEY_FILE_2 + "String_Node_Str" + this.getFilePaired2().getFile().getAbsolutePath()+ "String_Node_Str");
  }
  if (this.getSeFile() != null && (this.getType() == Type.SE || this.getDataset() == Dataset.QT))   sb.append(KEY_FILE_SE + "String_Node_Str" + this.getSeFile().getFile().getAbsolutePath()+ "String_Node_Str");
  return sb.toString();
}
Program: 59731
Project: 59731
Buggy source:
/** 
 * Saves this object to disk at the specified location
 * @param configFile The location to save this config file.
 * @throws IOException Thrown if there were any problems saving to disk
 */
public void save(File configFile) throws IOException {
  StringBuilder sb=new StringBuilder();
  sb.append(this.job.toString());
  for (  Library ld : this.libs) {
    sb.append(ld.toString());
  }
  FileUtils.writeStringToFile(configFile,sb.toString());
}

Fixed version (ground truth):
/** 
 * Saves this object to disk at the specified location
 * @param configFile The location to save this config file.
 * @throws IOException Thrown if there were any problems saving to disk
 */
public void save(File configFile) throws IOException {
  StringBuilder sb=new StringBuilder();
  sb.append(this.job.toString());
  for (  Library ld : this.libs) {
    sb.append(ld.toString());
  }
  sb.append(this.createToolSection(SECTION_QT,this.qtSettings));
  sb.append(this.createToolSection(SECTION_MASS,this.massSettings));
  sb.append(this.createToolSection(SECTION_AMP,this.ampSettings));
  FileUtils.writeStringToFile(configFile,sb.toString());
}
Program: 59732
Project: 59732
Buggy source:
@Override public List<ConanProcess> getProcesses(){
  List<ConanProcess> list=new ArrayList<ConanProcess>();
  if (this.stages == null || this.stages.isEmpty() || this.stages.contains(RampartStage.QT)) {
    list.add(this.qtProcess);
  }
  if (this.stages == null || this.stages.isEmpty() || this.stages.contains(RampartStage.MASS)) {
    list.add(this.multiMassProcess);
  }
  if (this.stages == null || this.stages.isEmpty() || this.stages.contains(RampartStage.AMP)) {
    list.addAll(this.ampPipeline.getProcesses());
  }
  return list;
}

Fixed version (ground truth):
@Override public List<ConanProcess> getProcesses(){
  List<ConanProcess> list=new ArrayList<ConanProcess>();
  if (this.stages == null || this.stages.isEmpty() || this.stages.contains(RampartStage.QT)) {
    list.add(this.qtProcess);
  }
  if (this.stages == null || this.stages.isEmpty() || this.stages.contains(RampartStage.MASS)) {
    list.add(this.multiMassProcess);
  }
  return list;
}
Program: 59733
Project: 59733
Buggy source:
private List<SingleMassArgs> createSingleMassArgsList(MultiMassArgs args) throws IOException {
  List<SingleMassArgs> singleMassArgsList=new ArrayList<SingleMassArgs>();
  List<RampartConfiguration> configs=RampartConfiguration.createList(args.getConfigs(),true);
  for (  RampartConfiguration config : configs) {
    SingleMassArgs singleMassArgs=SingleMassArgs.parseConfig(config.getFile());
    if (args.getAssembler() != null) {
      singleMassArgs.setAssembler(args.getAssembler());
    }
    if (args.getKmin() != MassArgs.DEFAULT_KMER_MIN) {
      singleMassArgs.setKmin(args.getKmin());
    }
    if (args.getKmax() != MassArgs.DEFAULT_KMER_MAX) {
      singleMassArgs.setKmax(args.getKmax());
    }
    if (args.getStepSize() != MassArgs.DEFAULT_STEP_SIZE) {
      singleMassArgs.setStepSize(args.getStepSize());
    }
    singleMassArgs.setOutputDir(new File(args.getOutputDir(),config.getJob().getName()));
    singleMassArgs.setJobPrefix(args.getJobPrefix() + "String_Node_Str" + config.getJob().getName());
    singleMassArgs.setConfig(config.getFile());
    singleMassArgsList.add(singleMassArgs);
  }
  return singleMassArgsList;
}

Fixed version (ground truth):
private List<SingleMassArgs> createSingleMassArgsList(MultiMassArgs args) throws IOException {
  List<SingleMassArgs> singleMassArgsList=new ArrayList<SingleMassArgs>();
  List<RampartConfiguration> configs=RampartConfiguration.createList(args.getConfigs(),true);
  for (  RampartConfiguration config : configs) {
    SingleMassArgs singleMassArgs=SingleMassArgs.parseConfig(config.getFile());
    if (args.getAssembler() != null) {
      singleMassArgs.setAssembler(args.getAssembler());
    }
    if (args.getKmin() != MassArgs.DEFAULT_KMER_MIN) {
      singleMassArgs.setKmin(args.getKmin());
    }
    if (args.getKmax() != MassArgs.DEFAULT_KMER_MAX) {
      singleMassArgs.setKmax(args.getKmax());
    }
    if (args.getStepSize() != MassArgs.DEFAULT_STEP_SIZE) {
      singleMassArgs.setStepSize(args.getStepSize());
    }
    singleMassArgs.setOutputDir(new File(args.getOutputDir(),config.getJob().getName()));
    singleMassArgs.setJobPrefix(args.getJobPrefix() + "String_Node_Str" + config.getJob().getName());
    singleMassArgs.setConfig(config.getFile());
    singleMassArgs.setRunParallel(args.isRunParallel());
    singleMassArgsList.add(singleMassArgs);
  }
  return singleMassArgsList;
}
Program: 59734
Project: 59734
Buggy source:
@Override public boolean execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  try {
    MultiMassArgs args=(MultiMassArgs)this.getProcessArgs();
    List<File> statsFiles=new ArrayList<File>();
    List<SingleMassArgs> singleMassArgsList=this.createSingleMassArgsList(args);
    List<Thread> singleMassThreads=new ArrayList<Thread>();
    for (    SingleMassArgs singleMassArgs : singleMassArgsList) {
      statsFiles.add(singleMassArgs.getStatsFile());
      this.executeSingleMass(singleMassArgs,executionContext);
    }
    if (args.isRunParallel()) {
      this.executeScheduledWait(args.getJobPrefix(),args.getOutputDir(),executionContext);
    }
    executeMassSelector(args,statsFiles,executionContext);
  }
 catch (  IOException ioe) {
    throw new ProcessExecutionException(-1,ioe);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  try {
    log.info("String_Node_Str");
    MultiMassArgs args=(MultiMassArgs)this.getProcessArgs();
    List<File> statsFiles=new ArrayList<File>();
    List<SingleMassArgs> singleMassArgsList=this.createSingleMassArgsList(args);
    List<Thread> singleMassThreads=new ArrayList<Thread>();
    for (    SingleMassArgs singleMassArgs : singleMassArgsList) {
      statsFiles.add(singleMassArgs.getStatsFile());
      this.executeSingleMass(singleMassArgs,executionContext);
    }
    if (args.isRunParallel()) {
      log.debug("String_Node_Str");
      this.executeScheduledWait(args.getJobPrefix(),args.getOutputDir(),executionContext);
    }
    log.info("String_Node_Str");
    log.info("String_Node_Str");
    executeMassSelector(args,statsFiles,executionContext);
    log.info("String_Node_Str");
  }
 catch (  IOException ioe) {
    throw new ProcessExecutionException(-1,ioe);
  }
  return true;
}
Program: 59735
Project: 59735
Buggy source:
protected void dispatchStatsJob(WaitCondition waitCondition,ExecutionContext executionContext) throws InterruptedException, ProcessExecutionException, IOException, CommandExecutionException {
  SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
  ExecutionContext executionContextCopy=executionContext.copy();
  if (executionContextCopy.usingScheduler()) {
    SchedulerArgs schedulerArgs=executionContextCopy.getScheduler().getArgs();
    schedulerArgs.setJobName(args.getJobPrefix() + "String_Node_Str");
    schedulerArgs.setThreads(0);
    schedulerArgs.setMemoryMB(0);
    schedulerArgs.setWaitCondition(waitCondition);
  }
  Assembler assembler=AssemblerFactory.createAssembler(args.getAssembler());
  StringJoiner statCommands=new StringJoiner("String_Node_Str");
  if (assembler.makesUnitigs()) {
    statCommands.add(buildStatCmdLine(args.getUnitigsDir()));
  }
  if (assembler.makesContigs()) {
    statCommands.add(buildStatCmdLine(args.getContigsDir()));
  }
  if (assembler.makesScaffolds()) {
    statCommands.add(buildStatCmdLine(args.getScaffoldsDir()));
  }
  this.conanProcessService.execute(statCommands.toString(),executionContextCopy);
}

Fixed version (ground truth):
protected void dispatchStatsJob(WaitCondition waitCondition,ExecutionContext executionContext) throws InterruptedException, ProcessExecutionException, IOException, CommandExecutionException {
  SingleMassArgs args=(SingleMassArgs)this.getProcessArgs();
  ExecutionContext executionContextCopy=executionContext.copy();
  if (executionContextCopy.usingScheduler()) {
    SchedulerArgs schedulerArgs=executionContextCopy.getScheduler().getArgs();
    String jobName=args.getJobPrefix() + "String_Node_Str";
    schedulerArgs.setJobName(jobName);
    schedulerArgs.setMonitorFile(new File(args.getOutputDir(),jobName + "String_Node_Str"));
    schedulerArgs.setThreads(1);
    schedulerArgs.setMemoryMB(0);
    schedulerArgs.setWaitCondition(waitCondition);
  }
  Assembler assembler=AssemblerFactory.createAssembler(args.getAssembler());
  StringJoiner statCommands=new StringJoiner("String_Node_Str");
  if (assembler.makesUnitigs()) {
    statCommands.add(buildStatCmdLine(args.getUnitigsDir()));
  }
  if (assembler.makesContigs()) {
    statCommands.add(buildStatCmdLine(args.getContigsDir()));
  }
  if (assembler.makesScaffolds()) {
    statCommands.add(buildStatCmdLine(args.getScaffoldsDir()));
  }
  this.conanProcessService.execute(statCommands.toString(),executionContextCopy);
}
Program: 59737
Project: 59737
Buggy source:
public List<Library> createQtLibs(){
  List<Library> libList=new ArrayList<Library>();
  for (  Library lib : this.getLibs()) {
    if (lib.testUsage(Library.Usage.QUALITY_TRIMMING)) {
      QualityTrimmer qt=QualityTrimmerFactory.create(this.getQualityTrimmer(),lib,this.getOutputDir());
      Library qtLib=lib.copy();
      qtLib.setFilePaired1(new SeqFile(qt.getArgs().getPairedEndOutputFiles().getFile1()));
      qtLib.setFilePaired2(new SeqFile(qt.getArgs().getPairedEndOutputFiles().getFile2()));
      qtLib.setSeFile(new SeqFile(qt.getArgs().getSingleEndOutputFile()));
      libList.add(qtLib);
    }
  }
  return libList;
}

Fixed version (ground truth):
public List<Library> createQtLibs(){
  List<Library> libList=new ArrayList<Library>();
  for (  Library lib : this.getLibs()) {
    if (lib.testUsage(Library.Usage.QUALITY_TRIMMING)) {
      QualityTrimmer qt=QualityTrimmerFactory.create(this.getQualityTrimmer(),lib,this.getOutputDir());
      Library qtLib=lib.copy();
      qtLib.setFilePaired1(new SeqFile(qt.getArgs().getPairedEndOutputFiles().getFile1()));
      qtLib.setFilePaired2(new SeqFile(qt.getArgs().getPairedEndOutputFiles().getFile2()));
      qtLib.setSeFile(new SeqFile(qt.getArgs().getSingleEndOutputFile()));
      qtLib.setDataset(Library.Dataset.QT);
      libList.add(qtLib);
    }
 else {
      Library rawLib=lib.copy();
      rawLib.setDataset(Library.Dataset.RAW);
      libList.add(rawLib);
    }
  }
  return libList;
}
Program: 59738
Project: 59738
Buggy source:
/** 
 * Parses a RAMPART configuration file for QT specific information.  Note that only libs, qualityTrimmer, minLength and minQual are set from the configuration file.  It does not make sense to populate: outputDir, jobPrefix and createConfigs from a configuration file.  These settings will be set directly from the command line or by the host process.
 * @param config The RAMPART configuration file to parse
 * @return A QTArgs object populated with information from the configuration file.
 * @throws IOException Thrown if there were any problems reading the file.
 */
public static QTArgs parseConfig(File config) throws IOException {
  RampartConfiguration rampartConfig=new RampartConfiguration();
  QTArgs args=new QTArgs();
  rampartConfig.load(config);
  args.setLibs(rampartConfig.getLibs());
  Profile.Section section=rampartConfig.getQtSettings();
  if (section != null) {
    for (    Map.Entry<String,String> entry : section.entrySet()) {
      if (entry.getKey().equalsIgnoreCase(QT_TOOL)) {
        args.setQualityTrimmer(entry.getValue());
      }
 else       if (entry.getKey().equalsIgnoreCase(QT_MIN_LEN)) {
        args.setMinLen(Integer.parseInt(entry.getValue()));
      }
 else       if (entry.getKey().equalsIgnoreCase(QT_MIN_QUAL)) {
        args.setMinQual(Integer.parseInt(entry.getValue()));
      }
    }
  }
  return args;
}

Fixed version (ground truth):
/** 
 * Parses a RAMPART configuration file for QT specific information.  Note that only libs, qualityTrimmer, minLength and minQual are set from the configuration file.  It does not make sense to populate: outputDir, jobPrefix and createConfigs from a configuration file.  These settings will be set directly from the command line or by the host process.
 * @param config The RAMPART configuration file to parse
 * @return A QTArgs object populated with information from the configuration file.
 * @throws IOException Thrown if there were any problems reading the file.
 */
public static QTArgs parseConfig(File config) throws IOException {
  RampartConfiguration rampartConfig=new RampartConfiguration();
  QTArgs args=new QTArgs();
  rampartConfig.load(config);
  args.setLibs(rampartConfig.getLibs());
  Profile.Section section=rampartConfig.getQtSettings();
  if (section != null) {
    for (    Map.Entry<String,String> entry : section.entrySet()) {
      if (entry.getKey().equalsIgnoreCase(QT_TOOL)) {
        args.setQualityTrimmer(entry.getValue());
      }
 else       if (entry.getKey().equalsIgnoreCase(QT_MIN_LEN)) {
        args.setMinLen(Integer.parseInt(entry.getValue()));
      }
 else       if (entry.getKey().equalsIgnoreCase(QT_MIN_QUAL)) {
        args.setMinQual(Integer.parseInt(entry.getValue()));
      }
    }
  }
  args.config=config;
  return args;
}
Program: 59739
Project: 59739
Buggy source:
public void parse(File configFile) throws IOException {
  QTArgs qtArgs=parseConfig(configFile);
  this.libs=qtArgs.getLibs();
  this.qualityTrimmer=qtArgs.getQualityTrimmer();
  this.minLen=qtArgs.getMinLen();
  this.minQual=qtArgs.getMinQual();
}

Fixed version (ground truth):
public void parse(File configFile) throws IOException {
  QTArgs qtArgs=parseConfig(configFile);
  this.libs=qtArgs.getLibs();
  this.qualityTrimmer=qtArgs.getQualityTrimmer();
  this.minLen=qtArgs.getMinLen();
  this.minQual=qtArgs.getMinQual();
  this.config=configFile;
}
Program: 59740
Project: 59740
Buggy source:
protected void writeStatistics(File outputFile,Map<String,AssemblyStats> statsMap,RampartStage rampartStage) throws IOException {
  PrintWriter writer=new PrintWriter(new FileWriter(outputFile));
  writer.println(rampartStage.getStatsID() + "String_Node_Str" + AssemblyStats.getStatsFileHeader());
  for (  Map.Entry<String,AssemblyStats> entry : statsMap.entrySet()) {
    writer.println(entry.getKey() + "String_Node_Str" + (entry.getValue() != null ? entry.getValue().toStatsFileString() : "String_Node_Str"));
  }
  writer.close();
}

Fixed version (ground truth):
protected void writeStatistics(File outputFile,Map<String,AssemblyStats> statsMap,RampartStage rampartStage) throws IOException {
  PrintWriter writer=new PrintWriter(new FileWriter(outputFile));
  writer.println(rampartStage.getStatsID() + "String_Node_Str" + AssemblyStats.getStatsFileHeader());
  Set<String> keys=statsMap.keySet();
  List<Integer> sortedKeys=new ArrayList<Integer>();
  for (  String key : keys) {
    sortedKeys.add(Integer.parseInt(key));
  }
  Collections.sort(sortedKeys);
  for (  Integer keyIndex : sortedKeys) {
    String key=keyIndex.toString();
    AssemblyStats value=statsMap.get(key);
    writer.println(key + "String_Node_Str" + (value != null ? value.toStatsFileString() : "String_Node_Str"));
  }
  writer.close();
}
Program: 59741
Project: 59741
Buggy source:
public void createLinks(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  StringJoiner linkCmds=new StringJoiner("String_Node_Str");
  File scaffoldsDir=new File(args.getOutputDir(),"String_Node_Str");
  scaffoldsDir.mkdir();
  for (int i=0; i < args.getProcesses().size(); i++) {
    AbstractAmpArgs ampArgs=args.getProcesses().get(i).getAmpArgs();
    linkCmds.add(makeLinkCommand(ampArgs.getOutputFile(),new File(scaffoldsDir,"String_Node_Str" + i + "String_Node_Str")));
  }
  ExecutionContext linkingExecutionContext=new DefaultExecutionContext(executionContext.getLocality(),null,null,true);
  this.conanProcessService.execute(linkCmds.toString(),linkingExecutionContext);
}

Fixed version (ground truth):
public void createLinks(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  StringJoiner linkCmds=new StringJoiner("String_Node_Str");
  File scaffoldsDir=new File(args.getOutputDir(),"String_Node_Str");
  scaffoldsDir.mkdirs();
  for (int i=0; i < args.getProcesses().size(); i++) {
    AbstractAmpArgs ampArgs=args.getProcesses().get(i).getAmpArgs();
    linkCmds.add(makeLinkCommand(ampArgs.getOutputFile(),new File(scaffoldsDir,"String_Node_Str" + i + "String_Node_Str")));
  }
  ExecutionContext linkingExecutionContext=new DefaultExecutionContext(executionContext.getLocality(),null,null,true);
  this.conanProcessService.execute(linkCmds.toString(),linkingExecutionContext);
}
Program: 59742
Project: 59742
Buggy source:
protected void startJob() throws InterruptedException, TaskExecutionException {
  RampartArgs args=new RampartArgs();
  args.setConfig(this.options.getConfig());
  args.setOutputDir(this.options.getOutput());
  this.rampartPipeline.setStages(this.options.getStages());
  ConanUser rampartUser=new GuestUser("String_Node_Str");
  ConanTaskFactory conanTaskFactory=new DefaultTaskFactory();
  ConanTask<RampartPipeline> rampartTask=conanTaskFactory.createTask(this.rampartPipeline,0,args.getArgMap(),ConanTask.Priority.HIGHEST,rampartUser);
  rampartTask.setId("String_Node_Str");
  rampartTask.submit();
  rampartTask.execute(this.executionContext);
}

Fixed version (ground truth):
protected void startJob() throws InterruptedException, TaskExecutionException {
  RampartArgs args=new RampartArgs();
  args.setConfig(this.options.getConfig());
  args.setOutputDir(this.options.getOutput());
  RampartJobFileStructure jobFS=new RampartJobFileStructure(this.options.getOutput());
  this.rampartPipeline.setStages(this.options.getStages());
  QTArgs qtArgs=new QTArgs();
  qtArgs.setConfig(this.options.getConfig());
  qtArgs.setOutputDir(jobFS.getReadsDir());
  MultiMassArgs multiMassArgs=new MultiMassArgs();
  multiMassArgs.setConfigs(new ArrayList<File>(Arrays.asList(new File[]{jobFS.getConfigRawFile(),jobFS.getConfigQtFile()})));
  multiMassArgs.setOutputDir(jobFS.getMassDir());
  multiMassArgs.setJobPrefix("String_Node_Str");
  this.rampartPipeline.getQtProcess().setProcessArgs(qtArgs);
  this.rampartPipeline.getMultiMassProcess().setProcessArgs(multiMassArgs);
  ConanUser rampartUser=new GuestUser("String_Node_Str");
  ConanTaskFactory conanTaskFactory=new DefaultTaskFactory();
  ConanTask<RampartPipeline> rampartTask=conanTaskFactory.createTask(this.rampartPipeline,0,args.getArgMap(),ConanTask.Priority.HIGHEST,rampartUser);
  rampartTask.setId("String_Node_Str");
  rampartTask.submit();
  rampartTask.execute(this.executionContext);
}
Program: 59744
Project: 59744
Buggy source:
@Override public boolean execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  try {
    MultiMassArgs args=(MultiMassArgs)this.getProcessArgs();
    List<File> statsFiles=new ArrayList<File>();
    List<SingleMassArgs> singleMassArgsList=createSingleMassArgsList(args);
    for (    SingleMassArgs singleMassArgs : singleMassArgsList) {
      if (!singleMassArgs.getOutputDir().mkdirs()) {
        throw new IOException("String_Node_Str");
      }
      statsFiles.add(singleMassArgs.getStatsFile());
      this.conanProcessService.execute(new SingleMassProcess(singleMassArgs),executionContext);
    }
    if (executionContext.usingScheduler() && !executionContext.isForegroundJob()) {
      this.conanProcessService.waitFor(executionContext.getScheduler().createWaitCondition(ExitStatus.Type.COMPLETED_SUCCESS,args.getJobPrefix() + "String_Node_Str"),executionContext);
    }
    executeMassSelector(args,statsFiles,executionContext);
  }
 catch (  IOException ioe) {
    throw new ProcessExecutionException(-1,ioe);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {
  try {
    MultiMassArgs args=(MultiMassArgs)this.getProcessArgs();
    List<File> statsFiles=new ArrayList<File>();
    List<SingleMassArgs> singleMassArgsList=createSingleMassArgsList(args);
    for (    SingleMassArgs singleMassArgs : singleMassArgsList) {
      if (!singleMassArgs.getOutputDir().mkdirs()) {
        throw new IOException("String_Node_Str");
      }
      statsFiles.add(singleMassArgs.getStatsFile());
      SingleMassProcess singleMassProcess=new SingleMassProcess(singleMassArgs);
      singleMassProcess.setConanProcessService(this.getConanProcessService());
      singleMassProcess.execute(executionContext);
    }
    if (executionContext.usingScheduler() && !executionContext.isForegroundJob()) {
      this.conanProcessService.waitFor(executionContext.getScheduler().createWaitCondition(ExitStatus.Type.COMPLETED_SUCCESS,args.getJobPrefix() + "String_Node_Str"),executionContext);
    }
    executeMassSelector(args,statsFiles,executionContext);
  }
 catch (  IOException ioe) {
    throw new ProcessExecutionException(-1,ioe);
  }
  return true;
}
Program: 59745
Project: 59745
Buggy source:
@Override public String getCommand(){
  return this.getFullCommand();
}

Fixed version (ground truth):
@Override public String getCommand(){
  return null;
}
Program: 59747
Project: 59747
Buggy source:
@Override public String getCommand(){
  return this.getFullCommand();
}

Fixed version (ground truth):
@Override public String getCommand(){
  return null;
}
Program: 59748
Project: 59748
Buggy source:
@Test public void testMassViaCLI() throws InterruptedException, ProcessExecutionException, URISyntaxException {
  File outputDir=temp.newFolder("String_Node_Str");
  File cfgFile=FileUtils.toFile(this.getClass().getResource("String_Node_Str"));
  RampartCLI.main(new String[]{"String_Node_Str",cfgFile.getAbsolutePath(),"String_Node_Str",outputDir.getAbsolutePath(),"String_Node_Str","String_Node_Str"});
}

Fixed version (ground truth):
@Test public void testMassViaCLI() throws InterruptedException, ProcessExecutionException, URISyntaxException, IOException {
  File outputDir=temp.newFolder("String_Node_Str");
  RampartJobFileStructure jobFS=new RampartJobFileStructure(outputDir);
  jobFS.getReadsDir().mkdir();
  File cfgFile1=FileUtils.toFile(this.getClass().getResource("String_Node_Str"));
  File cfgFile2=FileUtils.toFile(this.getClass().getResource("String_Node_Str"));
  FileUtils.copyFile(cfgFile1,jobFS.getConfigRawFile());
  FileUtils.copyFile(cfgFile2,jobFS.getConfigQtFile());
  RampartCLI.main(new String[]{"String_Node_Str",cfgFile1.getAbsolutePath(),"String_Node_Str",outputDir.getAbsolutePath(),"String_Node_Str","String_Node_Str"});
}
Program: 59749
Project: 59749
Buggy source:
public AssemblyStatsMatrixRow(AssemblyStats assemblyStats){
  this.stats[IDX_NB_CONTIGS]=assemblyStats.getNbContigs();
  this.stats[IDX_NB_BASES]=assemblyStats.getNbBases();
  this.stats[IDX_A_PERC]=assemblyStats.getaPerc();
  this.stats[IDX_C_PERC]=assemblyStats.getcPerc();
  this.stats[IDX_G_PERC]=assemblyStats.getgPerc();
  this.stats[IDX_T_PERC]=assemblyStats.gettPerc();
  this.stats[IDX_N_PERC]=assemblyStats.getnPerc();
  this.stats[IDX_MIN_LEN]=assemblyStats.getMinLen();
  this.stats[IDX_AVG_LEN]=assemblyStats.getAvgLen();
  this.stats[IDX_MAX_LEN]=assemblyStats.getMaxLen();
  this.stats[IDX_N_80]=assemblyStats.getN80();
  this.stats[IDX_N_50]=assemblyStats.getN50();
  this.stats[IDX_N_20]=assemblyStats.getN20();
  this.stats[IDX_L_50]=assemblyStats.getL50();
}

Fixed version (ground truth):
public AssemblyStatsMatrixRow(AssemblyStats assemblyStats){
  this.stats=new double[14];
  this.stats[IDX_NB_CONTIGS]=assemblyStats.getNbContigs();
  this.stats[IDX_NB_BASES]=assemblyStats.getNbBases();
  this.stats[IDX_A_PERC]=assemblyStats.getaPerc();
  this.stats[IDX_C_PERC]=assemblyStats.getcPerc();
  this.stats[IDX_G_PERC]=assemblyStats.getgPerc();
  this.stats[IDX_T_PERC]=assemblyStats.gettPerc();
  this.stats[IDX_N_PERC]=assemblyStats.getnPerc();
  this.stats[IDX_MIN_LEN]=assemblyStats.getMinLen();
  this.stats[IDX_AVG_LEN]=assemblyStats.getAvgLen();
  this.stats[IDX_MAX_LEN]=assemblyStats.getMaxLen();
  this.stats[IDX_N_80]=assemblyStats.getN80();
  this.stats[IDX_N_50]=assemblyStats.getN50();
  this.stats[IDX_N_20]=assemblyStats.getN20();
  this.stats[IDX_L_50]=assemblyStats.getL50();
}
Program: 59750
Project: 59750
Buggy source:
@Override public List<ConanProcess> getProcesses(){
  List<ConanProcess> cProcs=new ArrayList<ConanProcess>();
  for (  SimpleIOProcess simpleIOProcess : this.args.getProcesses()) {
    cProcs.add(simpleIOProcess);
  }
  return cProcs;
}

Fixed version (ground truth):
@Override public List<ConanProcess> getProcesses(){
  List<ConanProcess> cProcs=new ArrayList<ConanProcess>();
  for (  AbstractIOProcess abstractIOProcess : this.args.getProcesses()) {
    cProcs.add(abstractIOProcess);
  }
  return cProcs;
}
Program: 59751
Project: 59751
Buggy source:
protected AssemblerArgs(){
  this.kmer=65;
  this.threads=0;
  this.outputDir=new File("String_Node_Str");
  this.libraries=new ArrayList<Library>();
}

Fixed version (ground truth):
protected AssemblerArgs(){
  this.kmer=65;
  this.coverageCutoff=0;
  this.threads=0;
  this.outputDir=new File("String_Node_Str");
  this.libraries=new ArrayList<Library>();
}
Program: 59752
Project: 59752
Buggy source:
@Override public void setFromArgMap(Map<ConanParameter,String> pvp){
  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();
    String val=entry.getValue();
    if (param.equals(this.params.getName().getName())) {
      this.name=val;
    }
 else     if (param.equals(this.params.getKmer().getName())) {
      this.setKmer(Integer.parseInt(val));
    }
 else     if (param.equals(this.params.getNbContigPairs().getName())) {
      this.nbContigPairs=Integer.parseInt(val);
    }
 else     if (param.equals(this.params.getThreads().getName())) {
      this.setThreads(Integer.parseInt(val));
    }
 else     if (param.equals(this.params.getLibs().getName())) {
      this.setLibraries(null);
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + param);
    }
  }
}

Fixed version (ground truth):
@Override public void setFromArgMap(Map<ConanParameter,String> pvp){
  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();
    String val=entry.getValue();
    if (param.equals(this.params.getName().getName())) {
      this.name=val;
    }
 else     if (param.equals(this.params.getKmer().getName())) {
      this.setKmer(Integer.parseInt(val));
    }
 else     if (param.equals(this.params.getCoverageCutoff().getName())) {
      this.setCoverageCutoff(Integer.parseInt(val));
    }
 else     if (param.equals(this.params.getNbContigPairs().getName())) {
      this.nbContigPairs=Integer.parseInt(val);
    }
 else     if (param.equals(this.params.getThreads().getName())) {
      this.setThreads(Integer.parseInt(val));
    }
 else     if (param.equals(this.params.getLibs().getName())) {
      this.setLibraries(AbyssV134InputLibsArg.parse(val).getLibs());
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + param);
    }
  }
}
Program: 59753
Project: 59753
Buggy source:
@Override public Map<ConanParameter,String> getArgMap(){
  Map<ConanParameter,String> pvp=new LinkedHashMap<ConanParameter,String>();
  if (this.name != null)   pvp.put(params.getName(),params.getName().getName() + "String_Node_Str" + this.name);
  if (this.nbContigPairs != 10)   pvp.put(params.getNbContigPairs(),params.getNbContigPairs().getName() + "String_Node_Str" + Integer.toString(this.nbContigPairs));
  pvp.put(params.getKmer(),params.getKmer().getName() + "String_Node_Str" + Integer.toString(this.getKmer()));
  if (this.getThreads() > 1)   pvp.put(params.getThreads(),params.getThreads().getName() + "String_Node_Str" + Integer.toString(this.getThreads()));
  if (this.getLibraries() != null && !this.getLibraries().isEmpty())   pvp.put(params.getLibs(),new AbyssV134InputLibsArg(this.getLibraries()).toString());
  return pvp;
}

Fixed version (ground truth):
@Override public Map<ConanParameter,String> getArgMap(){
  Map<ConanParameter,String> pvp=new LinkedHashMap<ConanParameter,String>();
  if (this.name != null) {
    pvp.put(params.getName(),params.getName().getName() + "String_Node_Str" + this.name);
  }
  if (this.nbContigPairs != 10) {
    pvp.put(params.getNbContigPairs(),params.getNbContigPairs().getName() + "String_Node_Str" + Integer.toString(this.nbContigPairs));
  }
  if (this.getKmer() > 0) {
    pvp.put(params.getKmer(),params.getKmer().getName() + "String_Node_Str" + Integer.toString(this.getKmer()));
  }
  if (this.getCoverageCutoff() > 0) {
    pvp.put(params.getCoverageCutoff(),params.getCoverageCutoff().getName() + "String_Node_Str" + Integer.toString(this.getCoverageCutoff()));
  }
  if (this.getThreads() > 1) {
    pvp.put(params.getThreads(),params.getThreads().getName() + "String_Node_Str" + Integer.toString(this.getThreads()));
  }
  if (this.getLibraries() != null && !this.getLibraries().isEmpty()) {
    pvp.put(params.getLibs(),new AbyssV134InputLibsArg(this.getLibraries()).toString());
  }
  return pvp;
}
Program: 59754
Project: 59754
Buggy source:
public static AbyssV134InputLibsArg parse(String libs){
  return new AbyssV134InputLibsArg();
}

Fixed version (ground truth):
public static AbyssV134InputLibsArg parse(String libs){
  AbyssV134InputLibsArg libsArg=new AbyssV134InputLibsArg();
  List<String> peLibs=getAbyssArgs(libs,"String_Node_Str");
  List<String> mpLibs=getAbyssArgs(libs,"String_Node_Str");
  List<String> seLibs=getAbyssArgs(libs,"String_Node_Str");
  List<Library> allLibs=new ArrayList<Library>();
  for (  String peLib : peLibs) {
    List<String> peLibPaths=getAbyssArgs(libs,peLib);
    if (peLibPaths.size() == 2) {
      allLibs.add(createNewPELibrary(peLibPaths.get(0),peLibPaths.get(1),Library.Type.PE));
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  for (  String mpLib : mpLibs) {
    List<String> mpLibPaths=getAbyssArgs(libs,mpLib);
    if (mpLibPaths.size() == 2) {
      allLibs.add(createNewPELibrary(mpLibPaths.get(0),mpLibPaths.get(1),Library.Type.MP));
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  for (  String seLib : seLibs) {
    allLibs.add(createNewSELibrary(seLib));
  }
  libsArg.setLibs(allLibs);
  return libsArg;
}
Program: 59755
Project: 59755
Buggy source:
@Override public List<ConanParameter> getConanParameters(){
  return new ArrayList<ConanParameter>(Arrays.asList(new ConanParameter[]{this.libs,this.nbContigPairs,this.kmer,this.threads,this.name}));
}

Fixed version (ground truth):
@Override public List<ConanParameter> getConanParameters(){
  return new ArrayList<ConanParameter>(Arrays.asList(new ConanParameter[]{this.libs,this.nbContigPairs,this.kmer,this.coverageCutoff,this.threads,this.name}));
}
Program: 59756
Project: 59756
Buggy source:
public AbyssV134Params(){
  this.libs=new AbyssV134InputLibsParameter();
  this.nbContigPairs=new NumericParameter("String_Node_Str","String_Node_Str",true);
  this.kmer=new NumericParameter("String_Node_Str","String_Node_Str",false);
  this.threads=new NumericParameter("String_Node_Str","String_Node_Str",false);
  this.name=new DefaultConanParameter("String_Node_Str","String_Node_Str",false,false,false);
}

Fixed version (ground truth):
public AbyssV134Params(){
  this.libs=new AbyssV134InputLibsParameter();
  this.nbContigPairs=new NumericParameter("String_Node_Str","String_Node_Str",true);
  this.kmer=new NumericParameter("String_Node_Str","String_Node_Str",false);
  this.coverageCutoff=new NumericParameter("String_Node_Str","String_Node_Str",false);
  this.threads=new NumericParameter("String_Node_Str","String_Node_Str",false);
  this.name=new DefaultConanParameter("String_Node_Str","String_Node_Str",false,false,false);
}