Program: 114995
Project: 114995
Buggy source:
private ArrayList<ExportStudyEventDataBean> setExportStudyEventDataBean(StudySubject ss,List<StudyEvent> sEvents,String formVersionOID){
  ArrayList<ExportStudyEventDataBean> al=new ArrayList<ExportStudyEventDataBean>();
  SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
  for (  StudyEvent se : sEvents) {
    if (se != null) {
      ExportStudyEventDataBean expSEBean=new ExportStudyEventDataBean();
      expSEBean.setStudyEvent(se);
      expSEBean.setLocation(se.getLocation());
      if (se.getDateEnd() != null) {
        if (se.getEndTimeFlag()) {
          expSEBean.setEndDate(se.getDateEnd() + "String_Node_Str");
        }
 else {
          String temp=sdf.format(se.getDateEnd());
          expSEBean.setEndDate(temp);
        }
      }
      if (se.getDateStart() != null) {
        if (se.getStartTimeFlag()) {
          expSEBean.setStartDate(se.getDateStart() + "String_Node_Str");
        }
 else {
          String temp=sdf.format(se.getDateStart());
          expSEBean.setStartDate(temp);
        }
      }
      expSEBean.setEventName(se.getStudyEventDefinition().getName());
      expSEBean.setStudyEventOID(se.getStudyEventDefinition().getOc_oid());
      expSEBean.setStudyEventRepeatKey(se.getSampleOrdinal().toString());
      if (se.getStudySubject().getSubject().getDateOfBirth() != null && se.getDateStart() != null)       expSEBean.setAgeAtEvent(Utils.getAge(se.getStudySubject().getSubject().getDateOfBirth(),se.getDateStart()));
      expSEBean.setStatus(fetchStudyEventStatus(se.getSubjectEventStatusId()));
      if (collectAudits)       expSEBean.setAuditLogs(fetchAuditLogs(se.getStudyEventId(),"String_Node_Str",se.getStudyEventDefinition().getOc_oid(),null));
      if (collectDns)       expSEBean.setDiscrepancyNotes(fetchDiscrepancyNotes(se));
      expSEBean.setExportFormData(getFormDataForClinicalStudy(ss,se,formVersionOID));
      expSEBean.setStudyEventDefinition(se.getStudyEventDefinition());
      al.add(expSEBean);
    }
  }
  return al;
}

Fixed version (ground truth):
private ArrayList<ExportStudyEventDataBean> setExportStudyEventDataBean(Study study,StudySubject ss,List<StudyEvent> sEvents,String formVersionOID){
  ArrayList<ExportStudyEventDataBean> al=new ArrayList<ExportStudyEventDataBean>();
  SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
  for (  StudyEvent se : sEvents) {
    if (se != null) {
      ExportStudyEventDataBean expSEBean=new ExportStudyEventDataBean();
      expSEBean.setStudyEvent(se);
      expSEBean.setLocation(se.getLocation());
      if (se.getDateEnd() != null) {
        if (se.getEndTimeFlag()) {
          expSEBean.setEndDate(se.getDateEnd() + "String_Node_Str");
        }
 else {
          String temp=sdf.format(se.getDateEnd());
          expSEBean.setEndDate(temp);
        }
      }
      if (se.getDateStart() != null) {
        if (se.getStartTimeFlag()) {
          expSEBean.setStartDate(se.getDateStart() + "String_Node_Str");
        }
 else {
          String temp=sdf.format(se.getDateStart());
          expSEBean.setStartDate(temp);
        }
      }
      expSEBean.setEventName(se.getStudyEventDefinition().getName());
      expSEBean.setStudyEventOID(se.getStudyEventDefinition().getOc_oid());
      expSEBean.setStudyEventRepeatKey(se.getSampleOrdinal().toString());
      if (se.getStudySubject().getSubject().getDateOfBirth() != null && se.getDateStart() != null)       expSEBean.setAgeAtEvent(Utils.getAge(se.getStudySubject().getSubject().getDateOfBirth(),se.getDateStart()));
      expSEBean.setStatus(fetchStudyEventStatus(se.getSubjectEventStatusId()));
      if (collectAudits)       expSEBean.setAuditLogs(fetchAuditLogs(se.getStudyEventId(),"String_Node_Str",se.getStudyEventDefinition().getOc_oid(),null));
      if (collectDns)       expSEBean.setDiscrepancyNotes(fetchDiscrepancyNotes(se));
      expSEBean.setExportFormData(getFormDataForClinicalStudy(study,ss,se,formVersionOID));
      expSEBean.setStudyEventDefinition(se.getStudyEventDefinition());
      al.add(expSEBean);
    }
  }
  return al;
}