nus-yam/ex-repair huggingface dataset:
Program: 188978
Project: 188978
Buggy source:
private void addNewSequencerRuns(Processing p) throws SQLException, ResourceException {
  Set<Integer> newObj=new HashSet<Integer>();
  for (  SequencerRun obj : p.getSequencerRuns()) {
    newObj.add(obj.getSwAccession());
  }
  ResultSet rs=DBAccess.get().executeQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ p.getProcessingId());
  while (rs.next()) {
    int swa=rs.getInt("String_Node_Str");
    newObj.remove(swa);
  }
  for (  int objID : newObj) {
    boolean toReturn=DBAccess.get().linkAccessionAndParent(objID,p.getProcessingId());
    if (!toReturn) {
      throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST,"String_Node_Str" + toReturn + "String_Node_Str"+ objID);
    }
  }
}

Fixed version (ground truth):
private void addNewSequencerRuns(Processing p) throws SQLException, ResourceException {
  Log.debug("String_Node_Str" + p.toString());
  Set<Integer> newObj=new HashSet<Integer>();
  for (  SequencerRun obj : p.getSequencerRuns()) {
    newObj.add(obj.getSwAccession());
  }
  ResultSet rs=DBAccess.get().executeQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ p.getProcessingId());
  while (rs.next()) {
    int swa=rs.getInt("String_Node_Str");
    newObj.remove(swa);
  }
  for (  int objID : newObj) {
    boolean toReturn=DBAccess.get().linkAccessionAndParent(objID,p.getProcessingId());
    if (!toReturn) {
      throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST,"String_Node_Str" + toReturn + "String_Node_Str"+ objID);
    }
  }
}
Program: 188979
Project: 188979
Buggy source:
/** 
 * <p>iniString2Map.</p>
 * @param iniString a {@link java.lang.String} object.
 * @return a {@link java.util.Map} object.
 */
public static Map<String,String> iniString2Map(String iniString){
  Map<String,String> result=new HashMap<String,String>();
  String[] lines=iniString.split("String_Node_Str");
  for (  String line : lines) {
    if (isLineMatchesKeyValue(line)) {
      String[] kv=line.split("String_Node_Str");
      if (kv.length == 2) {
        result.put(kv[0],kv[1]);
      }
 else {
        System.err.println("String_Node_Str" + line);
      }
    }
  }
  return (result);
}

Fixed version (ground truth):
/** 
 * <p>iniString2Map.</p>
 * @param iniString a {@link java.lang.String} object.
 * @return a {@link java.util.Map} object.
 */
public static Map<String,String> iniString2Map(String iniString){
  Map<String,String> result=new HashMap<String,String>();
  String[] lines=iniString.split("String_Node_Str");
  for (  String line : lines) {
    if (isLineMatchesKeyValue(line)) {
      String[] kv=line.split("String_Node_Str");
      if (kv.length == 2) {
        result.put(kv[0],kv[1]);
      }
 else       if (kv.length == 1) {
        result.put(kv[0],"String_Node_Str");
      }
 else {
        System.err.println("String_Node_Str" + line);
      }
    }
  }
  return (result);
}
Program: 188982
Project: 188982
Buggy source:
private int retrieveStudy(RunInfo run){
  Log.stdout("String_Node_Str");
  List<Study> studies=metadata.getAllStudies();
  Integer studyAccession=null;
  String studyName=ConsoleAdapter.getInstance().promptString("String_Node_Str",run.getStudyTitle());
  for (  Study st : studies) {
    if (st.getTitle().equals(studyName)) {
      studyAccession=st.getSwAccession();
    }
  }
  if (studyAccession == null) {
    Log.stdout("String_Node_Str");
    fields.clear();
    fields.put("String_Node_Str",studyName);
    fields.put("String_Node_Str",run.getStudyDescription());
    fields.put("String_Node_Str",run.getStudyCenterName());
    fields.put("String_Node_Str",run.getStudyCenterProject());
    fields.put("String_Node_Str",run.getStudyType());
    interactive=true;
    ReturnValue rv=addStudy();
    studyAccession=Integer.parseInt(rv.getAttribute("String_Node_Str"));
  }
  if (!run.getStudyAttributes().isEmpty()) {
    metadata.annotateStudy(studyAccession,run.getStudyAttributes());
  }
  names.put(studyAccession,studyName);
  return studyAccession;
}

