Program: 188913
Project: 188913
Buggy source:
/** 
 * Generates a RunInfo object with the given parameters. All fields are optional.
 * @param runName
 * @param studyTitle
 * @param experimentName
 * @param filePath
 * @param platformId
 * @param studyType
 * @return
 */
protected RunInfo generateRunInfo(String runName,String runDescription,String studyTitle,String studyDescription,String studyCenterName,String studyCenterProject,String experimentName,String experimentDescription,String filePath,int platformId,int studyType,boolean isPairedEnd,String workflowType,String assayType){
  RunInfo runInfo=new RunInfo();
  KeyVal[] list=getKeyVals(metadata.getStudyTypes());
  runInfo.setStudyTitle(promptString("String_Node_Str",studyTitle,Field.study_name));
  runInfo.setStudyDescription(studyDescription);
  if (studyDescription == null) {
    runInfo.setStudyDescription(runInfo.getStudyTitle());
  }
  runInfo.setStudyCenterName(promptString("String_Node_Str",studyCenterName,Field.study_center_name));
  runInfo.setStudyCenterProject(promptString("String_Node_Str",studyCenterProject,Field.study_center_project));
  runInfo.setStudyType(promptAccession("String_Node_Str",studyType,list,Field.study_type));
  list=getKeyVals(metadata.getPlatforms());
  runInfo.setRunName(promptString("String_Node_Str",runName,Field.sequencer_run_name));
  runInfo.setRunDescription(runDescription);
  if (runDescription == null) {
    runInfo.setRunDescription(runInfo.getRunName());
  }
  runInfo.setRunFilePath(promptString("String_Node_Str",filePath,Field.run_file_path));
  runInfo.setPlatformId(promptAccession("String_Node_Str",platformId,list,Field.platform_id));
  runInfo.setPairedEnd(isPairedEnd);
  runInfo.setRunSkip(false);
  runInfo.setExperimentName(promptString("String_Node_Str",experimentName,Field.experiment_name));
  runInfo.setExperimentDescription(experimentDescription);
  if (experimentDescription == null) {
    runInfo.setExperimentDescription(runInfo.getExperimentName());
  }
  return runInfo;
}

Fixed version (ground truth):
/** 
 * Generates a RunInfo object with the given parameters. All fields are optional.
 * @param runName
 * @param studyTitle
 * @param experimentName
 * @param filePath
 * @param platformId
 * @param studyType
 * @return
 */
protected RunInfo generateRunInfo(String runName,String runDescription,String studyTitle,String studyDescription,String studyCenterName,String studyCenterProject,String experimentName,String experimentDescription,String filePath,int platformId,int studyType,boolean isPairedEnd,String workflowType,String assayType){
  RunInfo runInfo=new RunInfo();
  KeyVal[] list=getKeyVals(metadata.getStudyTypes());
  runInfo.setStudyTitle(promptString("String_Node_Str",studyTitle,Field.study_name));
  runInfo.setStudyDescription(studyDescription);
  if (studyDescription == null) {
    runInfo.setStudyDescription(runInfo.getStudyTitle());
  }
  runInfo.setStudyCenterName(promptString("String_Node_Str",studyCenterName,Field.study_center_name));
  runInfo.setStudyCenterProject(promptString("String_Node_Str",studyCenterProject,Field.study_center_project));
  runInfo.setStudyType(promptAccession("String_Node_Str",studyType,list,Field.study_type));
  list=getKeyVals(metadata.getPlatforms());
  runInfo.setRunName(promptString("String_Node_Str",runName,Field.sequencer_run_name));
  runInfo.setRunDescription(runDescription);
  if (runDescription == null) {
    runInfo.setRunDescription(runInfo.getRunName());
  }
  runInfo.setRunFilePath(promptString("String_Node_Str",filePath,Field.run_file_path));
  runInfo.setPlatformId(promptAccession("String_Node_Str",platformId,list,Field.platform_id));
  runInfo.setPairedEnd(isPairedEnd);
  runInfo.setRunSkip(false);
  runInfo.setExperimentName(promptString("String_Node_Str",experimentName,Field.experiment_name));
  runInfo.setExperimentDescription(experimentDescription);
  if (experimentDescription == null) {
    runInfo.setExperimentDescription(runInfo.getExperimentName());
  }
  if (workflowType != null) {
    runInfo.setWorkflowType(workflowType);
  }
  if (assayType != null) {
    runInfo.setAssayType(assayType);
  }
  return runInfo;
}