Program: 23989
Project: 23989
Buggy source:
protected void composeActivityDefinitionInner(ActivityDefinition element) throws IOException {
  composeDomainResourceElements(element);
  if (element.hasModuleMetadata()) {
    composeModuleMetadata("String_Node_Str",element.getModuleMetadata());
  }
  if (element.hasLibrary()) {
    openArray("String_Node_Str");
    for (    Reference e : element.getLibrary())     composeReference(null,e);
    closeArray();
  }
  ;
  if (element.hasCategoryElement()) {
    composeEnumerationCore("String_Node_Str",element.getCategoryElement(),new ActivityDefinition.ActivityDefinitionCategoryEnumFactory(),false);
    composeEnumerationExtras("String_Node_Str",element.getCategoryElement(),new ActivityDefinition.ActivityDefinitionCategoryEnumFactory(),false);
  }
  if (element.hasCode()) {
    composeCodeableConcept("String_Node_Str",element.getCode());
  }
  if (element.hasTiming()) {
    composeType("String_Node_Str",element.getTiming());
  }
  if (element.hasLocation()) {
    composeReference("String_Node_Str",element.getLocation());
  }
  if (element.hasParticipantType()) {
    openArray("String_Node_Str");
    for (    Enumeration<ActivityDefinition.ActivityParticipantType> e : element.getParticipantType())     composeEnumerationCore(null,e,new ActivityDefinition.ActivityParticipantTypeEnumFactory(),true);
    closeArray();
    if (anyHasExtras(element.getParticipantType())) {
      openArray("String_Node_Str");
      for (      Enumeration<ActivityDefinition.ActivityParticipantType> e : element.getParticipantType())       composeEnumerationExtras(null,e,new ActivityDefinition.ActivityParticipantTypeEnumFactory(),true);
      closeArray();
    }
  }
  ;
  if (element.hasProduct()) {
    composeType("String_Node_Str",element.getProduct());
  }
  if (element.hasQuantity()) {
    composeSimpleQuantity("String_Node_Str",element.getQuantity());
  }
  if (element.hasDescriptionElement()) {
    composeStringCore("String_Node_Str",element.getDescriptionElement(),false);
    composeStringExtras("String_Node_Str",element.getDescriptionElement(),false);
  }
}

Fixed version (ground truth):
protected void composeActivityDefinitionInner(ActivityDefinition 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()) {
    composeCodeCore("String_Node_Str",element.getStatusElement(),false);
    composeCodeExtras("String_Node_Str",element.getStatusElement(),false);
  }
  if (element.hasExperimentalElement()) {
    composeBooleanCore("String_Node_Str",element.getExperimentalElement(),false);
    composeBooleanExtras("String_Node_Str",element.getExperimentalElement(),false);
  }
  if (element.hasDescriptionElement()) {
    composeStringCore("String_Node_Str",element.getDescriptionElement(),false);
    composeStringExtras("String_Node_Str",element.getDescriptionElement(),false);
  }
  if (element.hasPurposeElement()) {
    composeStringCore("String_Node_Str",element.getPurposeElement(),false);
    composeStringExtras("String_Node_Str",element.getPurposeElement(),false);
  }
  if (element.hasUsageElement()) {
    composeStringCore("String_Node_Str",element.getUsageElement(),false);
    composeStringExtras("String_Node_Str",element.getUsageElement(),false);
  }
  if (element.hasPublicationDateElement()) {
    composeDateCore("String_Node_Str",element.getPublicationDateElement(),false);
    composeDateExtras("String_Node_Str",element.getPublicationDateElement(),false);
  }
  if (element.hasLastReviewDateElement()) {
    composeDateCore("String_Node_Str",element.getLastReviewDateElement(),false);
    composeDateExtras("String_Node_Str",element.getLastReviewDateElement(),false);
  }
  if (element.hasEffectivePeriod()) {
    composePeriod("String_Node_Str",element.getEffectivePeriod());
  }
  if (element.hasCoverage()) {
    openArray("String_Node_Str");
    for (    UsageContext e : element.getCoverage())     composeUsageContext(null,e);
    closeArray();
  }
  ;
  if (element.hasTopic()) {
    openArray("String_Node_Str");
    for (    CodeableConcept e : element.getTopic())     composeCodeableConcept(null,e);
    closeArray();
  }
  ;
  if (element.hasContributor()) {
    openArray("String_Node_Str");
    for (    Contributor e : element.getContributor())     composeContributor(null,e);
    closeArray();
  }
  ;
  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.hasCopyrightElement()) {
    composeStringCore("String_Node_Str",element.getCopyrightElement(),false);
    composeStringExtras("String_Node_Str",element.getCopyrightElement(),false);
  }
  if (element.hasRelatedResource()) {
    openArray("String_Node_Str");
    for (    RelatedResource e : element.getRelatedResource())     composeRelatedResource(null,e);
    closeArray();
  }
  ;
  if (element.hasLibrary()) {
    openArray("String_Node_Str");
    for (    Reference e : element.getLibrary())     composeReference(null,e);
    closeArray();
  }
  ;
  if (element.hasCategoryElement()) {
    composeEnumerationCore("String_Node_Str",element.getCategoryElement(),new ActivityDefinition.ActivityDefinitionCategoryEnumFactory(),false);
    composeEnumerationExtras("String_Node_Str",element.getCategoryElement(),new ActivityDefinition.ActivityDefinitionCategoryEnumFactory(),false);
  }
  if (element.hasCode()) {
    composeCodeableConcept("String_Node_Str",element.getCode());
  }
  if (element.hasTiming()) {
    composeType("String_Node_Str",element.getTiming());
  }
  if (element.hasLocation()) {
    composeReference("String_Node_Str",element.getLocation());
  }
  if (element.hasParticipantType()) {
    openArray("String_Node_Str");
    for (    Enumeration<ActivityDefinition.ActivityParticipantType> e : element.getParticipantType())     composeEnumerationCore(null,e,new ActivityDefinition.ActivityParticipantTypeEnumFactory(),true);
    closeArray();
    if (anyHasExtras(element.getParticipantType())) {
      openArray("String_Node_Str");
      for (      Enumeration<ActivityDefinition.ActivityParticipantType> e : element.getParticipantType())       composeEnumerationExtras(null,e,new ActivityDefinition.ActivityParticipantTypeEnumFactory(),true);
      closeArray();
    }
  }
  ;
  if (element.hasProduct()) {
    composeType("String_Node_Str",element.getProduct());
  }
  if (element.hasQuantity()) {
    composeSimpleQuantity("String_Node_Str",element.getQuantity());
  }
}