Fixed version (ground truth):
private int retrieveStudy(RunInfo run){
  Log.stdout("String_Node_Str");
  List<Study> studies=metadata.getAllStudies();
  Integer studyAccession=null;
  for (  Study st : studies) {
    if (st.getTitle().equals(run.getStudyTitle())) {
      Log.stdout("String_Node_Str" + st.getTitle() + "String_Node_Str"+ st.getSwAccession());
      studyAccession=st.getSwAccession();
    }
  }
  if (studyAccession == null) {
    fields.clear();
    fields.put("String_Node_Str",run.getStudyTitle());
    fields.put("String_Node_Str",run.getStudyDescription());
    fields.put("String_Node_Str",run.getStudyCenterName());
    fields.put("String_Node_Str",run.getStudyCenterProject());
    fields.put("String_Node_Str",run.getStudyType());
    interactive=true;
    ReturnValue rv=addStudy();
    studyAccession=Integer.parseInt(rv.getAttribute("String_Node_Str"));
  }
  if (!run.getStudyAttributes().isEmpty()) {
    metadata.annotateStudy(studyAccession,run.getStudyAttributes());
  }
  names.put(studyAccession,run.getStudyTitle());
  return studyAccession;
}
Program: 188983
Project: 188983
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public ReturnValue init(){
  if (options.has("String_Node_Str") && options.has("String_Node_Str")) {
  }
  if (options.has("String_Node_Str") && options.has("String_Node_Str")) {
    ret=(listFields((String)options.valueOf("String_Node_Str")));
    return ret;
  }
  whatWeDid.append("String_Node_Str");
  return ret;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public ReturnValue init(){
  whatWeDid.append("String_Node_Str");
  return ret;
}
Program: 188984
Project: 188984
Buggy source:
private int createIUS(SampleInfo barcode,int laneAccession,int sampleAccession){
  Log.stdout("String_Node_Str");
  fields.clear();
  fields.put("String_Node_Str",String.valueOf(laneAccession));
  fields.put("String_Node_Str",String.valueOf(sampleAccession));
  fields.put("String_Node_Str",barcode.getIusName());
  fields.put("String_Node_Str",barcode.getIusDescription());
  fields.put("String_Node_Str",String.valueOf(barcode.getIusSkip()));
  fields.put("String_Node_Str",barcode.getBarcode());
  interactive=true;
  ReturnValue rv=addIUS();
  Integer swAccession=Integer.parseInt(rv.getAttribute("String_Node_Str"));
  if (!barcode.getIusAttributes().isEmpty()) {
    metadata.annotateIUS(swAccession,barcode.getIusAttributes());
  }
  names.put(swAccession,barcode.getBarcode());
  recordEdge("String_Node_Str",laneAccession,"String_Node_Str",swAccession);
  recordEdge("String_Node_Str",sampleAccession,"String_Node_Str",swAccession);
  return swAccession;
}

Fixed version (ground truth):
private int createIUS(SampleInfo barcode,int laneAccession,int sampleAccession){
  fields.clear();
  fields.put("String_Node_Str",String.valueOf(laneAccession));
  fields.put("String_Node_Str",String.valueOf(sampleAccession));
  fields.put("String_Node_Str",barcode.getIusName());
  fields.put("String_Node_Str",barcode.getIusDescription());
  fields.put("String_Node_Str",String.valueOf(barcode.getIusSkip()));
  fields.put("String_Node_Str",barcode.getBarcode());
  interactive=true;
  ReturnValue rv=addIUS();
  Integer swAccession=Integer.parseInt(rv.getAttribute("String_Node_Str"));
  if (!barcode.getIusAttributes().isEmpty()) {
    metadata.annotateIUS(swAccession,barcode.getIusAttributes());
  }
  names.put(swAccession,barcode.getBarcode());
  recordEdge("String_Node_Str",laneAccession,"String_Node_Str",swAccession);
  recordEdge("String_Node_Str",sampleAccession,"String_Node_Str",swAccession);
  return swAccession;
}
Program: 188985
Project: 188985
Buggy source:
private int createRun(RunInfo run) throws Exception {
  Integer swAccession=null;
  Log.stdout("String_Node_Str");
  String runName=ConsoleAdapter.getInstance().promptString("String_Node_Str",run.getRunName());
  List<SequencerRun> runs=metadata.getAllSequencerRuns();
  if (runs != null) {
    for (    SequencerRun sr : runs) {
      if (runName.equals(sr.getName())) {
        Log.stdout("String_Node_Str" + sr.getName() + "String_Node_Str"+ sr.getSwAccession());
        swAccession=sr.getSwAccession();
      }
    }
  }
  if (swAccession == null) {
    Log.stdout("String_Node_Str");
    fields.clear();
    fields.put("String_Node_Str",run.getPlatformId());
    fields.put("String_Node_Str",String.valueOf(run.getRunSkip()));
    fields.put("String_Node_Str",String.valueOf(run.isPairedEnd()));
    fields.put("String_Node_Str",runName);
    fields.put("String_Node_Str",run.getRunDescription());
    interactive=true;
    ReturnValue rv=addSequencerRun();
    swAccession=Integer.parseInt(rv.getAttribute("String_Node_Str"));
  }
  if (!run.getRunAttributes().isEmpty()) {
    metadata.annotateSequencerRun(swAccession,run.getRunAttributes());
  }
  names.put(swAccession,runName);
  return swAccession;
}

Fixed version (ground truth):
private int createRun(RunInfo run) throws Exception {
  Integer swAccession=null;
  Log.stdout("String_Node_Str");
  List<SequencerRun> runs=metadata.getAllSequencerRuns();
  if (runs != null) {
    for (    SequencerRun sr : runs) {
      if (run.getRunName().equals(sr.getName())) {
        Log.stdout("String_Node_Str" + sr.getName() + "String_Node_Str"+ sr.getSwAccession());
        swAccession=sr.getSwAccession();
        break;
      }
    }
  }
  if (swAccession == null) {
    fields.clear();
    fields.put("String_Node_Str",run.getPlatformId());
    fields.put("String_Node_Str",String.valueOf(run.getRunSkip()));
    fields.put("String_Node_Str",String.valueOf(run.isPairedEnd()));
    fields.put("String_Node_Str",run.getRunName());
    fields.put("String_Node_Str",run.getRunDescription());
    interactive=true;
    ReturnValue rv=addSequencerRun();
    swAccession=Integer.parseInt(rv.getAttribute("String_Node_Str"));
  }
  if (!run.getRunAttributes().isEmpty()) {
    metadata.annotateSequencerRun(swAccession,run.getRunAttributes());
  }
  names.put(swAccession,run.getRunName());
  return swAccession;
}
Program: 188986
Project: 188986
Buggy source:
private int createLane(LaneInfo lane,int sequencerRunAccession){
  Log.stdout("String_Node_Str");
  fields.clear();
  fields.put("String_Node_Str",lane.getLaneSkip().toString());
  fields.put("String_Node_Str",lane.getLaneNumber());
  fields.put("String_Node_Str",lane.getLaneName());
  fields.put("String_Node_Str",lane.getLaneDescription());
  fields.put("String_Node_Str",String.valueOf(sequencerRunAccession));
  fields.put("String_Node_Str",lane.getLibraryStrategyAcc());
  fields.put("String_Node_Str",lane.getLibrarySelectionAcc());
  fields.put("String_Node_Str",lane.getLibrarySourceAcc());
  fields.put("String_Node_Str",lane.getLaneCycleDescriptor());
  fields.put("String_Node_Str",lane.getStudyTypeAcc());
  interactive=true;
  ReturnValue rv=addLane();
  Integer swAccession=Integer.parseInt(rv.getAttribute("String_Node_Str"));
  if (!lane.getLaneAttributes().isEmpty()) {
    metadata.annotateLane(swAccession,lane.getLaneAttributes());
  }
  names.put(swAccession,lane.getLaneName());
  recordEdge("String_Node_Str",sequencerRunAccession,"String_Node_Str",swAccession);
  return swAccession;
}

Fixed version (ground truth):
private int createLane(LaneInfo lane,int sequencerRunAccession){
  fields.clear();
  fields.put("String_Node_Str",lane.getLaneSkip().toString());
  fields.put("String_Node_Str",lane.getLaneNumber());
  fields.put("String_Node_Str",lane.getLaneName());
  fields.put("String_Node_Str",lane.getLaneDescription());
  fields.put("String_Node_Str",String.valueOf(sequencerRunAccession));
  fields.put("String_Node_Str",lane.getLibraryStrategyAcc());
  fields.put("String_Node_Str",lane.getLibrarySelectionAcc());
  fields.put("String_Node_Str",lane.getLibrarySourceAcc());
  fields.put("String_Node_Str",lane.getLaneCycleDescriptor());
  fields.put("String_Node_Str",lane.getStudyTypeAcc());
  interactive=true;
  ReturnValue rv=addLane();
  Integer swAccession=Integer.parseInt(rv.getAttribute("String_Node_Str"));
  if (!lane.getLaneAttributes().isEmpty()) {
    metadata.annotateLane(swAccession,lane.getLaneAttributes());
  }
  names.put(swAccession,lane.getLaneName());
  recordEdge("String_Node_Str",sequencerRunAccession,"String_Node_Str",swAccession);
  return swAccession;
}
Program: 188988
Project: 188988
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public ReturnValue do_run(){
  if (options.has("String_Node_Str")) {
    String filepath=(String)options.valueOf("String_Node_Str");
    ParseMisecFile parser=new ParseMisecFile(metadata);
    try {
      RunInfo run=parser.parseMiSecFile(filepath);
      inject(run);
    }
 catch (    Exception ex) {
      Log.error("String_Node_Str",ex);
    }
  }
 else {
    Log.stdout("String_Node_Str");
    Log.stdout(this.get_syntax());
    ret.setExitStatus(ReturnValue.INVALIDPARAMETERS);
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public ReturnValue do_run(){
  if (options.has("String_Node_Str")) {
  }
 else   if (options.has("String_Node_Str")) {
    String filepath=(String)options.valueOf("String_Node_Str");
    ParseMisecFile misecParser=new ParseMisecFile(metadata);
    try {
      RunInfo run=misecParser.parseMiSecFile(filepath);
      inject(run);
    }
 catch (    Exception ex) {
      Log.error("String_Node_Str",ex);
    }
  }
 else {
    Log.stdout("String_Node_Str");
    Log.stdout(this.get_syntax());
    ret.setExitStatus(ReturnValue.INVALIDPARAMETERS);
  }
  return ret;
}
Program: 188989
Project: 188989
Buggy source:
private int createSample(String name,String description,int experimentAccession,int parentSampleAccession,String organismId,boolean interactive){
  Log.stdout("String_Node_Str");
  fields.clear();
  fields.put("String_Node_Str",String.valueOf(experimentAccession));
  fields.put("String_Node_Str",String.valueOf(parentSampleAccession));
  fields.put("String_Node_Str",organismId);
  fields.put("String_Node_Str",name);
  fields.put("String_Node_Str",description);
  this.interactive=interactive;
  ReturnValue rv=addSample();
  return Integer.parseInt(rv.getAttribute("String_Node_Str"));
}

Fixed version (ground truth):
private int createSample(String name,String description,int experimentAccession,int parentSampleAccession,String organismId,boolean interactive){
  fields.clear();
  fields.put("String_Node_Str",String.valueOf(experimentAccession));
  fields.put("String_Node_Str",String.valueOf(parentSampleAccession));
  fields.put("String_Node_Str",organismId);
  fields.put("String_Node_Str",name);
  fields.put("String_Node_Str",description);
  this.interactive=interactive;
  ReturnValue rv=addSample();
  return Integer.parseInt(rv.getAttribute("String_Node_Str"));
}
Program: 188990
Project: 188990
Buggy source:
/** 
 * <p>Constructor for AttributeAnnotator.</p>
 */
public BatchMetadataInjection(){
  super();
  parser.accepts("String_Node_Str","String_Node_Str").withRequiredArg();
  ret.setExitStatus(ReturnValue.SUCCESS);
  names=new HashMap<Integer,String>();
}

Fixed version (ground truth):
/** 
 * <p>Constructor for AttributeAnnotator.</p>
 */
public BatchMetadataInjection(){
  super();
  parser=new OptionParser();
  parser.accepts("String_Node_Str","String_Node_Str").withRequiredArg();
  ret.setExitStatus(ReturnValue.SUCCESS);
  names=new HashMap<Integer,String>();
}
Program: 188991
Project: 188991
Buggy source:
private ReturnValue inject(RunInfo run) throws Exception {
  int sequencerRunAccession=createRun(run);
  Set<LaneInfo> lanes=run.getLanes();
  List<Lane> existingLanes=metadata.getLanesFrom(sequencerRunAccession);
  if (existingLanes != null && !existingLanes.isEmpty()) {
    Boolean yorn=promptBoolean("String_Node_Str" + existingLanes.size() + "String_Node_Str",Boolean.TRUE);
    if (yorn.equals(Boolean.FALSE)) {
      throw new Exception("String_Node_Str" + sequencerRunAccession + "String_Node_Str");
    }
  }
  int studyAccession=retrieveStudy(run);
  int experimentAccession=retrieveExperiment(run,studyAccession);
  List<Sample> parentSamples=metadata.getSamplesFrom(experimentAccession);
  Log.debug("String_Node_Str" + studyAccession + "String_Node_Str"+ experimentAccession+ "String_Node_Str"+ sequencerRunAccession);
  for (  LaneInfo lane : lanes) {
    int laneAccession=createLane(lane,sequencerRunAccession);
    for (    SampleInfo barcode : lane.getSamples()) {
      Integer parentSampleAcc=retrieveParentSampleAccession(parentSamples,barcode,experimentAccession);
      Log.debug("String_Node_Str" + laneAccession + "String_Node_Str"+ parentSampleAcc);
      int tissueTypeSampleAcc=retrieveTissueTypeSampleAccession(parentSampleAcc,barcode);
      Log.debug("String_Node_Str" + tissueTypeSampleAcc);
      int librarySampleNameAcc=createLibrarySample(barcode,tissueTypeSampleAcc);
      int barcodeAcc=createIUS(barcode,laneAccession,librarySampleNameAcc);
    }
  }
  return ret;
}

Fixed version (ground truth):
private ReturnValue inject(RunInfo run) throws Exception {
  int sequencerRunAccession=createRun(run);
  Set<LaneInfo> lanes=run.getLanes();
  List<Lane> existingLanes=metadata.getLanesFrom(sequencerRunAccession);
  if (existingLanes != null && !existingLanes.isEmpty()) {
    Boolean yorn=ConsoleAdapter.getInstance().promptBoolean("String_Node_Str" + existingLanes.size() + "String_Node_Str",Boolean.TRUE);
    if (yorn.equals(Boolean.FALSE)) {
      throw new Exception("String_Node_Str" + sequencerRunAccession + "String_Node_Str");
    }
  }
  int studyAccession=retrieveStudy(run);
  int experimentAccession=retrieveExperiment(run,studyAccession);
  List<Sample> parentSamples=metadata.getSamplesFrom(experimentAccession);
  Log.debug("String_Node_Str" + studyAccession + "String_Node_Str"+ experimentAccession+ "String_Node_Str"+ sequencerRunAccession);
  for (  LaneInfo lane : lanes) {
    int laneAccession=createLane(lane,sequencerRunAccession);
    for (    SampleInfo barcode : lane.getSamples()) {
      Integer parentSampleAcc=retrieveParentSampleAccession(parentSamples,barcode,experimentAccession);
      Log.debug("String_Node_Str" + laneAccession + "String_Node_Str"+ parentSampleAcc);
      int tissueTypeSampleAcc=retrieveTissueTypeSampleAccession(parentSampleAcc,barcode);
      Log.debug("String_Node_Str" + tissueTypeSampleAcc);
      int librarySampleNameAcc=createLibrarySample(barcode,tissueTypeSampleAcc);
      int barcodeAcc=createIUS(barcode,laneAccession,librarySampleNameAcc);
    }
  }
  return ret;
}
Program: 188993
Project: 188993
Buggy source:
protected String choiceOf(String sampleName,String title,String[] choices,String deflt){
  String choice="String_Node_Str";
  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;
    }
  }
  choiceInt=ConsoleAdapter.getInstance().promptInteger(title,choiceInt);
  if (choiceInt == 0) {
  }
 else   if (choiceInt == choices.length) {
    choice=ConsoleAdapter.getInstance().promptString("String_Node_Str",null);
  }
 else   if (choiceInt <= 0 || choiceInt > choices.length) {
    Log.stdout("String_Node_Str");
    choice=choiceOf(sampleName,title,choices,deflt);
  }
 else {
    choice=choices[choiceInt - 1];
  }
  return choice;
}

Fixed version (ground truth):
protected String choiceOf(String sampleName,String title,String[] choices,String deflt){
  String choice="String_Node_Str";
  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 || choice.isEmpty()) {
    choiceInt=ConsoleAdapter.getInstance().promptInteger(title,choiceInt);
    if (choiceInt == 0) {
    }
 else     if (choiceInt == choices.length) {
      choice=ConsoleAdapter.getInstance().promptString("String_Node_Str",null);
    }
 else     if (choiceInt <= 0 || choiceInt > choices.length) {
      Log.stdout("String_Node_Str");
    }
 else {
      choice=choices[choiceInt - 1];
    }
  }
  return choice;
}
Program: 188994
Project: 188994
Buggy source:
public RunInfo parseMiSecFile(String filepath) throws Exception {
  RunInfo run=null;
  File file=new File(filepath);
  try {
    BufferedReader freader=new BufferedReader(new FileReader(file));
    run=parseMiSecHeader(freader,filepath);
    Set<LaneInfo> lanes=parseMiSecData(freader);
    freader.close();
    run.setLanes(lanes);
  }
 catch (  FileNotFoundException e) {
    Log.error(filepath,e);
    ret.setExitStatus(ReturnValue.FILENOTREADABLE);
  }
catch (  IOException ex) {
    Log.error(filepath,ex);
    ret.setExitStatus(ReturnValue.FILENOTREADABLE);
  }
  return run;
}

