Program: 23056
Project: 23056
Buggy source:
protected void composeStructureDefinitionInner(StructureDefinition element) throws IOException {
  composeDomainResourceElements(element);
  if (element.hasUrlElement()) {
    composeUriCore("String_Node_Str",element.getUrlElement(),false);
    composeUriExtras("String_Node_Str",element.getUrlElement(),false);
  }
  if (element.hasIdentifier()) {
    openArray("String_Node_Str");
    for (    Identifier e : element.getIdentifier())     composeIdentifier(null,e);
    closeArray();
  }
  ;
  if (element.hasVersionElement()) {
    composeStringCore("String_Node_Str",element.getVersionElement(),false);
    composeStringExtras("String_Node_Str",element.getVersionElement(),false);
  }
  if (element.hasNameElement()) {
    composeStringCore("String_Node_Str",element.getNameElement(),false);
    composeStringExtras("String_Node_Str",element.getNameElement(),false);
  }
  if (element.hasTitleElement()) {
    composeStringCore("String_Node_Str",element.getTitleElement(),false);
    composeStringExtras("String_Node_Str",element.getTitleElement(),false);
  }
  if (element.hasStatusElement()) {
    composeEnumerationCore("String_Node_Str",element.getStatusElement(),new Enumerations.PublicationStatusEnumFactory(),false);
    composeEnumerationExtras("String_Node_Str",element.getStatusElement(),new Enumerations.PublicationStatusEnumFactory(),false);
  }
  if (element.hasExperimentalElement()) {
    composeBooleanCore("String_Node_Str",element.getExperimentalElement(),false);
    composeBooleanExtras("String_Node_Str",element.getExperimentalElement(),false);
  }
  if (element.hasDateElement()) {
    composeDateTimeCore("String_Node_Str",element.getDateElement(),false);
    composeDateTimeExtras("String_Node_Str",element.getDateElement(),false);
  }
  if (element.hasPublisherElement()) {
    composeStringCore("String_Node_Str",element.getPublisherElement(),false);
    composeStringExtras("String_Node_Str",element.getPublisherElement(),false);
  }
  if (element.hasContact()) {
    openArray("String_Node_Str");
    for (    ContactDetail e : element.getContact())     composeContactDetail(null,e);
    closeArray();
  }
  ;
  if (element.hasDescriptionElement()) {
    composeMarkdownCore("String_Node_Str",element.getDescriptionElement(),false);
    composeMarkdownExtras("String_Node_Str",element.getDescriptionElement(),false);
  }
  if (element.hasUseContext()) {
    openArray("String_Node_Str");
    for (    UsageContext e : element.getUseContext())     composeUsageContext(null,e);
    closeArray();
  }
  ;
  if (element.hasJurisdiction()) {
    openArray("String_Node_Str");
    for (    CodeableConcept e : element.getJurisdiction())     composeCodeableConcept(null,e);
    closeArray();
  }
  ;
  if (element.hasPurposeElement()) {
    composeMarkdownCore("String_Node_Str",element.getPurposeElement(),false);
    composeMarkdownExtras("String_Node_Str",element.getPurposeElement(),false);
  }
  if (element.hasCopyrightElement()) {
    composeMarkdownCore("String_Node_Str",element.getCopyrightElement(),false);
    composeMarkdownExtras("String_Node_Str",element.getCopyrightElement(),false);
  }
  if (element.hasKeyword()) {
    openArray("String_Node_Str");
    for (    Coding e : element.getKeyword())     composeCoding(null,e);
    closeArray();
  }
  ;
  if (element.hasFhirVersionElement()) {
    composeIdCore("String_Node_Str",element.getFhirVersionElement(),false);
    composeIdExtras("String_Node_Str",element.getFhirVersionElement(),false);
  }
  if (element.hasMapping()) {
    openArray("String_Node_Str");
    for (    StructureDefinition.StructureDefinitionMappingComponent e : element.getMapping())     composeStructureDefinitionStructureDefinitionMappingComponent(null,e);
    closeArray();
  }
  ;
  if (element.hasKindElement()) {
    composeEnumerationCore("String_Node_Str",element.getKindElement(),new StructureDefinition.StructureDefinitionKindEnumFactory(),false);
    composeEnumerationExtras("String_Node_Str",element.getKindElement(),new StructureDefinition.StructureDefinitionKindEnumFactory(),false);
  }
  if (element.hasAbstractElement()) {
    composeBooleanCore("String_Node_Str",element.getAbstractElement(),false);
    composeBooleanExtras("String_Node_Str",element.getAbstractElement(),false);
  }
  if (element.hasContext()) {
    openArray("String_Node_Str");
    for (    StructureDefinition.StructureDefinitionContextComponent e : element.getContext())     composeStructureDefinitionStructureDefinitionContextComponent(null,e);
    closeArray();
  }
  ;
  if (element.hasContextInvariant()) {
    openArray("String_Node_Str");
    for (    StringType e : element.getContextInvariant())     composeStringCore(null,e,true);
    closeArray();
    if (anyHasExtras(element.getContextInvariant())) {
      openArray("String_Node_Str");
      for (      StringType e : element.getContextInvariant())       composeStringExtras(null,e,true);
      closeArray();
    }
  }
  ;
  if (element.hasTypeElement()) {
    composeCodeCore("String_Node_Str",element.getTypeElement(),false);
    composeCodeExtras("String_Node_Str",element.getTypeElement(),false);
  }
  if (element.hasBaseDefinitionElement()) {
    composeCanonicalCore("String_Node_Str",element.getBaseDefinitionElement(),false);
    composeCanonicalExtras("String_Node_Str",element.getBaseDefinitionElement(),false);
  }
  if (element.hasDerivationElement()) {
    composeEnumerationCore("String_Node_Str",element.getDerivationElement(),new StructureDefinition.TypeDerivationRuleEnumFactory(),false);
    composeEnumerationExtras("String_Node_Str",element.getDerivationElement(),new StructureDefinition.TypeDerivationRuleEnumFactory(),false);
  }
  if (element.hasSnapshot()) {
    composeStructureDefinitionStructureDefinitionSnapshotComponent("String_Node_Str",element.getSnapshot());
  }
  if (element.hasDifferential()) {
    composeStructureDefinitionStructureDefinitionDifferentialComponent("String_Node_Str",element.getDifferential());
  }
}

