nus-yam/ex-repair huggingface dataset:
Program: 188885
Project: 188885
Buggy source:
@Test public void testSequencerRunAnnotateArbitrary() throws IOException {
  annotateAndReannotate(AttributeType.SEQUENCER_RUN,47150);
}

Fixed version (ground truth):
@Test public void testSequencerRunAnnotateArbitrary() throws IOException {
  ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
  annotateAndReannotate(AttributeType.SEQUENCER_RUN,47150);
}
Program: 188886
Project: 188886
Buggy source:
@Test public void testSequencerRunSkipOnly() throws IOException {
  toggleSkipOnly(AttributeType.SEQUENCER_RUN,47150);
}

Fixed version (ground truth):
@Test public void testSequencerRunSkipOnly() throws IOException {
  ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
  toggleSkipOnly(AttributeType.SEQUENCER_RUN,47150);
}
Program: 188887
Project: 188887
Buggy source:
@Test public void testSequencerRunSkipValue() throws IOException {
  annotateSkipImplicitly(AttributeType.SEQUENCER_RUN,4715);
}

Fixed version (ground truth):
@Test public void testSequencerRunSkipValue() throws IOException {
  ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
  annotateSkipImplicitly(AttributeType.SEQUENCER_RUN,4715);
}
Program: 188888
Project: 188888
Buggy source:
@Test public void testSequencerRunSkipValue() throws IOException {
  annotateSkipImplicitly(AttributeType.SEQUENCER_RUN,4715);
}

Fixed version (ground truth):
@Test public void testSequencerRunSkipValue() throws IOException {
  ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
  annotateSkipImplicitly(AttributeType.SEQUENCER_RUN,4715);
}
Program: 188889
Project: 188889
Buggy source:
private void reportOnWorkflowRun(String workflowRunAccession) throws IOException {
  String title="String_Node_Str" + workflowRunAccession;
  initWriter(title);
  String report=metadata.getWorkflowRunReport(Integer.parseInt(workflowRunAccession));
  if (report == null) {
    println("String_Node_Str");
    ret=new ReturnValue(ReturnValue.INVALIDPARAMETERS);
    return;
  }
  if (options.has("String_Node_Str")) {
    writer.write(TabExpansionUtil.expansion(report));
    return;
  }
  writer.write(report);
}

Fixed version (ground truth):
private void reportOnWorkflowRun(String workflowRunAccession) throws IOException {
  String title="String_Node_Str" + workflowRunAccession;
  initWriter(title);
  String report;
  try {
    report=metadata.getWorkflowRunReport(Integer.parseInt(workflowRunAccession));
  }
 catch (  RuntimeException e) {
    println("String_Node_Str");
    ret=new ReturnValue(ReturnValue.INVALIDPARAMETERS);
    return;
  }
  if (options.has("String_Node_Str")) {
    writer.write(TabExpansionUtil.expansion(report));
    return;
  }
  writer.write(report);
}
Program: 188890
Project: 188890
Buggy source:
private void reportOnWorkflow(String workflowAccession,Date earlyDate,Date lateDate) throws IOException {
  String title="String_Node_Str" + workflowAccession;
  if (earlyDate != null) {
    title+="String_Node_Str" + dateFormat.format(earlyDate);
  }
  if (lateDate != null) {
    title+="String_Node_Str" + dateFormat.format(lateDate);
  }
  initWriter(title);
  String report=metadata.getWorkflowRunReport(Integer.parseInt(workflowAccession),earlyDate,lateDate);
  if (report == null) {
    println("String_Node_Str");
    ret=new ReturnValue(ReturnValue.INVALIDPARAMETERS);
    return;
  }
  if (options.has("String_Node_Str")) {
    writer.write(TabExpansionUtil.expansion(report));
    return;
  }
  writer.write(report);
}

Fixed version (ground truth):
private void reportOnWorkflow(String workflowAccession,Date earlyDate,Date lateDate) throws IOException {
  String title="String_Node_Str" + workflowAccession;
  if (earlyDate != null) {
    title+="String_Node_Str" + dateFormat.format(earlyDate);
  }
  if (lateDate != null) {
    title+="String_Node_Str" + dateFormat.format(lateDate);
  }
  initWriter(title);
  String report;
  try {
    report=metadata.getWorkflowRunReport(Integer.parseInt(workflowAccession),earlyDate,lateDate);
  }
 catch (  RuntimeException e) {
    println("String_Node_Str");
    ret=new ReturnValue(ReturnValue.INVALIDPARAMETERS);
    return;
  }
  if (options.has("String_Node_Str")) {
    writer.write(TabExpansionUtil.expansion(report));
    return;
  }
  writer.write(report);
}
Program: 188891
Project: 188891
Buggy source:
private void reportOnWorkflowRuns(Date earlyDate,Date lateDate) throws IOException {
  String title="String_Node_Str";
  if (earlyDate != null) {
    title+="String_Node_Str" + dateFormat.format(earlyDate);
  }
  if (lateDate != null) {
    title+="String_Node_Str" + dateFormat.format(lateDate);
  }
  initWriter(title);
  String report=metadata.getWorkflowRunReport(earlyDate,lateDate);
  if (report == null) {
    println("String_Node_Str");
    ret=new ReturnValue(ReturnValue.SUCCESS);
    return;
  }
  if (options.has("String_Node_Str")) {
    writer.write(TabExpansionUtil.expansion(report));
    return;
  }
  writer.write(report);
}

Fixed version (ground truth):
private void reportOnWorkflowRuns(Date earlyDate,Date lateDate) throws IOException {
  String title="String_Node_Str";
  if (earlyDate != null) {
    title+="String_Node_Str" + dateFormat.format(earlyDate);
  }
  if (lateDate != null) {
    title+="String_Node_Str" + dateFormat.format(lateDate);
  }
  initWriter(title);
  String report;
  try {
    report=metadata.getWorkflowRunReport(earlyDate,lateDate);
  }
 catch (  RuntimeException e) {
    println("String_Node_Str");
    ret=new ReturnValue(ReturnValue.SUCCESS);
    return;
  }
  if (options.has("String_Node_Str")) {
    writer.write(TabExpansionUtil.expansion(report));
    return;
  }
  writer.write(report);
}
Program: 188892
Project: 188892
Buggy source:
@Override public Map<String,SqwFile> setupFiles(){
  try {
    SqwFile file0=this.createFile("String_Node_Str");
    file0.setSourcePath(getProperty("String_Node_Str"));
    file0.setType("String_Node_Str");
    file0.setIsInput(true);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    throw new RuntimeException(e);
  }
  return this.getFiles();
}