Fixed version (ground truth):
public RunInfo parseMiSecFile(String filepath) throws Exception {
  RunInfo run=null;
  File file=new File(filepath);
  try {
    BufferedReader freader=new BufferedReader(new FileReader(file));
    run=parseMiSecHeader(freader,filepath);
    String runName=ConsoleAdapter.getInstance().promptString("String_Node_Str",run.getRunName());
    String studyName=ConsoleAdapter.getInstance().promptString("String_Node_Str",run.getStudyTitle());
    String expName=ConsoleAdapter.getInstance().promptString("String_Node_Str",run.getExperimentName());
    run.setRunName(runName);
    run.setStudyTitle(studyName);
    run.setExperimentName(expName);
    Set<LaneInfo> lanes=parseMiSecData(freader);
    freader.close();
    run.setLanes(lanes);
  }
 catch (  FileNotFoundException e) {
    Log.error(filepath,e);
    ret.setExitStatus(ReturnValue.FILENOTREADABLE);
  }
catch (  IOException ex) {
    Log.error(filepath,ex);
    ret.setExitStatus(ReturnValue.FILENOTREADABLE);
  }
  return run;
}
Program: 188996
Project: 188996
Buggy source:
protected String promptString(String string,String deflt){
  String title=null;
  String prompt=string + (deflt == null ? "String_Node_Str" : "String_Node_Str" + deflt + "String_Node_Str");
  int counter=0;
  while (title == null && counter++ < 10) {
    title=ConsoleAdapter.getInstance().readLine(prompt);
    if (title.trim().isEmpty()) {
      title=deflt;
    }
  }
  fields.put(string,title);
  return title;
}

