Program: 24001
Project: 24001
Buggy source:
protected void composeEndpointInner(Endpoint element) throws IOException {
  composeDomainResourceElements(element);
  if (element.hasStatusElement()) {
    composeEnumerationCore("String_Node_Str",element.getStatusElement(),new Endpoint.EndpointStatusEnumFactory(),false);
    composeEnumerationExtras("String_Node_Str",element.getStatusElement(),new Endpoint.EndpointStatusEnumFactory(),false);
  }
  if (element.hasManagingOrganization()) {
    composeReference("String_Node_Str",element.getManagingOrganization());
  }
  if (element.hasContact()) {
    openArray("String_Node_Str");
    for (    ContactPoint e : element.getContact())     composeContactPoint(null,e);
    closeArray();
  }
  ;
  if (element.hasConnectionTypeElement()) {
    composeCodeCore("String_Node_Str",element.getConnectionTypeElement(),false);
    composeCodeExtras("String_Node_Str",element.getConnectionTypeElement(),false);
  }
  if (element.hasMethod()) {
    openArray("String_Node_Str");
    for (    Coding e : element.getMethod())     composeCoding(null,e);
    closeArray();
  }
  ;
  if (element.hasPeriod()) {
    composePeriod("String_Node_Str",element.getPeriod());
  }
  if (element.hasAddress()) {
    composeType("String_Node_Str",element.getAddress());
  }
  if (element.hasPayloadFormatElement()) {
    composeStringCore("String_Node_Str",element.getPayloadFormatElement(),false);
    composeStringExtras("String_Node_Str",element.getPayloadFormatElement(),false);
  }
  if (element.hasPayloadType()) {
    openArray("String_Node_Str");
    for (    CodeableConcept e : element.getPayloadType())     composeCodeableConcept(null,e);
    closeArray();
  }
  ;
  if (element.hasHeader()) {
    openArray("String_Node_Str");
    for (    StringType e : element.getHeader())     composeStringCore(null,e,true);
    closeArray();
    if (anyHasExtras(element.getHeader())) {
      openArray("String_Node_Str");
      for (      StringType e : element.getHeader())       composeStringExtras(null,e,true);
      closeArray();
    }
  }
  ;
  if (element.hasPublicKeyElement()) {
    composeStringCore("String_Node_Str",element.getPublicKeyElement(),false);
    composeStringExtras("String_Node_Str",element.getPublicKeyElement(),false);
  }
}

Fixed version (ground truth):
protected void composeEndpointInner(Endpoint element) throws IOException {
  composeDomainResourceElements(element);
  if (element.hasIdentifier()) {
    openArray("String_Node_Str");
    for (    Identifier e : element.getIdentifier())     composeIdentifier(null,e);
    closeArray();
  }
  ;
  if (element.hasStatusElement()) {
    composeEnumerationCore("String_Node_Str",element.getStatusElement(),new Endpoint.EndpointStatusEnumFactory(),false);
    composeEnumerationExtras("String_Node_Str",element.getStatusElement(),new Endpoint.EndpointStatusEnumFactory(),false);
  }
  if (element.hasManagingOrganization()) {
    composeReference("String_Node_Str",element.getManagingOrganization());
  }
  if (element.hasContact()) {
    openArray("String_Node_Str");
    for (    ContactPoint e : element.getContact())     composeContactPoint(null,e);
    closeArray();
  }
  ;
  if (element.hasConnectionTypeElement()) {
    composeCodeCore("String_Node_Str",element.getConnectionTypeElement(),false);
    composeCodeExtras("String_Node_Str",element.getConnectionTypeElement(),false);
  }
  if (element.hasMethod()) {
    openArray("String_Node_Str");
    for (    Coding e : element.getMethod())     composeCoding(null,e);
    closeArray();
  }
  ;
  if (element.hasPeriod()) {
    composePeriod("String_Node_Str",element.getPeriod());
  }
  if (element.hasAddress()) {
    composeType("String_Node_Str",element.getAddress());
  }
  if (element.hasPayloadFormatElement()) {
    composeStringCore("String_Node_Str",element.getPayloadFormatElement(),false);
    composeStringExtras("String_Node_Str",element.getPayloadFormatElement(),false);
  }
  if (element.hasPayloadType()) {
    openArray("String_Node_Str");
    for (    CodeableConcept e : element.getPayloadType())     composeCodeableConcept(null,e);
    closeArray();
  }
  ;
  if (element.hasHeader()) {
    openArray("String_Node_Str");
    for (    StringType e : element.getHeader())     composeStringCore(null,e,true);
    closeArray();
    if (anyHasExtras(element.getHeader())) {
      openArray("String_Node_Str");
      for (      StringType e : element.getHeader())       composeStringExtras(null,e,true);
      closeArray();
    }
  }
  ;
  if (element.hasPublicKeyElement()) {
    composeStringCore("String_Node_Str",element.getPublicKeyElement(),false);
    composeStringExtras("String_Node_Str",element.getPublicKeyElement(),false);
  }
}