Fixed version (ground truth):
protected void composeStructureDefinitionInner(StructureDefinition element) throws IOException {
  composeDomainResourceElements(element);
  if (element.hasUrlElement()) {
    composeUriCore("String_Node_Str",element.getUrlElement(),false);
    composeUriExtras("String_Node_Str",element.getUrlElement(),false);
  }
  if (element.hasIdentifier()) {
    openArray("String_Node_Str");
    for (    Identifier e : element.getIdentifier())     composeIdentifier(null,e);
    closeArray();
  }
  ;
  if (element.hasVersionElement()) {
    composeStringCore("String_Node_Str",element.getVersionElement(),false);
    composeStringExtras("String_Node_Str",element.getVersionElement(),false);
  }
  if (element.hasNameElement()) {
    composeStringCore("String_Node_Str",element.getNameElement(),false);
    composeStringExtras("String_Node_Str",element.getNameElement(),false);
  }
  if (element.hasTitleElement()) {
    composeStringCore("String_Node_Str",element.getTitleElement(),false);
    composeStringExtras("String_Node_Str",element.getTitleElement(),false);
  }
  if (element.hasStatusElement()) {
    composeEnumerationCore("String_Node_Str",element.getStatusElement(),new Enumerations.PublicationStatusEnumFactory(),false);
    composeEnumerationExtras("String_Node_Str",element.getStatusElement(),new Enumerations.PublicationStatusEnumFactory(),false);
  }
  if (element.hasExperimentalElement()) {
    composeBooleanCore("String_Node_Str",element.getExperimentalElement(),false);
    composeBooleanExtras("String_Node_Str",element.getExperimentalElement(),false);
  }
  if (element.hasDateElement()) {
    composeDateTimeCore("String_Node_Str",element.getDateElement(),false);
    composeDateTimeExtras("String_Node_Str",element.getDateElement(),false);
  }
  if (element.hasPublisherElement()) {
    composeStringCore("String_Node_Str",element.getPublisherElement(),false);
    composeStringExtras("String_Node_Str",element.getPublisherElement(),false);
  }
  if (element.hasContact()) {
    openArray("String_Node_Str");
    for (    ContactDetail e : element.getContact())     composeContactDetail(null,e);
    closeArray();
  }
  ;
  if (element.hasDescriptionElement()) {
    composeMarkdownCore("String_Node_Str",element.getDescriptionElement(),false);
    composeMarkdownExtras("String_Node_Str",element.getDescriptionElement(),false);
  }
  if (element.hasUseContext()) {
    openArray("String_Node_Str");
    for (    UsageContext e : element.getUseContext())     composeUsageContext(null,e);
    closeArray();
  }
  ;
  if (element.hasJurisdiction()) {
    openArray("String_Node_Str");
    for (    CodeableConcept e : element.getJurisdiction())     composeCodeableConcept(null,e);
    closeArray();
  }
  ;
  if (element.hasPurposeElement()) {
    composeMarkdownCore("String_Node_Str",element.getPurposeElement(),false);
    composeMarkdownExtras("String_Node_Str",element.getPurposeElement(),false);
  }
  if (element.hasCopyrightElement()) {
    composeMarkdownCore("String_Node_Str",element.getCopyrightElement(),false);
    composeMarkdownExtras("String_Node_Str",element.getCopyrightElement(),false);
  }
  if (element.hasKeyword()) {
    openArray("String_Node_Str");
    for (    Coding e : element.getKeyword())     composeCoding(null,e);
    closeArray();
  }
  ;
  if (element.hasFhirVersionElement()) {
    composeIdCore("String_Node_Str",element.getFhirVersionElement(),false);
    composeIdExtras("String_Node_Str",element.getFhirVersionElement(),false);
  }
  if (element.hasMapping()) {
    openArray("String_Node_Str");
    for (    StructureDefinition.StructureDefinitionMappingComponent e : element.getMapping())     composeStructureDefinitionStructureDefinitionMappingComponent(null,e);
    closeArray();
  }
  ;
  if (element.hasKindElement()) {
    composeEnumerationCore("String_Node_Str",element.getKindElement(),new StructureDefinition.StructureDefinitionKindEnumFactory(),false);
    composeEnumerationExtras("String_Node_Str",element.getKindElement(),new StructureDefinition.StructureDefinitionKindEnumFactory(),false);
  }
  if (element.hasAbstractElement()) {
    composeBooleanCore("String_Node_Str",element.getAbstractElement(),false);
    composeBooleanExtras("String_Node_Str",element.getAbstractElement(),false);
  }
  if (element.hasContext()) {
    openArray("String_Node_Str");
    for (    StructureDefinition.StructureDefinitionContextComponent e : element.getContext())     composeStructureDefinitionStructureDefinitionContextComponent(null,e);
    closeArray();
  }
  ;
  if (element.hasContextInvariant()) {
    openArray("String_Node_Str");
    for (    StringType e : element.getContextInvariant())     composeStringCore(null,e,true);
    closeArray();
    if (anyHasExtras(element.getContextInvariant())) {
      openArray("String_Node_Str");
      for (      StringType e : element.getContextInvariant())       composeStringExtras(null,e,true);
      closeArray();
    }
  }
  ;
  if (element.hasTypeElement()) {
    composeUriCore("String_Node_Str",element.getTypeElement(),false);
    composeUriExtras("String_Node_Str",element.getTypeElement(),false);
  }
  if (element.hasBaseDefinitionElement()) {
    composeCanonicalCore("String_Node_Str",element.getBaseDefinitionElement(),false);
    composeCanonicalExtras("String_Node_Str",element.getBaseDefinitionElement(),false);
  }
  if (element.hasDerivationElement()) {
    composeEnumerationCore("String_Node_Str",element.getDerivationElement(),new StructureDefinition.TypeDerivationRuleEnumFactory(),false);
    composeEnumerationExtras("String_Node_Str",element.getDerivationElement(),new StructureDefinition.TypeDerivationRuleEnumFactory(),false);
  }
  if (element.hasSnapshot()) {
    composeStructureDefinitionStructureDefinitionSnapshotComponent("String_Node_Str",element.getSnapshot());
  }
  if (element.hasDifferential()) {
    composeStructureDefinitionStructureDefinitionDifferentialComponent("String_Node_Str",element.getDifferential());
  }
}