Fixed version (ground truth):
protected String promptString(String string,String deflt){
  String title=null;
  String prompt=string + (deflt == null ? "String_Node_Str" : "String_Node_Str" + deflt + "String_Node_Str");
  int counter=0;
  while (title == null && counter++ < 10) {
    System.out.println();
    title=ConsoleAdapter.getInstance().readLine(prompt);
    if (title.trim().isEmpty()) {
      title=deflt;
    }
  }
  fields.put(string,title);
  return title;
}
Program: 188997
Project: 188997
Buggy source:
protected void promptForExperiment(String[] necessaryFields){
  Log.stdout("String_Node_Str");
  if (!fields.containsKey("String_Node_Str")) {
    for (    Platform p : metadata.getPlatforms()) {
      Log.stdout(p.toString());
    }
    promptInteger("String_Node_Str",20);
  }
  promptForFields(necessaryFields);
  if (!fieldsConfirmed(necessaryFields)) {
    promptForExperiment(necessaryFields);
  }
}

Fixed version (ground truth):
protected void promptForExperiment(String[] necessaryFields){
  Log.stdout("String_Node_Str");
  if (!fields.containsKey("String_Node_Str")) {
    System.out.println();
    for (    Platform p : metadata.getPlatforms()) {
      Log.stdout(p.toString());
    }
    promptInteger("String_Node_Str",20);
  }
  promptForFields(necessaryFields);
  if (!fieldsConfirmed(necessaryFields)) {
    promptForExperiment(necessaryFields);
  }
}
Program: 188998
Project: 188998
Buggy source:
protected Boolean promptBoolean(String string,Boolean deflt){
  Boolean title=null;
  String prompt=string + (deflt == null ? "String_Node_Str" : "String_Node_Str" + deflt + "String_Node_Str");
  int counter=0;
  while (title == null && counter++ < 10) {
    String line=ConsoleAdapter.getInstance().readLine(prompt);
    if (line.trim().isEmpty()) {
      title=deflt;
    }
 else {
      try {
        title=Boolean.parseBoolean(line);
      }
 catch (      NumberFormatException e) {
        Log.stdout(string + "String_Node_Str");
      }
    }
  }
  fields.put(string,title.toString());
  return title;
}

