Program: 188987
Project: 188987
Buggy source:
private int retrieveExperiment(RunInfo run,int studyAccession) throws Exception {
  Log.stdout("String_Node_Str");
  List<Experiment> experiments=metadata.getExperimentsFrom(studyAccession);
  Integer experimentAccession=null;
  if (experiments != null && !experiments.isEmpty()) {
    Log.stdout("String_Node_Str");
    for (    Experiment e : experiments) {
      Log.stdout("String_Node_Str" + e.getTitle());
    }
  }
  String experimentName=ConsoleAdapter.getInstance().promptString("String_Node_Str",run.getExperimentName());
  if (experiments != null) {
    for (    Experiment ex : experiments) {
      if (ex.getTitle().equals(experimentName)) {
        experimentAccession=ex.getSwAccession();
      }
    }
  }
  if (experimentAccession == null) {
    if (experiments == null || experiments.isEmpty()) {
      Log.stdout("String_Node_Str");
      fields.clear();
      fields.put("String_Node_Str",String.valueOf(studyAccession));
      fields.put("String_Node_Str",run.getPlatformId());
      fields.put("String_Node_Str",run.getExperimentName());
      fields.put("String_Node_Str",run.getExperimentDescription());
      interactive=true;
      ReturnValue rv=addExperiment();
      experimentAccession=Integer.parseInt(rv.getAttribute("String_Node_Str"));
    }
 else {
      Log.stdout("String_Node_Str");
      Log.stdout("String_Node_Str" + studyAccession + "String_Node_Str");
      Log.stdout("String_Node_Str");
      throw new Exception("String_Node_Str");
    }
  }
  if (!run.getExperimentAttributes().isEmpty()) {
    metadata.annotateExperiment(experimentAccession,run.getExperimentAttributes());
  }
  names.put(experimentAccession,experimentName);
  recordEdge("String_Node_Str",studyAccession,"String_Node_Str",experimentAccession);
  return experimentAccession;
}

Fixed version (ground truth):
private int retrieveExperiment(RunInfo run,int studyAccession) throws Exception {
  Log.stdout("String_Node_Str");
  List<Experiment> experiments=metadata.getExperimentsFrom(studyAccession);
  Integer experimentAccession=null;
  if (experiments != null && !experiments.isEmpty()) {
    Log.stdout("String_Node_Str");
    for (    Experiment e : experiments) {
      Log.stdout("String_Node_Str" + e.getTitle());
    }
  }
  if (experiments != null) {
    for (    Experiment ex : experiments) {
      if (ex.getTitle().equals(run.getExperimentName())) {
        Log.stdout("String_Node_Str" + ex.getName() + "String_Node_Str"+ ex.getSwAccession());
        experimentAccession=ex.getSwAccession();
      }
    }
  }
  if (experimentAccession == null) {
    if (experiments == null || experiments.isEmpty()) {
      Log.stdout("String_Node_Str");
      fields.clear();
      fields.put("String_Node_Str",String.valueOf(studyAccession));
      fields.put("String_Node_Str",run.getPlatformId());
      fields.put("String_Node_Str",run.getExperimentName());
      fields.put("String_Node_Str",run.getExperimentDescription());
      interactive=true;
      ReturnValue rv=addExperiment();
      experimentAccession=Integer.parseInt(rv.getAttribute("String_Node_Str"));
    }
 else {
      Log.stdout("String_Node_Str");
      Log.stdout("String_Node_Str" + studyAccession + "String_Node_Str");
      Log.stdout("String_Node_Str");
      throw new Exception("String_Node_Str");
    }
  }
  if (!run.getExperimentAttributes().isEmpty()) {
    metadata.annotateExperiment(experimentAccession,run.getExperimentAttributes());
  }
  names.put(experimentAccession,run.getExperimentName());
  recordEdge("String_Node_Str",studyAccession,"String_Node_Str",experimentAccession);
  return experimentAccession;
}