Program: 115092
Project: 115092
Buggy source:
/** 
 * Process createStudySubject request by creating SubjectTransferBean from received payload.
 * @param subjectElement
 * @return SubjectTransferBean
 * @throws ParseException
 */
private SubjectTransferBean unMarshallToSubjectTransfer(Element subjectElement) throws ParseException, Exception {
  Element studySubjectIdElement=DomUtils.getChildElementByTagName(subjectElement,"String_Node_Str");
  Element secondaryIdElement=DomUtils.getChildElementByTagName(subjectElement,"String_Node_Str");
  Element enrollmentDateElement=DomUtils.getChildElementByTagName(subjectElement,"String_Node_Str");
  Element subject=DomUtils.getChildElementByTagName(subjectElement,"String_Node_Str");
  Element personIdElement=DomUtils.getChildElementByTagName(subject,"String_Node_Str");
  Element genderElement=DomUtils.getChildElementByTagName(subject,"String_Node_Str");
  Element dateOfBirthElement=DomUtils.getChildElementByTagName(subject,"String_Node_Str");
  Element yearOfBirthElement=DomUtils.getChildElementByTagName(subject,"String_Node_Str");
  Element study=DomUtils.getChildElementByTagName(subjectElement,"String_Node_Str");
  Element studyIdentifierElement=DomUtils.getChildElementByTagName(study,"String_Node_Str");
  Element site=DomUtils.getChildElementByTagName(study,"String_Node_Str");
  Element siteIdentifierElement=site == null ? null : DomUtils.getChildElementByTagName(site,"String_Node_Str");
  String personIdValue=personIdElement == null ? "String_Node_Str" : DomUtils.getTextValue(personIdElement).trim();
  String studySubjectIdValue=DomUtils.getTextValue(studySubjectIdElement).trim();
  String genderValue=genderElement == null ? null : DomUtils.getTextValue(genderElement).trim();
  String secondaryIdValue=secondaryIdElement == null ? null : DomUtils.getTextValue(secondaryIdElement).trim();
  String enrollmentDateValue=DomUtils.getTextValue(enrollmentDateElement).trim();
  String dateOfBirthValue=dateOfBirthElement == null ? null : DomUtils.getTextValue(dateOfBirthElement).trim();
  String yearOfBirthValue=yearOfBirthElement == null ? null : DomUtils.getTextValue(yearOfBirthElement).trim();
  String studyIdentifier=studyIdentifierElement == null ? null : DomUtils.getTextValue(studyIdentifierElement).trim();
  String siteIdentifier=siteIdentifierElement == null ? null : DomUtils.getTextValue(siteIdentifierElement).trim();
  SubjectTransferBean subjectTransferBean=new SubjectTransferBean();
  subjectTransferBean.setStudyOid(studyIdentifier);
  subjectTransferBean.setSiteIdentifier(siteIdentifier);
  subjectTransferBean.setPersonId(personIdValue);
  subjectTransferBean.setStudySubjectId(studySubjectIdValue);
  if (genderValue == null || genderValue.length() < 1) {
  }
 else {
    subjectTransferBean.setGender(genderValue.toCharArray()[0]);
  }
  subjectTransferBean.setDateOfBirth((dateOfBirthValue == null || dateOfBirthValue.length() == 0) ? null : getDate(dateOfBirthValue));
  subjectTransferBean.setSecondaryId(secondaryIdValue == null ? "String_Node_Str" : secondaryIdValue);
  subjectTransferBean.setYearOfBirth(yearOfBirthValue);
  subjectTransferBean.setEnrollmentDate(getDate(enrollmentDateValue));
  return subjectTransferBean;
}

Fixed version (ground truth):
/** 
 * Process createStudySubject request by creating SubjectTransferBean from received payload.
 * @param subjectElement
 * @return SubjectTransferBean
 * @throws ParseException
 */
private SubjectTransferBean unMarshallToSubjectTransfer(Element subjectElement) throws ParseException, Exception {
  Element studySubjectIdElement=DomUtils.getChildElementByTagName(subjectElement,"String_Node_Str");
  Element secondaryIdElement=DomUtils.getChildElementByTagName(subjectElement,"String_Node_Str");
  Element enrollmentDateElement=DomUtils.getChildElementByTagName(subjectElement,"String_Node_Str");
  Element subject=DomUtils.getChildElementByTagName(subjectElement,"String_Node_Str");
  Element personIdElement=DomUtils.getChildElementByTagName(subject,"String_Node_Str");
  Element genderElement=DomUtils.getChildElementByTagName(subject,"String_Node_Str");
  Element dateOfBirthElement=DomUtils.getChildElementByTagName(subject,"String_Node_Str");
  Element yearOfBirthElement=DomUtils.getChildElementByTagName(subject,"String_Node_Str");
  Element study=DomUtils.getChildElementByTagName(subjectElement,"String_Node_Str");
  Element studyIdentifierElement=DomUtils.getChildElementByTagName(study,"String_Node_Str");
  Element site=DomUtils.getChildElementByTagName(study,"String_Node_Str");
  Element siteIdentifierElement=site == null ? null : DomUtils.getChildElementByTagName(site,"String_Node_Str");
  String personIdValue=personIdElement == null ? "String_Node_Str" : DomUtils.getTextValue(personIdElement).trim();
  String studySubjectIdValue=studySubjectIdElement == null ? "String_Node_Str" : DomUtils.getTextValue(studySubjectIdElement).trim();
  String genderValue=genderElement == null ? null : DomUtils.getTextValue(genderElement).trim();
  String secondaryIdValue=secondaryIdElement == null ? null : DomUtils.getTextValue(secondaryIdElement).trim();
  String enrollmentDateValue=DomUtils.getTextValue(enrollmentDateElement).trim();
  String dateOfBirthValue=dateOfBirthElement == null ? null : DomUtils.getTextValue(dateOfBirthElement).trim();
  String yearOfBirthValue=yearOfBirthElement == null ? null : DomUtils.getTextValue(yearOfBirthElement).trim();
  String studyIdentifier=studyIdentifierElement == null ? null : DomUtils.getTextValue(studyIdentifierElement).trim();
  String siteIdentifier=siteIdentifierElement == null ? null : DomUtils.getTextValue(siteIdentifierElement).trim();
  SubjectTransferBean subjectTransferBean=new SubjectTransferBean();
  subjectTransferBean.setStudyOid(studyIdentifier);
  subjectTransferBean.setSiteIdentifier(siteIdentifier);
  subjectTransferBean.setPersonId(personIdValue);
  subjectTransferBean.setStudySubjectId(studySubjectIdValue);
  if (genderValue == null || genderValue.length() < 1) {
  }
 else {
    subjectTransferBean.setGender(genderValue.toCharArray()[0]);
  }
  subjectTransferBean.setDateOfBirth((dateOfBirthValue == null || dateOfBirthValue.length() == 0) ? null : getDate(dateOfBirthValue));
  subjectTransferBean.setSecondaryId(secondaryIdValue == null ? "String_Node_Str" : secondaryIdValue);
  subjectTransferBean.setYearOfBirth(yearOfBirthValue);
  subjectTransferBean.setEnrollmentDate(getDate(enrollmentDateValue));
  return subjectTransferBean;
}