Fixed version (ground truth):
protected Boolean promptBoolean(String string,Boolean deflt){
  Boolean title=null;
  String prompt=string + (deflt == null ? "String_Node_Str" : "String_Node_Str" + deflt + "String_Node_Str");
  int counter=0;
  while (title == null && counter++ < 10) {
    System.out.println();
    String line=ConsoleAdapter.getInstance().readLine(prompt);
    if (line.trim().isEmpty()) {
      title=deflt;
    }
 else {
      try {
        title=Boolean.parseBoolean(line);
      }
 catch (      NumberFormatException e) {
        Log.stdout(string + "String_Node_Str");
      }
    }
  }
  fields.put(string,title.toString());
  return title;
}
Program: 188999
Project: 188999
Buggy source:
private boolean notNullOrLessThanZero(String fieldName){
  boolean usable=true;
  String field=fields.get(fieldName);
  Log.stdout(field);
  if (field == null) {
    usable=false;
  }
 else   if (Integer.parseInt(field) <= 0) {
    usable=false;
  }
  return usable;
}

Fixed version (ground truth):
private boolean notNullOrLessThanZero(String fieldName){
  boolean usable=true;
  String field=fields.get(fieldName);
  if (field == null) {
    usable=false;
  }
 else   if (Integer.parseInt(field) <= 0) {
    usable=false;
  }
  return usable;
}
Program: 189000
Project: 189000
Buggy source:
protected void promptForLane(String[] necessaryFields){
  Log.stdout("String_Node_Str");
  if (!fields.containsKey("String_Node_Str")) {
    promptInteger("String_Node_Str",null);
  }
  if (!fields.containsKey("String_Node_Str")) {
    for (    StudyType st : metadata.getStudyTypes()) {
      Log.stdout(st.toString());
    }
    promptInteger("String_Node_Str",4);
  }
  if (!fields.containsKey("String_Node_Str")) {
    for (    LibraryStrategy st : metadata.getLibraryStrategies()) {
      Log.stdout(st.toString());
    }
    promptInteger("String_Node_Str",null);
  }
  if (!fields.containsKey("String_Node_Str")) {
    for (    LibrarySelection st : metadata.getLibrarySelections()) {
      Log.stdout(st.toString());
    }
    promptInteger("String_Node_Str",null);
  }
  if (!fields.containsKey("String_Node_Str")) {
    for (    LibrarySource st : metadata.getLibrarySource()) {
      Log.stdout(st.toString());
    }
    promptInteger("String_Node_Str",null);
  }
  if (!fields.containsKey("String_Node_Str")) {
    promptInteger("String_Node_Str",1);
  }
  if (!fields.containsKey("String_Node_Str")) {
    promptBoolean("String_Node_Str",false);
  }
  promptForFields(necessaryFields);
  if (!fieldsConfirmed(necessaryFields)) {
    promptForLane(necessaryFields);
  }
}

Fixed version (ground truth):
protected void promptForLane(String[] necessaryFields){
  Log.stdout("String_Node_Str");
  if (!fields.containsKey("String_Node_Str")) {
    promptInteger("String_Node_Str",null);
  }
  if (!fields.containsKey("String_Node_Str")) {
    System.out.println();
    for (    StudyType st : metadata.getStudyTypes()) {
      Log.stdout(st.toString());
    }
    promptInteger("String_Node_Str",4);
  }
  if (!fields.containsKey("String_Node_Str")) {
    System.out.println();
    for (    LibraryStrategy st : metadata.getLibraryStrategies()) {
      Log.stdout(st.toString());
    }
    promptInteger("String_Node_Str",null);
  }
  if (!fields.containsKey("String_Node_Str")) {
    System.out.println();
    for (    LibrarySelection st : metadata.getLibrarySelections()) {
      Log.stdout(st.toString());
    }
    promptInteger("String_Node_Str",null);
  }
  if (!fields.containsKey("String_Node_Str")) {
    System.out.println();
    for (    LibrarySource st : metadata.getLibrarySource()) {
      Log.stdout(st.toString());
    }
    promptInteger("String_Node_Str",null);
  }
  if (!fields.containsKey("String_Node_Str")) {
    promptInteger("String_Node_Str",1);
  }
  if (!fields.containsKey("String_Node_Str")) {
    promptBoolean("String_Node_Str",false);
  }
  promptForFields(necessaryFields);
  if (!fieldsConfirmed(necessaryFields)) {
    promptForLane(necessaryFields);
  }
}
Program: 189001
Project: 189001
Buggy source:
protected void promptForSample(String[] necessaryFields){
  Log.stdout("String_Node_Str");
  int checkMe=0;
  if (!fields.containsKey("String_Node_Str")) {
    checkMe+=promptInteger("String_Node_Str",0);
  }
  if (!fields.containsKey("String_Node_Str")) {
    checkMe+=promptInteger("String_Node_Str",0);
  }
  if (!fields.containsKey("String_Node_Str")) {
    for (    Organism o : metadata.getOrganisms()) {
      Log.stdout(o.toString());
    }
    promptInteger("String_Node_Str",31);
  }
  promptForFields(necessaryFields);
  Log.error("String_Node_Str" + checkMe);
  if (!fieldsConfirmed(necessaryFields) || checkMe <= 0) {
    if (checkMe <= 0) {
      Log.stdout("String_Node_Str");
    }
    promptForSample(necessaryFields);
  }
}

Fixed version (ground truth):
protected void promptForSample(String[] necessaryFields){
  Log.stdout("String_Node_Str");
  int checkMe=0;
  if (!fields.containsKey("String_Node_Str")) {
    promptInteger("String_Node_Str",0);
  }
  if (!fields.containsKey("String_Node_Str")) {
    promptInteger("String_Node_Str",0);
  }
  checkMe=Integer.parseInt(fields.get("String_Node_Str")) + Integer.parseInt(fields.get("String_Node_Str"));
  if (!fields.containsKey("String_Node_Str")) {
    System.out.println();
    for (    Organism o : metadata.getOrganisms()) {
      Log.stdout(o.toString());
    }
    promptInteger("String_Node_Str",31);
  }
  promptForFields(necessaryFields);
  if (!fieldsConfirmed(necessaryFields) || checkMe <= 0) {
    if (checkMe <= 0) {
      Log.stdout("String_Node_Str");
    }
    promptForSample(necessaryFields);
  }
}
Program: 189002
Project: 189002
Buggy source:
protected void promptForStudy(String[] necessaryFields){
  Log.stdout("String_Node_Str");
  if (!fields.containsKey("String_Node_Str")) {
    for (    StudyType st : metadata.getStudyTypes()) {
      Log.stdout(st.toString());
    }
    promptInteger("String_Node_Str",4);
  }
  promptForFields(necessaryFields);
  if (!fieldsConfirmed(necessaryFields)) {
    promptForStudy(necessaryFields);
  }
}