Fixed version (ground truth):
@Override public Map<String,SqwFile> setupFiles(){
  try {
    SqwFile file0=this.createFile("String_Node_Str");
    file0.setSourcePath(getProperty("String_Node_Str"));
    file0.setType("String_Node_Str");
    file0.setIsInput(true);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    throw new RuntimeException(ex);
  }
  return this.getFiles();
}
Program: 188893
Project: 188893
Buggy source:
@Test public void testModifyingTheWorkflow() throws IOException {
  Log.info("String_Node_Str" + JavaClient.getAbsolutePath());
  List<String> readLines=FileUtils.readLines(JavaClient);
  boolean linesAdded=false;
  for (int i=0; i < readLines.size(); i++) {
    if (readLines.get(i).contains("String_Node_Str")) {
      readLines.add(i,"String_Node_Str" + "String_Node_Str");
      linesAdded=true;
    }
  }
  Assert.assertTrue("String_Node_Str",linesAdded);
  FileUtils.writeLines(JavaClient,readLines,false);
  File buildDir=BundleDir;
  Log.info("String_Node_Str" + buildDir.getAbsolutePath());
  String command="String_Node_Str";
  String genOutput=ITUtility.runArbitraryCommand(command,0,buildDir);
}

Fixed version (ground truth):
@Test public void testModifyingTheWorkflow() throws IOException {
  Log.info("String_Node_Str" + JavaClient.getAbsolutePath());
  List<String> readLines=FileUtils.readLines(JavaClient);
  boolean linesAdded=false;
  for (int i=0; i < readLines.size(); i++) {
    if (readLines.get(i).contains("String_Node_Str")) {
      readLines.remove(i);
      readLines.add(i,"String_Node_Str" + "String_Node_Str");
      linesAdded=true;
    }
  }
  Assert.assertTrue("String_Node_Str",linesAdded);
  FileUtils.writeLines(JavaClient,readLines,false);
  File buildDir=BundleDir;
  Log.info("String_Node_Str" + buildDir.getAbsolutePath());
  String command="String_Node_Str";
  String genOutput=ITUtility.runArbitraryCommand(command,0,buildDir);
}
Program: 188895
Project: 188895
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public ReturnValue init(){
  try {
    String lock=appID;
    if (options.has("String_Node_Str")) {
      Log.stderr("String_Node_Str");
      lock=ConfigTools.getSettings().get("String_Node_Str");
    }
    JUnique.acquireLock(lock);
  }
 catch (  AlreadyLockedException e) {
    Log.error("String_Node_Str" + appID + "String_Node_Str");
    classReturnValue.setExitStatus(ReturnValue.FAILURE);
  }
  if (classReturnValue.getExitStatus() != ReturnValue.SUCCESS) {
    return (classReturnValue);
  }
  LocalhostPair localhost=FileTools.getLocalhost(options);
  if (localhost.returnValue != null && localhost.returnValue.getExitStatus() != ReturnValue.SUCCESS) {
    return (localhost.returnValue);
  }
 else {
    this.hostname=localhost.hostname;
  }
  if (this.config.get("String_Node_Str") == null || "String_Node_Str".equals(this.config.get("String_Node_Str"))) {
    Log.error("String_Node_Str");
    classReturnValue.setExitStatus(ReturnValue.FAILURE);
  }
  this.username=this.config.get("String_Node_Str");
  classReturnValue.setExitStatus(ReturnValue.SUCCESS);
  return classReturnValue;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public ReturnValue init(){
  RunLock.acquire();
  if (classReturnValue.getExitStatus() != ReturnValue.SUCCESS) {
    return (classReturnValue);
  }
  LocalhostPair localhost=FileTools.getLocalhost(options);
  if (localhost.returnValue != null && localhost.returnValue.getExitStatus() != ReturnValue.SUCCESS) {
    return (localhost.returnValue);
  }
 else {
    this.hostname=localhost.hostname;
  }
  if (this.config.get("String_Node_Str") == null || "String_Node_Str".equals(this.config.get("String_Node_Str"))) {
    Log.error("String_Node_Str");
    classReturnValue.setExitStatus(ReturnValue.FAILURE);
  }
  this.username=this.config.get("String_Node_Str");
  classReturnValue.setExitStatus(ReturnValue.SUCCESS);
  return classReturnValue;
}
Program: 188896
Project: 188896
Buggy source:
/** 
 * <p> Constructor for WorkflowStatusChecker. </p>
 */
public WorkflowStatusChecker(){
  super();
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str").withRequiredArg();
  parser.acceptsAll(Arrays.asList(WORKFLOW_RUN_ACCESSION,"String_Node_Str"),"String_Node_Str").withRequiredArg().withValuesSeparatedBy(',').ofType(Integer.class);
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str").withRequiredArg();
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str").withRequiredArg();
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str");
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str").withRequiredArg().ofType(Integer.class);
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  classReturnValue.setExitStatus(ReturnValue.SUCCESS);
}

Fixed version (ground truth):
/** 
 * <p> Constructor for WorkflowStatusChecker. </p>
 */
public WorkflowStatusChecker(){
  super();
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str").withRequiredArg();
  parser.acceptsAll(Arrays.asList(WORKFLOW_RUN_ACCESSION,"String_Node_Str"),"String_Node_Str").withRequiredArg().withValuesSeparatedBy(',').ofType(Integer.class);
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str").withRequiredArg();
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str").withRequiredArg();
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str");
  parser.acceptsAll(Arrays.asList("String_Node_Str","String_Node_Str"),"String_Node_Str").withRequiredArg().ofType(Integer.class);
  classReturnValue.setExitStatus(ReturnValue.SUCCESS);
}
Program: 188897
Project: 188897
Buggy source:
@After public void cleanMocks(){
  JUnique.releaseLock(WorkflowStatusChecker.appID);
}

Fixed version (ground truth):
@After public void cleanMocks(){
  RunLock.release();
}
Program: 188898
Project: 188898
Buggy source:
/** 
 * Use SQL to directly retrieve relevant workflows runs (defined as any workflow runs that  include one or more files in the set we were given)
 * @param files
 * @return
 * @throws SQLException 
 */
private WorkflowRunList2 directRetrieveWorkflowRuns(List<Integer> files) throws SQLException {
  final WorkflowRunList2 runs=new WorkflowRunList2();
  runs.setList(new ArrayList());
  if (files.size() > 0) {
    ResultSet rs=null;
    MetadataDB mdb=null;
    try {
      WorkflowRunService ss=BeanFactory.getWorkflowRunServiceBean();
      StringBuilder query=new StringBuilder();
      query.append("String_Node_Str");
      query.append("String_Node_Str");
      for (int i=0; i < files.size() - 1; i++) {
        Integer fInt=files.get(i);
        query.append("String_Node_Str").append(fInt).append("String_Node_Str");
      }
      Integer fInt=files.get(files.size() - 1);
      query.append("String_Node_Str").append(fInt).append("String_Node_Str");
      query.append("String_Node_Str");
      Log.info("String_Node_Str" + query);
      mdb=DBAccess.get();
      rs=mdb.executeQuery(query.toString());
      while (rs.next()) {
        int workflowSWID=rs.getInt("String_Node_Str");
        WorkflowRun workflowRun=(WorkflowRun)testIfNull(ss.findBySWAccession(workflowSWID));
        runs.add(workflowRun);
      }
    }
  finally {
      if (mdb != null) {
        DbUtils.closeQuietly(mdb.getDb(),mdb.getSql(),rs);
      }
      DBAccess.close();
    }
  }
  return runs;
}

Fixed version (ground truth):
/** 
 * Use SQL to directly retrieve relevant workflows runs (defined as any workflow runs that  include one or more files in the set we were given)
 * @param files
 * @return
 * @throws SQLException 
 */
private WorkflowRunList2 directRetrieveWorkflowRuns(List<Integer> files) throws SQLException {
  final Hibernate3DtoCopier copier=new Hibernate3DtoCopier();
  final WorkflowRunList2 runs=new WorkflowRunList2();
  runs.setList(new ArrayList());
  if (files.size() > 0) {
    ResultSet rs=null;
    MetadataDB mdb=null;
    try {
      WorkflowRunService ss=BeanFactory.getWorkflowRunServiceBean();
      StringBuilder query=new StringBuilder();
      query.append("String_Node_Str");
      query.append("String_Node_Str");
      for (int i=0; i < files.size() - 1; i++) {
        Integer fInt=files.get(i);
        query.append("String_Node_Str").append(fInt).append("String_Node_Str");
      }
      Integer fInt=files.get(files.size() - 1);
      query.append("String_Node_Str").append(fInt).append("String_Node_Str");
      query.append("String_Node_Str");
      Log.info("String_Node_Str" + query);
      mdb=DBAccess.get();
      rs=mdb.executeQuery(query.toString());
      while (rs.next()) {
        int workflowSWID=rs.getInt("String_Node_Str");
        WorkflowRun workflowRun=(WorkflowRun)testIfNull(ss.findBySWAccession(workflowSWID));
        WorkflowRun dto=copier.hibernate2dto(WorkflowRun.class,workflowRun);
        runs.add(dto);
      }
    }
  finally {
      if (mdb != null) {
        DbUtils.closeQuietly(mdb.getDb(),mdb.getSql(),rs);
      }
      DBAccess.close();
    }
  }
  return runs;
}
Program: 188900
Project: 188900
Buggy source:
private List<String> runnerArgs(){
  List<String> args=runnerMetaDataArgs();
  args.add("String_Node_Str");
  args.add("String_Node_Str");
  args.add("String_Node_Str");
  if (file.isInput()) {
    args.add("String_Node_Str");
    args.add("String_Node_Str");
    args.add(file.getSourcePath());
    args.add("String_Node_Str");
    args.add(outputDir);
  }
 else {
    args.add("String_Node_Str");
    args.add(String.format("String_Node_Str",jobObj.getAlgo(),file.getType(),oozie_working_dir,file.getSourcePath()));
  }
  if (file.getOutputPath() != null) {
    args.add("String_Node_Str");
    args.add(file.getOutputPath());
  }
 else   if (file.isInput()) {
    args.add("String_Node_Str");
    args.add(outputDir);
  }
 else {
    args.add("String_Node_Str");
    args.add(metadataOutputPrefix + "String_Node_Str" + outputDir);
  }
  if (file.isForceCopy()) {
    args.add("String_Node_Str");
  }
  return args;
}

Fixed version (ground truth):
private List<String> runnerArgs(){
  List<String> args=runnerMetaDataArgs();
  args.add("String_Node_Str");
  args.add("String_Node_Str");
  args.add("String_Node_Str");
  if (file.isInput()) {
    args.add("String_Node_Str");
    args.add("String_Node_Str");
    args.add(file.getSourcePath());
    if (file.getOutputPath() != null) {
      args.add("String_Node_Str");
      args.add(file.getOutputPath());
    }
 else {
      args.add("String_Node_Str");
      args.add(outputDir);
    }
  }
 else {
    args.add("String_Node_Str");
    args.add(String.format("String_Node_Str",jobObj.getAlgo(),file.getType(),oozie_working_dir,file.getSourcePath()));
    if (file.getOutputPath() != null) {
      args.add("String_Node_Str");
      args.add(file.getOutputPath());
    }
 else {
      args.add("String_Node_Str");
      args.add(metadataOutputPrefix + "String_Node_Str" + outputDir);
    }
  }
  if (file.isForceCopy()) {
    args.add("String_Node_Str");
  }
  return args;
}
Program: 188901
Project: 188901
Buggy source:
/** 
 * @return ReturnValue
 */
protected ReturnValue addWorkflowRun(){
  String[] necessaryFields={"String_Node_Str","String_Node_Str"};
  if (interactive) {
    print("String_Node_Str");
  }
  ReturnValue ret=new ReturnValue(ReturnValue.SUCCESS);
  if (checkFields(necessaryFields)) {
    int workflowRunId=metadata.add_workflow_run(Integer.parseInt(fields.get("String_Node_Str")));
    int workflowRunAccession=metadata.get_workflow_run_accession(workflowRunId);
    print("String_Node_Str" + workflowRunAccession);
    int[] parents=parseParentAccessions();
    ReturnValue metaret=metadata.add_empty_processing_event_by_parent_accession(parents);
    int processingId=metaret.getReturnValue();
    ReturnValue newRet=new ReturnValue();
    newRet.setFiles(this.files);
    metadata.update_processing_event(processingId,newRet);
    metadata.update_processing_workflow_run(processingId,workflowRunAccession);
    WorkflowRun wr=metadata.getWorkflowRun(workflowRunAccession);
    wr.setStatus(fields.get("String_Node_Str"));
    wr.setStdOut(fields.get("String_Node_Str"));
    wr.setStdErr(fields.get("String_Node_Str"));
    metadata.update_workflow_run(wr.getWorkflowRunId(),wr.getCommand(),wr.getTemplate(),wr.getStatus(),wr.getStatusCmd(),wr.getCurrentWorkingDir(),wr.getDax(),wr.getIniFile(),wr.getHost(),0,0,wr.getStdErr(),wr.getStdOut(),wr.getWorkflowEngine());
  }
 else {
    Log.error("String_Node_Str");
    ret.setExitStatus(ReturnValue.INVALIDPARAMETERS);
  }
  return (ret);
}

Fixed version (ground truth):
/** 
 * @return ReturnValue
 */
protected ReturnValue addWorkflowRun(){
  String[] necessaryFields={"String_Node_Str","String_Node_Str"};
  if (interactive) {
    print("String_Node_Str");
  }
  ReturnValue ret=new ReturnValue(ReturnValue.SUCCESS);
  if (checkFields(necessaryFields)) {
    int workflowRunId=metadata.add_workflow_run(Integer.parseInt(fields.get("String_Node_Str")));
    int workflowRunAccession=metadata.get_workflow_run_accession(workflowRunId);
    print("String_Node_Str" + workflowRunAccession);
    int[] parents=parseParentAccessions();
    ReturnValue metaret=metadata.add_empty_processing_event_by_parent_accession(parents);
    int processingId=metaret.getReturnValue();
    ReturnValue newRet=new ReturnValue();
    newRet.setFiles(this.files);
    metadata.update_processing_event(processingId,newRet);
    metadata.update_processing_workflow_run(processingId,workflowRunAccession);
    WorkflowRun wr=metadata.getWorkflowRun(workflowRunAccession);
    wr.setStatus(fields.get("String_Node_Str"));
    wr.setStdOut(fields.get("String_Node_Str"));
    wr.setStdErr(fields.get("String_Node_Str"));
    metadata.update_workflow_run(wr.getWorkflowRunId(),wr.getCommand(),wr.getTemplate(),wr.getStatus(),wr.getStatusCmd(),wr.getCurrentWorkingDir(),wr.getDax(),wr.getIniFile(),wr.getHost(),wr.getStdErr(),wr.getStdOut(),wr.getWorkflowEngine());
  }
 else {
    Log.error("String_Node_Str");
    ret.setExitStatus(ReturnValue.INVALIDPARAMETERS);
  }
  return (ret);
}
Program: 188902
Project: 188902
Buggy source:
protected static Element addProp(Element config,String name,String value){
  Element prop=add(config,"String_Node_Str");
  add(prop,"String_Node_Str",name);
  add(prop,"String_Node_Str",value);
  config.addContent(prop);
  return prop;
}

Fixed version (ground truth):
protected static Element addProp(Element config,String name,String value){
  Element prop=add(config,"String_Node_Str");
  add(prop,"String_Node_Str",name);
  add(prop,"String_Node_Str",value);
  return prop;
}
Program: 188903
Project: 188903
Buggy source:
/** 
 * @return ReturnValue
 */
protected ReturnValue addWorkflowRun(){
  String[] necessaryFields={"String_Node_Str","String_Node_Str"};
  if (interactive) {
    print("String_Node_Str");
  }
  ReturnValue ret=new ReturnValue(ReturnValue.SUCCESS);
  if (checkFields(necessaryFields)) {
    int workflowRunId=metadata.add_workflow_run(Integer.parseInt(fields.get("String_Node_Str")));
    int workflowRunAccession=metadata.get_workflow_run_accession(workflowRunId);
    print("String_Node_Str" + workflowRunAccession);
    int[] parents=parseParentAccessions();
    ReturnValue metaret=metadata.add_empty_processing_event_by_parent_accession(parents);
    int processingId=metaret.getReturnValue();
    ReturnValue newRet=new ReturnValue();
    newRet.setFiles(this.files);
    metadata.update_processing_event(processingId,newRet);
    metadata.update_processing_workflow_run(processingId,workflowRunAccession);
    WorkflowRun wr=metadata.getWorkflowRun(workflowRunAccession);
    wr.setStatus(fields.get("String_Node_Str"));
    wr.setStdOut(fields.get("String_Node_Str"));
    wr.setStdErr(fields.get("String_Node_Str"));
    metadata.update_workflow_run(wr.getWorkflowRunId(),wr.getCommand(),wr.getTemplate(),wr.getStatus(),wr.getStatusCmd(),wr.getCurrentWorkingDir(),wr.getDax(),wr.getIniFile(),wr.getHost(),0,0,wr.getStdErr(),wr.getStdOut(),wr.getWorkflowEngine());
  }
 else {
    Log.error("String_Node_Str");
    ret.setExitStatus(ReturnValue.INVALIDPARAMETERS);
  }
  return (ret);
}

Fixed version (ground truth):
/** 
 * @return ReturnValue
 */
protected ReturnValue addWorkflowRun(){
  String[] necessaryFields={"String_Node_Str","String_Node_Str"};
  if (interactive) {
    print("String_Node_Str");
  }
  ReturnValue ret=new ReturnValue(ReturnValue.SUCCESS);
  if (checkFields(necessaryFields)) {
    int workflowRunId=metadata.add_workflow_run(Integer.parseInt(fields.get("String_Node_Str")));
    int workflowRunAccession=metadata.get_workflow_run_accession(workflowRunId);
    print("String_Node_Str" + workflowRunAccession);
    int[] parents=parseParentAccessions();
    ReturnValue metaret=metadata.add_empty_processing_event_by_parent_accession(parents);
    int processingId=metaret.getReturnValue();
    ReturnValue newRet=new ReturnValue();
    newRet.setFiles(this.files);
    metadata.update_processing_event(processingId,newRet);
    metadata.update_processing_workflow_run(processingId,workflowRunAccession);
    WorkflowRun wr=metadata.getWorkflowRun(workflowRunAccession);
    wr.setStatus(fields.get("String_Node_Str"));
    wr.setStdOut(fields.get("String_Node_Str"));
    wr.setStdErr(fields.get("String_Node_Str"));
    metadata.update_workflow_run(wr.getWorkflowRunId(),wr.getCommand(),wr.getTemplate(),wr.getStatus(),wr.getStatusCmd(),wr.getCurrentWorkingDir(),wr.getDax(),wr.getIniFile(),wr.getHost(),wr.getStdErr(),wr.getStdOut(),wr.getWorkflowEngine());
  }
 else {
    Log.error("String_Node_Str");
    ret.setExitStatus(ReturnValue.INVALIDPARAMETERS);
  }
  return (ret);
}
Program: 188905
Project: 188905
Buggy source:
/** 
 * Get the localhost and a return value describing the failure condition if we are unable to get the localhost
 * @param options
 * @return 
 */
public static LocalhostPair getLocalhost(OptionSet options){
  String hostname=null;
  ReturnValue returnValue=new ReturnValue(ReturnValue.SUCCESS);
  if (options.has("String_Node_Str") && options.valueOf("String_Node_Str") != null) {
    hostname=(String)options.valueOf("String_Node_Str");
  }
 else {
    ArrayList<String> theCommand=new ArrayList<String>();
    theCommand.add("String_Node_Str");
    theCommand.add("String_Node_Str");
    theCommand.add("String_Node_Str");
    returnValue=RunTools.runCommand(theCommand.toArray(new String[0]));
    if (returnValue.getExitStatus() == ReturnValue.SUCCESS) {
      String stdout=returnValue.getStdout();
      stdout=stdout.trim();
      hostname=stdout;
    }
 else {
      Log.error("String_Node_Str" + returnValue.getStdout());
      return new LocalhostPair(hostname,returnValue);
    }
  }
  return new LocalhostPair(hostname,returnValue);
}

Fixed version (ground truth):
/** 
 * Get the localhost and a return value describing the failure condition if we are unable to get the localhost
 * @param options
 * @return 
 */
public static LocalhostPair getLocalhost(OptionSet options){
  String hostname=null;
  ReturnValue returnValue=new ReturnValue(ReturnValue.SUCCESS);
  if (options.has("String_Node_Str") && options.valueOf("String_Node_Str") != null) {
    hostname=(String)options.valueOf("String_Node_Str");
    returnValue=new ReturnValue(ReturnValue.SUCCESS);
  }
 else {
    ArrayList<String> theCommand=new ArrayList<String>();
    theCommand.add("String_Node_Str");
    theCommand.add("String_Node_Str");
    theCommand.add("String_Node_Str");
    returnValue=RunTools.runCommand(theCommand.toArray(new String[0]));
    if (returnValue.getExitStatus() == ReturnValue.SUCCESS) {
      String stdout=returnValue.getStdout();
      stdout=stdout.trim();
      hostname=stdout;
    }
 else {
      Log.error("String_Node_Str" + returnValue.getStdout());
      return new LocalhostPair(hostname,returnValue);
    }
  }
  return new LocalhostPair(hostname,returnValue);
}
Program: 188906
Project: 188906
Buggy source:
/** 
 * Run the SeqWare jar given a particular set of parameters and check for an expected return value. The beauty of this approach is that we can later move this out into its own class, create an interface, and then we can reuse the same tests running against our code directly rather than through a jar, so we can compute code coverage and the like.
 * @param parameters
 * @param expectedReturnValue
 * @param workingDir null, if caller does not care about the working directory
 * @return
 * @throws IOException
 */
public static String runSeqWareJar(String parameters,int expectedReturnValue,File workingDir) throws IOException {
  File jar=retrieveFullAssembledJar();
  Properties props=new Properties();
  props.load(ITUtility.class.getClassLoader().getResourceAsStream("String_Node_Str"));
  String itCoverageAgent=(String)props.get("String_Node_Str");
  if (workingDir == null) {
    workingDir=Files.createTempDir();
    workingDir.deleteOnExit();
  }
  System.out.println("String_Node_Str" + itCoverageAgent);
  String line="String_Node_Str" + itCoverageAgent + "String_Node_Str"+ jar.getAbsolutePath()+ "String_Node_Str"+ parameters;
  String output=runArbitraryCommand(line,expectedReturnValue,workingDir);
  return output;
}

Fixed version (ground truth):
/** 
 * Run the SeqWare jar given a particular set of parameters and check for an expected return value. The beauty of this approach is that we can later move this out into its own class, create an interface, and then we can reuse the same tests running against our code directly rather than through a jar, so we can compute code coverage and the like.
 * @param parameters
 * @param expectedReturnValue
 * @param workingDir null, if caller does not care about the working directory
 * @return
 * @throws IOException
 */
public static String runSeqWareJar(String parameters,int expectedReturnValue,File workingDir) throws IOException {
  File jar=retrieveFullAssembledJar();
  Properties props=new Properties();
  props.load(ITUtility.class.getClassLoader().getResourceAsStream("String_Node_Str"));
  String itCoverageAgent=(String)props.get("String_Node_Str");
  if (workingDir == null) {
    workingDir=Files.createTempDir();
    workingDir.deleteOnExit();
  }
  String line="String_Node_Str" + itCoverageAgent + "String_Node_Str"+ jar.getAbsolutePath()+ "String_Node_Str"+ parameters;
  String output=runArbitraryCommand(line,expectedReturnValue,workingDir);
  return output;
}
Program: 188907
Project: 188907
Buggy source:
@Test public void testMonitorWorkflowRunStdOut() throws IOException {
  String swid=monitorAndReturnWorkflowRun();
  String workingDirStr=System.getProperty("String_Node_Str");
  Log.info("String_Node_Str" + workingDirStr);
  File workingDir=new File(workingDirStr);
  WorkFlowRunReporterFilterStdOut filter=new WorkFlowRunReporterFilterStdOut(swid);
  Collection<File> listFiles=FileUtils.listFiles(workingDir,filter,filter);
  for (  File f : listFiles) {
    f.delete();
  }
  String output=ITUtility.runSeqWareJar("String_Node_Str" + swid,ReturnValue.SUCCESS,null);
  listFiles=FileUtils.listFiles(workingDir,filter,filter);
  Assert.assertTrue("String_Node_Str" + listFiles.size(),listFiles.size() == 1);
  File foundFile=listFiles.iterator().next();
  foundFile.delete();
}

Fixed version (ground truth):
@Test public void testMonitorWorkflowRunStdOut() throws IOException {
  File workingDir=Files.createTempDir();
  String swid=monitorAndReturnWorkflowRun();
  WorkFlowRunReporterFilterStdOut filter=new WorkFlowRunReporterFilterStdOut(swid);
  String output=ITUtility.runSeqWareJar("String_Node_Str" + swid,ReturnValue.SUCCESS,workingDir);
  Collection<File> listFiles=FileUtils.listFiles(workingDir,filter,filter);
  Assert.assertTrue("String_Node_Str" + listFiles.size(),listFiles.size() == 1);
  File foundFile=listFiles.iterator().next();
  foundFile.delete();
}
Program: 188908
Project: 188908
Buggy source:
@Test public void testMonitorWorkflowRunStdErr() throws IOException {
  String swid=monitorAndReturnWorkflowRun();
  String workingDirStr=System.getProperty("String_Node_Str");
  Log.info("String_Node_Str" + workingDirStr);
  File workingDir=new File(workingDirStr);
  WorkFlowRunReporterFilterStdErr filter=new WorkFlowRunReporterFilterStdErr(swid);
  Collection<File> listFiles=FileUtils.listFiles(workingDir,filter,filter);
  for (  File f : listFiles) {
    f.delete();
  }
  String output=ITUtility.runSeqWareJar("String_Node_Str" + swid,ReturnValue.SUCCESS,null);
  listFiles=FileUtils.listFiles(workingDir,filter,filter);
  Assert.assertTrue("String_Node_Str" + listFiles.size(),listFiles.size() == 1);
  File foundFile=listFiles.iterator().next();
  foundFile.delete();
}

Fixed version (ground truth):
@Test public void testMonitorWorkflowRunStdErr() throws IOException {
  File workingDir=Files.createTempDir();
  String swid=monitorAndReturnWorkflowRun();
  WorkFlowRunReporterFilterStdErr filter=new WorkFlowRunReporterFilterStdErr(swid);
  String output=ITUtility.runSeqWareJar("String_Node_Str" + swid,ReturnValue.SUCCESS,workingDir);
  Collection<File> listFiles=FileUtils.listFiles(workingDir,filter,filter);
  Assert.assertTrue("String_Node_Str" + listFiles.size(),listFiles.size() == 1);
  File foundFile=listFiles.iterator().next();
  foundFile.delete();
}
Program: 188910
Project: 188910
Buggy source:
public Adag(AbstractWorkflowDataModel wfdm){
  this.wfdm=wfdm;
  this.jobs=new ArrayList<PegasusJob>();
  this.fileJobMap=new HashMap<SqwFile,PegasusJob>();
  this.parseWorkflow(wfdm);
  this.setDefaultExcutables();
}

Fixed version (ground truth):
public Adag(AbstractWorkflowDataModel wfdm){
  this.wfdm=wfdm;
  this.jobs=new ArrayList<PegasusJob>();
  this.fileJobMap=new HashMap<SqwFile,ProvisionFilesJob>();
  this.parseWorkflow(wfdm);
  this.setDefaultExcutables();
}
Program: 188914
Project: 188914
Buggy source:
private KeyVal[] getKeyVals(List list){
  KeyVal[] libs=new KeyVal[list.size()];
  int i=0;
  for (  Object o : list) {
    if (o instanceof LibraryStrategy) {
      LibraryStrategy l=(LibraryStrategy)o;
      libs[i++]=new KeyVal(l.getLibraryStrategyId(),l.getName(),l.getDescription());
    }
 else     if (o instanceof LibrarySelection) {
      LibrarySelection l=(LibrarySelection)o;
      libs[i++]=new KeyVal(l.getLibrarySelectionId(),l.getName(),l.getDescription());
    }
 else     if (o instanceof LibrarySource) {
      LibrarySource l=(LibrarySource)o;
      libs[i++]=new KeyVal(l.getLibrarySourceId(),l.getName(),l.getDescription());
    }
 else     if (o instanceof StudyType) {
      StudyType l=(StudyType)o;
      libs[i++]=new KeyVal(l.getStudyTypeId(),l.getName(),l.getDescription());
    }
 else     if (o instanceof Platform) {
      Platform l=(Platform)o;
      libs[i++]=new KeyVal(l.getPlatformId(),l.getName(),l.getDescription());
    }
 else     if (o instanceof Organism) {
      Organism l=(Organism)o;
      libs[i++]=new KeyVal(l.getOrganismId(),l.getName(),String.valueOf(l.getNcbiTaxId()));
    }
 else {
      Log.error("String_Node_Str");
    }
  }
  return libs;
}

Fixed version (ground truth):
private KeyVal[] getKeyVals(List list){
  if (list == null || list.size() <= 0)   return null;
  KeyVal[] libs=new KeyVal[list.size()];
  int i=0;
  for (  Object o : list) {
    if (o instanceof LibraryStrategy) {
      LibraryStrategy l=(LibraryStrategy)o;
      libs[i++]=new KeyVal(l.getLibraryStrategyId(),l.getName(),l.getDescription());
    }
 else     if (o instanceof LibrarySelection) {
      LibrarySelection l=(LibrarySelection)o;
      libs[i++]=new KeyVal(l.getLibrarySelectionId(),l.getName(),l.getDescription());
    }
 else     if (o instanceof LibrarySource) {
      LibrarySource l=(LibrarySource)o;
      libs[i++]=new KeyVal(l.getLibrarySourceId(),l.getName(),l.getDescription());
    }
 else     if (o instanceof StudyType) {
      StudyType l=(StudyType)o;
      libs[i++]=new KeyVal(l.getStudyTypeId(),l.getName(),l.getDescription());
    }
 else     if (o instanceof Platform) {
      Platform l=(Platform)o;
      libs[i++]=new KeyVal(l.getPlatformId(),l.getName(),l.getDescription());
    }
 else     if (o instanceof Organism) {
      Organism l=(Organism)o;
      libs[i++]=new KeyVal(l.getOrganismId(),l.getName(),String.valueOf(l.getNcbiTaxId()));
    }
 else {
      Log.error("String_Node_Str");
    }
  }
  return libs;
}
Program: 188916
Project: 188916
Buggy source:
@BeforeClass public static void setUpClass() throws Exception {
  MiseqPath=BatchMetadataInjectionTest.class.getResource("String_Node_Str").getPath();
}

Fixed version (ground truth):
@BeforeClass public static void setUpClass() throws Exception {
  miseqPath=BatchMetadataInjectionTest.class.getResource("String_Node_Str").getPath();
}
Program: 188917
Project: 188917
Buggy source:
/** 
 * Test of parseMiseqFile method, of class BatchMetadataInjection.
 */
@Test public void testParseMiseqFile() throws Exception {
  System.out.println("String_Node_Str");
  ParseMiseqFile instance=new ParseMiseqFile(null,new HashMap<String,String>(),false);
  RunInfo run=instance.parseMiseqFile(MiseqPath);
  Assert.assertEquals("String_Node_Str","String_Node_Str",run.getStudyTitle());
  Assert.assertEquals("String_Node_Str","String_Node_Str",run.getExperimentName());
  Assert.assertEquals("String_Node_Str","String_Node_Str",run.getWorkflowType());
  Assert.assertEquals("String_Node_Str","String_Node_Str",run.getAssayType());
  Set<SampleInfo> samples=run.getLanes().iterator().next().getSamples();
  Assert.assertEquals("String_Node_Str",6,samples.size());
}

Fixed version (ground truth):
/** 
 * Test of parseMiseqFile method, of class BatchMetadataInjection.
 */
@Test public void testParseMiseqFile() throws Exception {
  System.out.println("String_Node_Str");
  HashMap<String,String> map=new HashMap<String,String>();
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  ParseMiseqFile instance=new ParseMiseqFile(new MetadataNoConnection(),map,false);
  RunInfo run=instance.parseMiseqFile(miseqPath);
  Assert.assertEquals("String_Node_Str","String_Node_Str",run.getStudyTitle());
  Assert.assertEquals("String_Node_Str","String_Node_Str",run.getExperimentName());
  Assert.assertEquals("String_Node_Str","String_Node_Str",run.getWorkflowType());
  Assert.assertEquals("String_Node_Str","String_Node_Str",run.getAssayType());
  Set<SampleInfo> samples=run.getLanes().iterator().next().getSamples();
  Assert.assertEquals("String_Node_Str",6,samples.size());
}
Program: 188919
Project: 188919
Buggy source:
/** 
 * Handles prompting for a choice out of a list of choices using integers.
 * @param sampleName the sample name used for the prompting message
 * @param title the name of the field that is being set
 * @param choices the list of choices for the value of 'title'
 * @param deflt the default choice to fall back on, which can be one of thelist of 'choices'. This is the string value, not the integer.
 * @return
 */
protected String choiceOf(String sampleName,String title,String[] choices,String deflt){
  String choice=null;
  int choiceInt=0;
  Log.stdout("String_Node_Str" + sampleName + "String_Node_Str"+ title+ "String_Node_Str");
  for (int i=1; i <= choices.length; i++) {
    Log.stdout(i + "String_Node_Str" + choices[i - 1]);
    if (deflt.equals(choices[i - 1])) {
      choiceInt=i;
    }
  }
  while (choice == null) {
    choiceInt=promptPositiveInteger(title,choiceInt,null,1,choices.length);
    if (choiceInt == 0) {
      break;
    }
 else     if (choiceInt == choices.length) {
      choice=ConsoleAdapter.getInstance().promptString("String_Node_Str",null);
    }
 else     if (choiceInt <= 0 || choiceInt > choices.length) {
    }
 else {
      choice=choices[choiceInt - 1];
    }
  }
  return choice;
}

Fixed version (ground truth):
/** 
 * Handles prompting for a choice out of a list of choices using integers.
 * @param sampleName the sample name used for the prompting message
 * @param title the name of the field that is being set
 * @param choices the list of choices for the value of 'title'
 * @param deflt the default choice to fall back on, which can be one of thelist of 'choices'. This is the string value, not the integer.
 * @return
 */
protected String choiceOf(String sampleName,String title,String[] choices,String deflt){
  String choice=null;
  int choiceInt=0;
  Log.stdout("String_Node_Str" + sampleName + "String_Node_Str"+ title+ "String_Node_Str");
  for (int i=1; i <= choices.length; i++) {
    Log.stdout(i + "String_Node_Str" + choices[i - 1]);
    if (choices[i - 1].equals(deflt)) {
      choiceInt=i;
    }
  }
  while (choice == null) {
    choiceInt=promptPositiveInteger(title,choiceInt,null,1,choices.length);
    if (choiceInt == 0) {
      break;
    }
 else     if (choiceInt == choices.length) {
      choice=ConsoleAdapter.getInstance().promptString("String_Node_Str",null);
    }
 else     if (choiceInt <= 0 || choiceInt > choices.length) {
    }
 else {
      choice=choices[choiceInt - 1];
    }
  }
  return choice;
}
Program: 188920
Project: 188920
Buggy source:
protected int promptPositiveInteger(String description,int deflt,Field fieldName,int lowNum,int highNum){
  int value=0;
  while (value > highNum || value < lowNum) {
    Log.stdout("String_Node_Str");
    value=promptInteger(description,deflt,fieldName);
  }
  return value;
}

Fixed version (ground truth):
protected int promptPositiveInteger(String description,int deflt,Field fieldName,int lowNum,int highNum){
  int value=-1;
  while ((value > highNum || value < lowNum) && value != 0) {
    value=promptInteger(description,deflt,fieldName);
  }
  return value;
}
Program: 188921
Project: 188921
Buggy source:
private LaneInfo getLane(int i){
  boolean doneLane=false;
  LaneInfo lane=null;
  while (!doneLane) {
    int num=promptPositiveInteger("String_Node_Str",i,null,1,Integer.MAX_VALUE);
    lane=this.generateLaneInfo(String.valueOf(num),-1);
    StringBuilder sb=new StringBuilder();
    printLaneInfo(lane,sb);
    Log.stdout(sb.toString());
    doneLane=ConsoleAdapter.getInstance().promptBoolean("String_Node_Str",true);
  }
  return lane;
}

Fixed version (ground truth):
private LaneInfo getLane(int i){
  boolean doneLane=false;
  LaneInfo lane=null;
  while (!doneLane) {
    int num=promptPositiveInteger("String_Node_Str",(i + 1),null,1,Integer.MAX_VALUE);
    lane=this.generateLaneInfo(String.valueOf(num),-1);
    StringBuilder sb=new StringBuilder();
    printLaneInfo(lane,sb);
    Log.stdout(sb.toString());
    doneLane=ConsoleAdapter.getInstance().promptBoolean("String_Node_Str",true);
  }
  return lane;
}
Program: 188922
Project: 188922
Buggy source:
/** 
 * Sets the library type and sets the 'geo_library_type' attribute .
 * @param libraryType
 */
public void setLibraryType(String libraryType){
  setSampleAttribute("String_Node_Str",String.valueOf(librarySizeCode));
  this.libraryType=libraryType;
}

Fixed version (ground truth):
/** 
 * Sets the library type and sets the 'geo_library_type' attribute .
 * @param libraryType
 */
public void setLibraryType(String libraryType){
  setSampleAttribute("String_Node_Str",String.valueOf(libraryType));
  this.libraryType=libraryType;
}
Program: 188932
Project: 188932
Buggy source:
private int retrieveTissueTypeSampleAccession(Integer parentSampleAcc,SampleInfo barcode) throws Exception {
  int tissueTypeSampleAcc=0;
  String name=barcode.getParentSample() + "String_Node_Str" + barcode.getTissueType();
  List<Sample> children=metadata.getChildSamplesFrom(parentSampleAcc);
  if (children != null) {
    for (    Sample s : children) {
      if (s.getTitle().equals(name)) {
        tissueTypeSampleAcc=s.getSwAccession();
      }
    }
  }
  if (tissueTypeSampleAcc == 0) {
    tissueTypeSampleAcc=createSample(name,"String_Node_Str",0,parentSampleAcc,barcode.getOrganismId(),false);
  }
  names.put(tissueTypeSampleAcc,name);
  recordEdge("String_Node_Str",parentSampleAcc,"String_Node_Str",tissueTypeSampleAcc);
  return tissueTypeSampleAcc;
}

Fixed version (ground truth):
private int retrieveTissueTypeSampleAccession(Integer parentSampleAcc,SampleInfo barcode) throws Exception {
  int tissueTypeSampleAcc=0;
  String name=barcode.getParentSample() + "String_Node_Str" + barcode.getTissueOrigin()+ "String_Node_Str"+ barcode.getTissueType();
  List<Sample> children=metadata.getChildSamplesFrom(parentSampleAcc);
  if (children != null) {
    for (    Sample s : children) {
      if (s.getTitle().equals(name)) {
        tissueTypeSampleAcc=s.getSwAccession();
      }
    }
  }
  if (tissueTypeSampleAcc == 0) {
    tissueTypeSampleAcc=createSample(name,"String_Node_Str",0,parentSampleAcc,barcode.getOrganismId(),false);
  }
  names.put(tissueTypeSampleAcc,name);
  recordEdge("String_Node_Str",parentSampleAcc,"String_Node_Str",tissueTypeSampleAcc);
  return tissueTypeSampleAcc;
}
Program: 188933
Project: 188933
Buggy source:
private Integer retrieveParentSampleAccession(List<Sample> parentSamples,SampleInfo sample,int experimentAccession) throws Exception {
  Integer parentSampleAcc=null;
  if (parentSamples != null && !parentSamples.isEmpty()) {
    for (    Sample pSample : parentSamples) {
      if (pSample.getName().equals(sample.getParentSample())) {
        parentSampleAcc=pSample.getSwAccession();
      }
    }
  }
  if (parentSampleAcc == null) {
    parentSampleAcc=createSample(sample.getParentSample(),sample.getSampleDescription(),experimentAccession,0,sample.getOrganismId(),false);
  }
  names.put(parentSampleAcc,sample.getParentSample());
  recordEdge("String_Node_Str",experimentAccession,"String_Node_Str",parentSampleAcc);
  return parentSampleAcc;
}

Fixed version (ground truth):
private Integer retrieveParentSampleAccession(List<Sample> parentSamples,SampleInfo sample,int experimentAccession) throws Exception {
  Integer parentSampleAcc=null;
  if (parentSamples != null && !parentSamples.isEmpty()) {
    for (    Sample pSample : parentSamples) {
      if (pSample.getName().equals(sample.getParentSample())) {
        parentSampleAcc=pSample.getSwAccession();
      }
    }
  }
  if (parentSampleAcc == null) {
    parentSampleAcc=createSample(sample.getParentSample(),"String_Node_Str",experimentAccession,0,sample.getOrganismId(),false);
  }
  names.put(parentSampleAcc,sample.getParentSample());
  recordEdge("String_Node_Str",experimentAccession,"String_Node_Str",parentSampleAcc);
  return parentSampleAcc;
}
Program: 188934
Project: 188934
Buggy source:
private LaneInfo getLane(int i){
  boolean doneLane=false;
  LaneInfo lane=null;
  while (!doneLane) {
    int num=promptPositiveInteger("String_Node_Str",(i + 1),null,1,Integer.MAX_VALUE);
    lane=this.generateLaneInfo(String.valueOf(num),-1);
    StringBuilder sb=new StringBuilder();
    printLaneInfo(lane,sb);
    Log.stdout(sb.toString());
    doneLane=ConsoleAdapter.getInstance().promptBoolean("String_Node_Str",true);
  }
  return lane;
}

Fixed version (ground truth):
private LaneInfo getLane(int i){
  boolean doneLane=false;
  LaneInfo lane=null;
  while (!doneLane) {
    Log.stdout("String_Node_Str" + (i + 1) + "String_Node_Str");
    int num=promptPositiveInteger("String_Node_Str",(i + 1),null,1,Integer.MAX_VALUE);
    lane=this.generateLaneInfo(String.valueOf(num),-1);
    StringBuilder sb=new StringBuilder();
    printLaneInfo(lane,sb);
    Log.stdout(sb.toString());
    doneLane=ConsoleAdapter.getInstance().promptBoolean("String_Node_Str",true);
  }
  return lane;
}
Program: 188936
Project: 188936
Buggy source:
private List<Workflow> findWorkflows() throws IOException, JAXBException {
  JaxbObject<WorkflowList> jaxb=new JaxbObject<WorkflowList>();
  WorkflowList list=(WorkflowList)findObject("String_Node_Str","String_Node_Str",jaxb,new WorkflowList());
  return list.getList();
}

Fixed version (ground truth):
private List<Workflow> findWorkflows() throws IOException, JAXBException {
  JaxbObject<WorkflowList> jaxb=new JaxbObject<WorkflowList>();
  WorkflowList list=(WorkflowList)findObject("String_Node_Str","String_Node_Str",jaxb,new WorkflowList());
  if (list != null)   return list.getList();
  return null;
}
Program: 188937
Project: 188937
Buggy source:
private List<StudyType> findStudyTypes() throws IOException, JAXBException {
  JaxbObject<StudyTypeList> jaxb=new JaxbObject<StudyTypeList>();
  StudyTypeList list=(StudyTypeList)findObject("String_Node_Str","String_Node_Str",jaxb,new StudyTypeList());
  return list.getList();
}

Fixed version (ground truth):
private List<StudyType> findStudyTypes() throws IOException, JAXBException {
  JaxbObject<StudyTypeList> jaxb=new JaxbObject<StudyTypeList>();
  StudyTypeList list=(StudyTypeList)findObject("String_Node_Str","String_Node_Str",jaxb,new StudyTypeList());
  if (list != null)   return list.getList();
  return null;
}
Program: 188938
Project: 188938
Buggy source:
@Override public List<IUS> getIUSFrom(int laneOrSampleAccession){
  StringBuilder sb=new StringBuilder();
  if (ll.existsLane("String_Node_Str" + laneOrSampleAccession) != null) {
    sb.append("String_Node_Str");
  }
 else   if (ll.existsSample("String_Node_Str" + laneOrSampleAccession) != null) {
    sb.append("String_Node_Str");
  }
 else {
    Log.error("String_Node_Str" + laneOrSampleAccession);
    return null;
  }
  try {
    sb.append(laneOrSampleAccession).append("String_Node_Str");
    JaxbObject<IUSList> jaxb=new JaxbObject<IUSList>();
    IUSList list=(IUSList)ll.existsObject(sb.toString(),"String_Node_Str",jaxb,new IUSList());
    return list.getList();
  }
 catch (  JAXBException ex) {
    Log.error("String_Node_Str",ex);
  }
  return null;
}

Fixed version (ground truth):
@Override public List<IUS> getIUSFrom(int laneOrSampleAccession){
  StringBuilder sb=new StringBuilder();
  if (ll.existsLane("String_Node_Str" + laneOrSampleAccession) != null) {
    sb.append("String_Node_Str");
  }
 else   if (ll.existsSample("String_Node_Str" + laneOrSampleAccession) != null) {
    sb.append("String_Node_Str");
  }
 else {
    Log.error("String_Node_Str" + laneOrSampleAccession);
    return null;
  }
  try {
    sb.append(laneOrSampleAccession).append("String_Node_Str");
    JaxbObject<IUSList> jaxb=new JaxbObject<IUSList>();
    IUSList list=(IUSList)ll.existsObject(sb.toString(),"String_Node_Str",jaxb,new IUSList());
    if (list != null)     return list.getList();
  }
 catch (  JAXBException ex) {
    Log.error("String_Node_Str",ex);
  }
  return null;
}