Program: 115216
Project: 115216
Buggy source:
/** 
 * <ns2:studyProtocolIdentification> <ns2:assignedDate xmlns:ns1="uri:iso.org:21090" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:TS" nullFlavor="NI"/> <ns2:identifier xmlns:ns1="uri:iso.org:21090" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="2.16.840.1.113883.3.26.7.7" extension="AU-67001" identifierName="Study Protocol" displayable="false"/> Keep in mind that there are multiple elements here, so we should only grab the identifier where primaryIndicator = true.
 * @param study
 * @param studyNode
 * @return
 */
public StudyBean getStudyIdentifier(StudyBean study,Node studyNode) throws Exception {
  Element studyElement=(Element)studyNode;
  NodeList nlist=studyElement.getElementsByTagNameNS(CONNECTOR_NAMESPACE_V1,"String_Node_Str");
  String identifier="String_Node_Str";
  String secondaryIdentifier="String_Node_Str";
  System.out.println("String_Node_Str" + nlist.getLength() + "String_Node_Str");
  for (int j=0; j < nlist.getLength(); j++) {
    Node nlistNode=nlist.item(j);
    String isPrimaryIdentifier=this.getElementValue(nlistNode,CONNECTOR_NAMESPACE_V1,"String_Node_Str","String_Node_Str");
    if ("String_Node_Str".equals(isPrimaryIdentifier)) {
      identifier=this.getElementValue(nlistNode,CONNECTOR_NAMESPACE_V1,"String_Node_Str","String_Node_Str");
    }
 else {
      secondaryIdentifier=this.getElementValue(nlistNode,CONNECTOR_NAMESPACE_V1,"String_Node_Str","String_Node_Str");
      System.out.println("String_Node_Str" + secondaryIdentifier);
    }
  }
  study.setIdentifier(identifier);
  study.setSecondaryIdentifier(secondaryIdentifier);
  return study;
}

Fixed version (ground truth):
/** 
 * <ns2:studyProtocolIdentification> <ns2:assignedDate xmlns:ns1="uri:iso.org:21090" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:TS" nullFlavor="NI"/> <ns2:identifier xmlns:ns1="uri:iso.org:21090" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:II" root="2.16.840.1.113883.3.26.7.7" extension="AU-67001" identifierName="Study Protocol" displayable="false"/> Keep in mind that there are multiple elements here, so we should only grab the identifier where primaryIndicator = true.
 * @param study
 * @param studyNode
 * @return
 */
public StudyBean getStudyIdentifier(StudyBean study,Node studyNode) throws Exception {
  Element studyElement=(Element)studyNode;
  NodeList nlist=studyElement.getElementsByTagNameNS(CONNECTOR_NAMESPACE_V1,"String_Node_Str");
  String identifier="String_Node_Str";
  String secondaryIdentifier="String_Node_Str";
  System.out.println("String_Node_Str" + nlist.getLength() + "String_Node_Str");
  for (int j=0; j < nlist.getLength(); j++) {
    Node nlistNode=nlist.item(j);
    String isPrimaryIdentifier=this.getElementValue(nlistNode,CONNECTOR_NAMESPACE_V1,"String_Node_Str","String_Node_Str");
    if ("String_Node_Str".equals(isPrimaryIdentifier)) {
      identifier=this.getElementValue(nlistNode,CONNECTOR_NAMESPACE_V1,"String_Node_Str","String_Node_Str");
    }
 else {
      secondaryIdentifier=this.getElementValue(nlistNode,CONNECTOR_NAMESPACE_V1,"String_Node_Str","String_Node_Str");
      System.out.println("String_Node_Str" + secondaryIdentifier);
    }
  }
  if ("String_Node_Str".equals(identifier)) {
    throw new CCDataValidationFaultException("String_Node_Str" + "String_Node_Str","String_Node_Str");
  }
  if ("String_Node_Str".equals(secondaryIdentifier)) {
    throw new CCDataValidationFaultException("String_Node_Str" + "String_Node_Str","String_Node_Str");
  }
  study.setIdentifier(identifier);
  study.setSecondaryIdentifier(secondaryIdentifier);
  return study;
}