Fixed version (ground truth):
protected void promptForStudy(String[] necessaryFields){
  Log.stdout("String_Node_Str");
  if (!fields.containsKey("String_Node_Str")) {
    System.out.println();
    for (    StudyType st : metadata.getStudyTypes()) {
      Log.stdout(st.toString());
    }
    promptInteger("String_Node_Str",4);
  }
  promptForFields(necessaryFields);
  if (!fieldsConfirmed(necessaryFields)) {
    promptForStudy(necessaryFields);
  }
}
Program: 189003
Project: 189003
Buggy source:
protected boolean fieldsConfirmed(String[] necessaryFields){
  for (  String s : necessaryFields) {
    Log.stdout(s + "String_Node_Str" + fields.get(s));
  }
  String confirm=ConsoleAdapter.getInstance().readLine("String_Node_Str");
  System.out.println("String_Node_Str" + confirm);
  if (confirm.trim().toLowerCase().equals("String_Node_Str") || confirm.trim().toLowerCase().equals("String_Node_Str")) {
    return true;
  }
 else {
    fields.clear();
    parseFields();
    return false;
  }
}

Fixed version (ground truth):
protected boolean fieldsConfirmed(String[] necessaryFields){
  for (  String s : necessaryFields) {
    Log.stdout(s + "String_Node_Str" + fields.get(s));
  }
  String confirm=ConsoleAdapter.getInstance().readLine("String_Node_Str");
  if (confirm.trim().toLowerCase().equals("String_Node_Str") || confirm.trim().toLowerCase().equals("String_Node_Str") || confirm.trim().isEmpty()) {
    return true;
  }
 else {
    fields.clear();
    parseFields();
    return false;
  }
}
Program: 189004
Project: 189004
Buggy source:
protected void promptForSequencerRun(String[] necessaryFields){
  Log.stdout("String_Node_Str");
  if (!fields.containsKey("String_Node_Str")) {
    for (    Platform p : metadata.getPlatforms()) {
      Log.stdout(p.toString());
    }
    promptInteger("String_Node_Str",20);
  }
  if (!fields.containsKey("String_Node_Str")) {
    promptBoolean("String_Node_Str",true);
  }
  if (!fields.containsKey("String_Node_Str")) {
    promptBoolean("String_Node_Str",false);
  }
  promptForFields(necessaryFields);
  if (!fieldsConfirmed(necessaryFields)) {
    promptForSequencerRun(necessaryFields);
  }
}

Fixed version (ground truth):
protected void promptForSequencerRun(String[] necessaryFields){
  Log.stdout("String_Node_Str");
  if (!fields.containsKey("String_Node_Str")) {
    System.out.println();
    for (    Platform p : metadata.getPlatforms()) {
      Log.stdout(p.toString());
    }
    promptInteger("String_Node_Str",20);
  }
  if (!fields.containsKey("String_Node_Str")) {
    promptBoolean("String_Node_Str",true);
  }
  if (!fields.containsKey("String_Node_Str")) {
    promptBoolean("String_Node_Str",false);
  }
  promptForFields(necessaryFields);
  if (!fieldsConfirmed(necessaryFields)) {
    promptForSequencerRun(necessaryFields);
  }
}
Program: 189005
Project: 189005
Buggy source:
protected Integer promptInteger(String string,Integer deflt){
  Integer title=null;
  String prompt=string + (deflt == null ? "String_Node_Str" : "String_Node_Str" + deflt + "String_Node_Str");
  int counter=0;
  while (title == null && counter++ < 10) {
    String line=ConsoleAdapter.getInstance().readLine(prompt);
    if (line.trim().isEmpty()) {
      title=deflt;
    }
 else {
      try {
        title=Integer.parseInt(line);
      }
 catch (      NumberFormatException e) {
        Log.stdout(string + "String_Node_Str");
      }
    }
  }
  fields.put(string,title.toString());
  return title;
}

Fixed version (ground truth):
protected Integer promptInteger(String string,Integer deflt){
  Integer title=null;
  String prompt=string + (deflt == null ? "String_Node_Str" : "String_Node_Str" + deflt + "String_Node_Str");
  int counter=0;
  while (title == null && counter++ < 10) {
    System.out.println();
    String line=ConsoleAdapter.getInstance().readLine(prompt);
    if (line.trim().isEmpty()) {
      title=deflt;
    }
 else {
      try {
        title=Integer.parseInt(line);
      }
 catch (      NumberFormatException e) {
        Log.stdout(string + "String_Node_Str");
      }
    }
  }
  fields.put(string,title.toString());
  return title;
}
Program: 189008
Project: 189008
Buggy source:
/** 
 * find the workflow by input id, and return the status of the workflow
 * @param id
 * @return the workflow status
 */
public abstract String getStatus(String id);

Fixed version (ground truth):
public abstract String getStatus();
Program: 189009
Project: 189009
Buggy source:
@Override public String getStatus(String id){
  OozieClient oc=this.getOozieClient();
  try {
    WorkflowJob wfJob=oc.getJobInfo(id);
    if (wfJob == null)     return null;
    return wfJob.getStatus().toString();
  }
 catch (  OozieClientException e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
@Override public String getStatus(){
  return this.getStatus(this.getId());
}
Program: 189010
Project: 189010
Buggy source:
@Override public String getStdOut(String id){
  return null;
}

Fixed version (ground truth):
@Override public String getStdOut(String id){
  if (this.statusRet == null)   return null;
  return this.statusRet.getStdout();
}
Program: 189011
Project: 189011
Buggy source:
@Override public ReturnValue launchWorkflow(AbstractWorkflowDataModel objectModel){
  ReturnValue ret=new ReturnValue(ReturnValue.SUCCESS);
  File dax=this.parseDataModel(objectModel);
  ret=this.runWorkflow(objectModel,dax);
  return ret;
}

Fixed version (ground truth):
@Override public ReturnValue launchWorkflow(AbstractWorkflowDataModel objectModel){
  ReturnValue ret=new ReturnValue(ReturnValue.SUCCESS);
  File dax=this.parseDataModel(objectModel);
  ret=this.runWorkflow(objectModel,dax);
  this.statusRet=ret;
  return ret;
}
Program: 189012
Project: 189012
Buggy source:
@Override public String getStatus(String id){
  return null;
}

Fixed version (ground truth):
@Override public String getStatus(){
  return this.getStatus("String_Node_Str");
}
Program: 189013
Project: 189013
Buggy source:
@Override public String getStdErr(String id){
  return null;
}

Fixed version (ground truth):
@Override public String getStdErr(String id){
  if (this.statusRet == null)   return null;
  return this.statusRet.getStderr();
}
Program: 189015
Project: 189015
Buggy source:
/** 
 * <p>testIfNull.</p>
 * @param o a {@link java.lang.Object} object.
 * @return a {@link java.lang.Object} object.
 */
protected Object testIfNull(Object o){
  return o;
}

Fixed version (ground truth):
/** 
 * <p>testIfNull.</p>
 * @param o a {@link java.lang.Object} object.
 * @return a {@link java.lang.Object} object.
 */
protected Object testIfNull(Object o){
  if (o == null) {
    throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND,"String_Node_Str");
  }
  return o;
}
Program: 189017
Project: 189017
Buggy source:
private void printWorkflowInfo(WorkflowJob wf){
  System.out.println("String_Node_Str" + wf.getAppPath());
  System.out.println("String_Node_Str" + wf.getAppName());
  System.out.println("String_Node_Str" + wf.getStatus());
  System.out.println("String_Node_Str");
  for (  WorkflowAction action : wf.getActions()) {
    System.out.println(MessageFormat.format("String_Node_Str",action.getName(),action.getType(),action.getStatus()));
  }
  System.out.println();
}

Fixed version (ground truth):
private void printWorkflowInfo(WorkflowJob wf){
  Log.stdout("String_Node_Str" + wf.getAppPath());
  Log.stdout("String_Node_Str" + wf.getAppName());
  Log.stdout("String_Node_Str" + wf.getStatus());
  Log.stdout("String_Node_Str");
  for (  WorkflowAction action : wf.getActions()) {
    Log.stdout(MessageFormat.format("String_Node_Str",action.getName(),action.getType(),action.getStatus()));
  }
}
Program: 189018
Project: 189018
Buggy source:
/** 
 * return a workflow.xml for hadoop
 * @param objectModel
 * @return
 */
private File parseDataModel(AbstractWorkflowDataModel objectModel){
  File file=new File(this.dir,"String_Node_Str");
  objectModel.getConfigs().put("String_Node_Str",this.dir.getAbsolutePath());
  OozieWorkflowXmlGenerator daxv2=new OozieWorkflowXmlGenerator();
  daxv2.generateWorkflowXml(objectModel,file.getAbsolutePath());
  return file;
}

Fixed version (ground truth):
/** 
 * return a workflow.xml for hadoop
 * @param objectModel
 * @return
 */
private File parseDataModel(AbstractWorkflowDataModel objectModel){
  File file=new File(this.dir,"String_Node_Str");
  OozieWorkflowXmlGenerator daxv2=new OozieWorkflowXmlGenerator();
  daxv2.generateWorkflowXml(objectModel,file.getAbsolutePath());
  return file;
}
Program: 189019
Project: 189019
Buggy source:
@Override public ReturnValue launchWorkflow(AbstractWorkflowDataModel objectModel){
  ReturnValue ret=new ReturnValue(ReturnValue.SUCCESS);
  this.setupEnvironment();
  this.parseDataModel(objectModel);
  this.setupHDFS(objectModel);
  ret=this.runWorkflow(objectModel);
  return ret;
}

Fixed version (ground truth):
@Override public ReturnValue launchWorkflow(AbstractWorkflowDataModel objectModel){
  this.dataModel=objectModel;
  ReturnValue ret=new ReturnValue(ReturnValue.SUCCESS);
  this.setupEnvironment();
  this.parseDataModel(objectModel);
  this.setupHDFS(objectModel);
  ret=this.runWorkflow(objectModel);
  return ret;
}
Program: 189020
Project: 189020
Buggy source:
/** 
 * @throws IOException 
 */
private void setupEnvironment(){
  try {
    this.dir=FileTools.createDirectoryWithUniqueName(new File(work_dir),"String_Node_Str");
    this.dir.setWritable(true,false);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  this.generateJobProperties();
  File lib=new File(this.dir,"String_Node_Str");
  lib.mkdir();
}

Fixed version (ground truth):
/** 
 * @throws IOException 
 */
private void setupEnvironment(){
  try {
    this.dir=FileTools.createDirectoryWithUniqueName(new File(this.dataModel.getEnv().getOOZIE_WORK_DIR()),"String_Node_Str");
    this.dir.setWritable(true,false);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  this.generateJobProperties();
  File lib=new File(this.dir,"String_Node_Str");
  lib.mkdir();
}
Program: 189021
Project: 189021
Buggy source:
private void generateJobProperties(){
  File file=new File(this.dir,"String_Node_Str");
  try {
    FileWriter fw=new FileWriter(file);
    fw.write("String_Node_Str");
    fw.write("String_Node_Str");
    fw.write("String_Node_Str");
    fw.write("String_Node_Str" + this.dir.getName());
    fw.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void generateJobProperties(){
  File file=new File(this.dir,"String_Node_Str");
  try {
    FileWriter fw=new FileWriter(file);
    fw.write("String_Node_Str" + this.dataModel.getEnv().getOOZIE_NAMENODE() + "String_Node_Str");
    fw.write("String_Node_Str" + this.dataModel.getEnv().getOOZIE_JOBTRACKER() + "String_Node_Str");
    fw.write("String_Node_Str" + this.dataModel.getEnv().getOOZIE_QUEUENAME() + "String_Node_Str");
    fw.write("String_Node_Str" + this.dir.getName());
    fw.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 189022
Project: 189022
Buggy source:
private ReturnValue runWorkflow(AbstractWorkflowDataModel objectModel){
  ReturnValue ret=new ReturnValue(ReturnValue.SUCCESS);
  OozieClient wc=new OozieClient("String_Node_Str");
  try {
    Properties conf=wc.createConfiguration();
    String app_path="String_Node_Str" + this.dir.getName();
    conf.setProperty(OozieClient.APP_PATH,app_path);
    conf.setProperty("String_Node_Str","String_Node_Str");
    conf.setProperty("String_Node_Str","String_Node_Str");
    conf.setProperty("String_Node_Str","String_Node_Str");
    String jobId=wc.run(conf);
    System.out.println("String_Node_Str");
    while (wc.getJobInfo(jobId).getStatus() == WorkflowJob.Status.RUNNING) {
      System.out.println("String_Node_Str");
      printWorkflowInfo(wc.getJobInfo(jobId));
      Thread.sleep(10 * 1000);
    }
    System.out.println("String_Node_Str");
    printWorkflowInfo(wc.getJobInfo(jobId));
    System.out.println(wc.getJobInfo(jobId));
  }
 catch (  OozieClientException oozieClientException) {
    oozieClientException.printStackTrace();
  }
catch (  InterruptedException e) {
    e.printStackTrace();
  }
  return ret;
}

Fixed version (ground truth):
private ReturnValue runWorkflow(AbstractWorkflowDataModel objectModel){
  ReturnValue ret=new ReturnValue(ReturnValue.SUCCESS);
  OozieClient wc=new OozieClient(this.dataModel.getEnv().getOOZIE_URL());
  try {
    Properties conf=wc.createConfiguration();
    String app_path=this.dataModel.getEnv().getOOZIE_APP_PATH() + this.dataModel.getEnv().getOOZIE_APP_ROOT() + "String_Node_Str"+ this.dir.getName();
    conf.setProperty(OozieClient.APP_PATH,app_path);
    conf.setProperty("String_Node_Str",this.dataModel.getEnv().getOOZIE_JOBTRACKER());
    conf.setProperty("String_Node_Str",this.dataModel.getEnv().getOOZIE_NAMENODE());
    conf.setProperty("String_Node_Str",this.dataModel.getEnv().getOOZIE_QUEUENAME());
    jobId=wc.run(conf);
    Log.stdout("String_Node_Str");
    while (wc.getJobInfo(jobId).getStatus() == WorkflowJob.Status.RUNNING) {
      Log.stdout("String_Node_Str");
      printWorkflowInfo(wc.getJobInfo(jobId));
      Thread.sleep(10 * 1000);
    }
    Log.stdout("String_Node_Str");
    printWorkflowInfo(wc.getJobInfo(jobId));
  }
 catch (  OozieClientException oozieClientException) {
    oozieClientException.printStackTrace();
  }
catch (  InterruptedException e) {
    e.printStackTrace();
  }
  return ret;
}
Program: 189023
Project: 189023
Buggy source:
/** 
 * copy the local dir to HDFS
 */
private void setupHDFS(AbstractWorkflowDataModel objectModel){
  Configuration conf=new Configuration();
  conf.addResource(new Path("String_Node_Str"));
  conf.addResource(new Path("String_Node_Str"));
  conf.addResource(new Path("String_Node_Str"));
  FileSystem fileSystem=null;
  try {
    fileSystem=FileSystem.get(conf);
    Path path=new Path("String_Node_Str" + this.dir.getName());
    fileSystem.mkdirs(path);
    Path pathlib=new Path("String_Node_Str" + this.dir.getName() + "String_Node_Str");
    fileSystem.mkdirs(pathlib);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  try {
    this.copyFromLocal(fileSystem,this.work_dir + "String_Node_Str" + this.dir.getName()+ "String_Node_Str","String_Node_Str" + this.dir.getName());
    this.copyFromLocal(fileSystem,this.work_dir + "String_Node_Str" + this.dir.getName()+ "String_Node_Str","String_Node_Str" + this.dir.getName());
    this.copyFromLocal(fileSystem,objectModel.getWorkflowBaseDir() + "String_Node_Str" + objectModel.getTags().get("String_Node_Str")+ "String_Node_Str","String_Node_Str" + this.dir.getName() + "String_Node_Str");
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  try {
    fileSystem.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * copy the local dir to HDFS
 */
private void setupHDFS(AbstractWorkflowDataModel objectModel){
  Configuration conf=new Configuration();
  conf.addResource(new Path(this.dataModel.getEnv().getHADOOP_CORE_XML()));
  conf.addResource(new Path(this.dataModel.getEnv().getHADOOP_HDFS_SITE_XML()));
  conf.addResource(new Path(this.dataModel.getEnv().getHADOOP_MAPRED_SITE_XML()));
  FileSystem fileSystem=null;
  try {
    fileSystem=FileSystem.get(conf);
    Path path=new Path(this.dataModel.getEnv().getOOZIE_APP_ROOT() + "String_Node_Str" + this.dir.getName());
    fileSystem.mkdirs(path);
    Path pathlib=new Path(this.dataModel.getEnv().getOOZIE_APP_ROOT() + "String_Node_Str" + this.dir.getName()+ "String_Node_Str");
    fileSystem.mkdirs(pathlib);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  try {
    this.copyFromLocal(fileSystem,this.dataModel.getEnv().getOOZIE_WORK_DIR() + "String_Node_Str" + this.dir.getName()+ "String_Node_Str",this.dataModel.getEnv().getOOZIE_APP_ROOT() + "String_Node_Str" + this.dir.getName());
    this.copyFromLocal(fileSystem,this.dataModel.getEnv().getOOZIE_WORK_DIR() + "String_Node_Str" + this.dir.getName()+ "String_Node_Str",this.dataModel.getEnv().getOOZIE_APP_ROOT() + "String_Node_Str" + this.dir.getName());
    this.copyFromLocal(fileSystem,objectModel.getWorkflowBaseDir() + "String_Node_Str" + objectModel.getTags().get("String_Node_Str")+ "String_Node_Str",this.dataModel.getEnv().getOOZIE_APP_ROOT() + "String_Node_Str" + this.dir.getName()+ "String_Node_Str");
  }
 catch (  IOException e1) {
    e1.printStackTrace();
  }
  try {
    fileSystem.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 189025
Project: 189025
Buggy source:
private OozieJob createOozieJobObject(AbstractJob job,AbstractWorkflowDataModel wfdm){
  OozieJob ret=null;
  if (job instanceof JavaJob) {
  }
 else   if (job instanceof PerlJob) {
    ret=new OozieJob(job,job.getAlgo() + "String_Node_Str" + this.jobs.size(),wfdm.getConfigs().get("String_Node_Str"));
  }
 else   if (job instanceof JavaSeqwareModuleJob) {
  }
 else {
    ret=new OozieJob(job,job.getAlgo() + "String_Node_Str" + this.jobs.size(),wfdm.getConfigs().get("String_Node_Str"));
  }
  return ret;
}

Fixed version (ground truth):
private OozieJob createOozieJobObject(AbstractJob job,AbstractWorkflowDataModel wfdm){
  OozieJob ret=null;
  if (job instanceof JavaJob) {
  }
 else   if (job instanceof PerlJob) {
    ret=new OozieJob(job,job.getAlgo() + "String_Node_Str" + this.jobs.size(),wfdm.getEnv().getOOZIE_WORK_DIR());
  }
 else   if (job instanceof JavaSeqwareModuleJob) {
  }
 else {
    ret=new OozieJob(job,job.getAlgo() + "String_Node_Str" + this.jobs.size(),wfdm.getEnv().getOOZIE_WORK_DIR());
  }
  return ret;
}