Program: 24005
Project: 24005
Buggy source:
protected void composeNamedReference(String name,Resource resource) throws IOException {
  if (resource instanceof Parameters)   composeParameters(name,(Parameters)resource);
 else   if (resource instanceof Account)   composeAccount(name,(Account)resource);
 else   if (resource instanceof AllergyIntolerance)   composeAllergyIntolerance(name,(AllergyIntolerance)resource);
 else   if (resource instanceof Appointment)   composeAppointment(name,(Appointment)resource);
 else   if (resource instanceof AppointmentResponse)   composeAppointmentResponse(name,(AppointmentResponse)resource);
 else   if (resource instanceof AuditEvent)   composeAuditEvent(name,(AuditEvent)resource);
 else   if (resource instanceof Basic)   composeBasic(name,(Basic)resource);
 else   if (resource instanceof Binary)   composeBinary(name,(Binary)resource);
 else   if (resource instanceof BodySite)   composeBodySite(name,(BodySite)resource);
 else   if (resource instanceof Bundle)   composeBundle(name,(Bundle)resource);
 else   if (resource instanceof CarePlan)   composeCarePlan(name,(CarePlan)resource);
 else   if (resource instanceof CareTeam)   composeCareTeam(name,(CareTeam)resource);
 else   if (resource instanceof Claim)   composeClaim(name,(Claim)resource);
 else   if (resource instanceof ClaimResponse)   composeClaimResponse(name,(ClaimResponse)resource);
 else   if (resource instanceof ClinicalImpression)   composeClinicalImpression(name,(ClinicalImpression)resource);
 else   if (resource instanceof CodeSystem)   composeCodeSystem(name,(CodeSystem)resource);
 else   if (resource instanceof Communication)   composeCommunication(name,(Communication)resource);
 else   if (resource instanceof CommunicationRequest)   composeCommunicationRequest(name,(CommunicationRequest)resource);
 else   if (resource instanceof CompartmentDefinition)   composeCompartmentDefinition(name,(CompartmentDefinition)resource);
 else   if (resource instanceof Composition)   composeComposition(name,(Composition)resource);
 else   if (resource instanceof ConceptMap)   composeConceptMap(name,(ConceptMap)resource);
 else   if (resource instanceof Condition)   composeCondition(name,(Condition)resource);
 else   if (resource instanceof Conformance)   composeConformance(name,(Conformance)resource);
 else   if (resource instanceof Consent)   composeConsent(name,(Consent)resource);
 else   if (resource instanceof Contract)   composeContract(name,(Contract)resource);
 else   if (resource instanceof Coverage)   composeCoverage(name,(Coverage)resource);
 else   if (resource instanceof DataElement)   composeDataElement(name,(DataElement)resource);
 else   if (resource instanceof DecisionSupportRule)   composeDecisionSupportRule(name,(DecisionSupportRule)resource);
 else   if (resource instanceof DecisionSupportServiceModule)   composeDecisionSupportServiceModule(name,(DecisionSupportServiceModule)resource);
 else   if (resource instanceof DetectedIssue)   composeDetectedIssue(name,(DetectedIssue)resource);
 else   if (resource instanceof Device)   composeDevice(name,(Device)resource);
 else   if (resource instanceof DeviceComponent)   composeDeviceComponent(name,(DeviceComponent)resource);
 else   if (resource instanceof DeviceMetric)   composeDeviceMetric(name,(DeviceMetric)resource);
 else   if (resource instanceof DeviceUseRequest)   composeDeviceUseRequest(name,(DeviceUseRequest)resource);
 else   if (resource instanceof DeviceUseStatement)   composeDeviceUseStatement(name,(DeviceUseStatement)resource);
 else   if (resource instanceof DiagnosticOrder)   composeDiagnosticOrder(name,(DiagnosticOrder)resource);
 else   if (resource instanceof DiagnosticReport)   composeDiagnosticReport(name,(DiagnosticReport)resource);
 else   if (resource instanceof DocumentManifest)   composeDocumentManifest(name,(DocumentManifest)resource);
 else   if (resource instanceof DocumentReference)   composeDocumentReference(name,(DocumentReference)resource);
 else   if (resource instanceof EligibilityRequest)   composeEligibilityRequest(name,(EligibilityRequest)resource);
 else   if (resource instanceof EligibilityResponse)   composeEligibilityResponse(name,(EligibilityResponse)resource);
 else   if (resource instanceof Encounter)   composeEncounter(name,(Encounter)resource);
 else   if (resource instanceof Endpoint)   composeEndpoint(name,(Endpoint)resource);
 else   if (resource instanceof EnrollmentRequest)   composeEnrollmentRequest(name,(EnrollmentRequest)resource);
 else   if (resource instanceof EnrollmentResponse)   composeEnrollmentResponse(name,(EnrollmentResponse)resource);
 else   if (resource instanceof EpisodeOfCare)   composeEpisodeOfCare(name,(EpisodeOfCare)resource);
 else   if (resource instanceof ExpansionProfile)   composeExpansionProfile(name,(ExpansionProfile)resource);
 else   if (resource instanceof ExplanationOfBenefit)   composeExplanationOfBenefit(name,(ExplanationOfBenefit)resource);
 else   if (resource instanceof FamilyMemberHistory)   composeFamilyMemberHistory(name,(FamilyMemberHistory)resource);
 else   if (resource instanceof Flag)   composeFlag(name,(Flag)resource);
 else   if (resource instanceof Goal)   composeGoal(name,(Goal)resource);
 else   if (resource instanceof Group)   composeGroup(name,(Group)resource);
 else   if (resource instanceof GuidanceResponse)   composeGuidanceResponse(name,(GuidanceResponse)resource);
 else   if (resource instanceof HealthcareService)   composeHealthcareService(name,(HealthcareService)resource);
 else   if (resource instanceof ImagingManifest)   composeImagingManifest(name,(ImagingManifest)resource);
 else   if (resource instanceof ImagingStudy)   composeImagingStudy(name,(ImagingStudy)resource);
 else   if (resource instanceof Immunization)   composeImmunization(name,(Immunization)resource);
 else   if (resource instanceof ImmunizationRecommendation)   composeImmunizationRecommendation(name,(ImmunizationRecommendation)resource);
 else   if (resource instanceof ImplementationGuide)   composeImplementationGuide(name,(ImplementationGuide)resource);
 else   if (resource instanceof Library)   composeLibrary(name,(Library)resource);
 else   if (resource instanceof Linkage)   composeLinkage(name,(Linkage)resource);
 else   if (resource instanceof ListResource)   composeListResource(name,(ListResource)resource);
 else   if (resource instanceof Location)   composeLocation(name,(Location)resource);
 else   if (resource instanceof Measure)   composeMeasure(name,(Measure)resource);
 else   if (resource instanceof MeasureReport)   composeMeasureReport(name,(MeasureReport)resource);
 else   if (resource instanceof Media)   composeMedia(name,(Media)resource);
 else   if (resource instanceof Medication)   composeMedication(name,(Medication)resource);
 else   if (resource instanceof MedicationAdministration)   composeMedicationAdministration(name,(MedicationAdministration)resource);
 else   if (resource instanceof MedicationDispense)   composeMedicationDispense(name,(MedicationDispense)resource);
 else   if (resource instanceof MedicationOrder)   composeMedicationOrder(name,(MedicationOrder)resource);
 else   if (resource instanceof MedicationStatement)   composeMedicationStatement(name,(MedicationStatement)resource);
 else   if (resource instanceof MessageHeader)   composeMessageHeader(name,(MessageHeader)resource);
 else   if (resource instanceof ModuleDefinition)   composeModuleDefinition(name,(ModuleDefinition)resource);
 else   if (resource instanceof NamingSystem)   composeNamingSystem(name,(NamingSystem)resource);
 else   if (resource instanceof NutritionOrder)   composeNutritionOrder(name,(NutritionOrder)resource);
 else   if (resource instanceof Observation)   composeObservation(name,(Observation)resource);
 else   if (resource instanceof OperationDefinition)   composeOperationDefinition(name,(OperationDefinition)resource);
 else   if (resource instanceof OperationOutcome)   composeOperationOutcome(name,(OperationOutcome)resource);
 else   if (resource instanceof Order)   composeOrder(name,(Order)resource);
 else   if (resource instanceof OrderResponse)   composeOrderResponse(name,(OrderResponse)resource);
 else   if (resource instanceof OrderSet)   composeOrderSet(name,(OrderSet)resource);
 else   if (resource instanceof Organization)   composeOrganization(name,(Organization)resource);
 else   if (resource instanceof Patient)   composePatient(name,(Patient)resource);
 else   if (resource instanceof PaymentNotice)   composePaymentNotice(name,(PaymentNotice)resource);
 else   if (resource instanceof PaymentReconciliation)   composePaymentReconciliation(name,(PaymentReconciliation)resource);
 else   if (resource instanceof Person)   composePerson(name,(Person)resource);
 else   if (resource instanceof Practitioner)   composePractitioner(name,(Practitioner)resource);
 else   if (resource instanceof PractitionerRole)   composePractitionerRole(name,(PractitionerRole)resource);
 else   if (resource instanceof Procedure)   composeProcedure(name,(Procedure)resource);
 else   if (resource instanceof ProcedureRequest)   composeProcedureRequest(name,(ProcedureRequest)resource);
 else   if (resource instanceof ProcessRequest)   composeProcessRequest(name,(ProcessRequest)resource);
 else   if (resource instanceof ProcessResponse)   composeProcessResponse(name,(ProcessResponse)resource);
 else   if (resource instanceof Protocol)   composeProtocol(name,(Protocol)resource);
 else   if (resource instanceof Provenance)   composeProvenance(name,(Provenance)resource);
 else   if (resource instanceof Questionnaire)   composeQuestionnaire(name,(Questionnaire)resource);
 else   if (resource instanceof QuestionnaireResponse)   composeQuestionnaireResponse(name,(QuestionnaireResponse)resource);
 else   if (resource instanceof ReferralRequest)   composeReferralRequest(name,(ReferralRequest)resource);
 else   if (resource instanceof RelatedPerson)   composeRelatedPerson(name,(RelatedPerson)resource);
 else   if (resource instanceof RiskAssessment)   composeRiskAssessment(name,(RiskAssessment)resource);
 else   if (resource instanceof Schedule)   composeSchedule(name,(Schedule)resource);
 else   if (resource instanceof SearchParameter)   composeSearchParameter(name,(SearchParameter)resource);
 else   if (resource instanceof Sequence)   composeSequence(name,(Sequence)resource);
 else   if (resource instanceof Slot)   composeSlot(name,(Slot)resource);
 else   if (resource instanceof Specimen)   composeSpecimen(name,(Specimen)resource);
 else   if (resource instanceof StructureDefinition)   composeStructureDefinition(name,(StructureDefinition)resource);
 else   if (resource instanceof StructureMap)   composeStructureMap(name,(StructureMap)resource);
 else   if (resource instanceof Subscription)   composeSubscription(name,(Subscription)resource);
 else   if (resource instanceof Substance)   composeSubstance(name,(Substance)resource);
 else   if (resource instanceof SupplyDelivery)   composeSupplyDelivery(name,(SupplyDelivery)resource);
 else   if (resource instanceof SupplyRequest)   composeSupplyRequest(name,(SupplyRequest)resource);
 else   if (resource instanceof Task)   composeTask(name,(Task)resource);
 else   if (resource instanceof TestScript)   composeTestScript(name,(TestScript)resource);
 else   if (resource instanceof ValueSet)   composeValueSet(name,(ValueSet)resource);
 else   if (resource instanceof VisionPrescription)   composeVisionPrescription(name,(VisionPrescription)resource);
 else   if (resource instanceof Binary)   composeBinary(name,(Binary)resource);
 else   throw new Error("String_Node_Str" + resource.getClass().getName());
}

Fixed version (ground truth):
protected void composeNamedReference(String name,Resource resource) throws IOException {
  if (resource instanceof Parameters)   composeParameters(name,(Parameters)resource);
 else   if (resource instanceof Account)   composeAccount(name,(Account)resource);
 else   if (resource instanceof ActivityDefinition)   composeActivityDefinition(name,(ActivityDefinition)resource);
 else   if (resource instanceof AllergyIntolerance)   composeAllergyIntolerance(name,(AllergyIntolerance)resource);
 else   if (resource instanceof Appointment)   composeAppointment(name,(Appointment)resource);
 else   if (resource instanceof AppointmentResponse)   composeAppointmentResponse(name,(AppointmentResponse)resource);
 else   if (resource instanceof AuditEvent)   composeAuditEvent(name,(AuditEvent)resource);
 else   if (resource instanceof Basic)   composeBasic(name,(Basic)resource);
 else   if (resource instanceof Binary)   composeBinary(name,(Binary)resource);
 else   if (resource instanceof BodySite)   composeBodySite(name,(BodySite)resource);
 else   if (resource instanceof Bundle)   composeBundle(name,(Bundle)resource);
 else   if (resource instanceof CarePlan)   composeCarePlan(name,(CarePlan)resource);
 else   if (resource instanceof CareTeam)   composeCareTeam(name,(CareTeam)resource);
 else   if (resource instanceof Claim)   composeClaim(name,(Claim)resource);
 else   if (resource instanceof ClaimResponse)   composeClaimResponse(name,(ClaimResponse)resource);
 else   if (resource instanceof ClinicalImpression)   composeClinicalImpression(name,(ClinicalImpression)resource);
 else   if (resource instanceof CodeSystem)   composeCodeSystem(name,(CodeSystem)resource);
 else   if (resource instanceof Communication)   composeCommunication(name,(Communication)resource);
 else   if (resource instanceof CommunicationRequest)   composeCommunicationRequest(name,(CommunicationRequest)resource);
 else   if (resource instanceof CompartmentDefinition)   composeCompartmentDefinition(name,(CompartmentDefinition)resource);
 else   if (resource instanceof Composition)   composeComposition(name,(Composition)resource);
 else   if (resource instanceof ConceptMap)   composeConceptMap(name,(ConceptMap)resource);
 else   if (resource instanceof Condition)   composeCondition(name,(Condition)resource);
 else   if (resource instanceof Conformance)   composeConformance(name,(Conformance)resource);
 else   if (resource instanceof Consent)   composeConsent(name,(Consent)resource);
 else   if (resource instanceof Contract)   composeContract(name,(Contract)resource);
 else   if (resource instanceof Coverage)   composeCoverage(name,(Coverage)resource);
 else   if (resource instanceof DataElement)   composeDataElement(name,(DataElement)resource);
 else   if (resource instanceof DecisionSupportRule)   composeDecisionSupportRule(name,(DecisionSupportRule)resource);
 else   if (resource instanceof DecisionSupportServiceModule)   composeDecisionSupportServiceModule(name,(DecisionSupportServiceModule)resource);
 else   if (resource instanceof DetectedIssue)   composeDetectedIssue(name,(DetectedIssue)resource);
 else   if (resource instanceof Device)   composeDevice(name,(Device)resource);
 else   if (resource instanceof DeviceComponent)   composeDeviceComponent(name,(DeviceComponent)resource);
 else   if (resource instanceof DeviceMetric)   composeDeviceMetric(name,(DeviceMetric)resource);
 else   if (resource instanceof DeviceUseRequest)   composeDeviceUseRequest(name,(DeviceUseRequest)resource);
 else   if (resource instanceof DeviceUseStatement)   composeDeviceUseStatement(name,(DeviceUseStatement)resource);
 else   if (resource instanceof DiagnosticOrder)   composeDiagnosticOrder(name,(DiagnosticOrder)resource);
 else   if (resource instanceof DiagnosticReport)   composeDiagnosticReport(name,(DiagnosticReport)resource);
 else   if (resource instanceof DocumentManifest)   composeDocumentManifest(name,(DocumentManifest)resource);
 else   if (resource instanceof DocumentReference)   composeDocumentReference(name,(DocumentReference)resource);
 else   if (resource instanceof EligibilityRequest)   composeEligibilityRequest(name,(EligibilityRequest)resource);
 else   if (resource instanceof EligibilityResponse)   composeEligibilityResponse(name,(EligibilityResponse)resource);
 else   if (resource instanceof Encounter)   composeEncounter(name,(Encounter)resource);
 else   if (resource instanceof Endpoint)   composeEndpoint(name,(Endpoint)resource);
 else   if (resource instanceof EnrollmentRequest)   composeEnrollmentRequest(name,(EnrollmentRequest)resource);
 else   if (resource instanceof EnrollmentResponse)   composeEnrollmentResponse(name,(EnrollmentResponse)resource);
 else   if (resource instanceof EpisodeOfCare)   composeEpisodeOfCare(name,(EpisodeOfCare)resource);
 else   if (resource instanceof ExpansionProfile)   composeExpansionProfile(name,(ExpansionProfile)resource);
 else   if (resource instanceof ExplanationOfBenefit)   composeExplanationOfBenefit(name,(ExplanationOfBenefit)resource);
 else   if (resource instanceof FamilyMemberHistory)   composeFamilyMemberHistory(name,(FamilyMemberHistory)resource);
 else   if (resource instanceof Flag)   composeFlag(name,(Flag)resource);
 else   if (resource instanceof Goal)   composeGoal(name,(Goal)resource);
 else   if (resource instanceof Group)   composeGroup(name,(Group)resource);
 else   if (resource instanceof GuidanceResponse)   composeGuidanceResponse(name,(GuidanceResponse)resource);
 else   if (resource instanceof HealthcareService)   composeHealthcareService(name,(HealthcareService)resource);
 else   if (resource instanceof ImagingManifest)   composeImagingManifest(name,(ImagingManifest)resource);
 else   if (resource instanceof ImagingStudy)   composeImagingStudy(name,(ImagingStudy)resource);
 else   if (resource instanceof Immunization)   composeImmunization(name,(Immunization)resource);
 else   if (resource instanceof ImmunizationRecommendation)   composeImmunizationRecommendation(name,(ImmunizationRecommendation)resource);
 else   if (resource instanceof ImplementationGuide)   composeImplementationGuide(name,(ImplementationGuide)resource);
 else   if (resource instanceof Library)   composeLibrary(name,(Library)resource);
 else   if (resource instanceof Linkage)   composeLinkage(name,(Linkage)resource);
 else   if (resource instanceof ListResource)   composeListResource(name,(ListResource)resource);
 else   if (resource instanceof Location)   composeLocation(name,(Location)resource);
 else   if (resource instanceof Measure)   composeMeasure(name,(Measure)resource);
 else   if (resource instanceof MeasureReport)   composeMeasureReport(name,(MeasureReport)resource);
 else   if (resource instanceof Media)   composeMedia(name,(Media)resource);
 else   if (resource instanceof Medication)   composeMedication(name,(Medication)resource);
 else   if (resource instanceof MedicationAdministration)   composeMedicationAdministration(name,(MedicationAdministration)resource);
 else   if (resource instanceof MedicationDispense)   composeMedicationDispense(name,(MedicationDispense)resource);
 else   if (resource instanceof MedicationOrder)   composeMedicationOrder(name,(MedicationOrder)resource);
 else   if (resource instanceof MedicationStatement)   composeMedicationStatement(name,(MedicationStatement)resource);
 else   if (resource instanceof MessageHeader)   composeMessageHeader(name,(MessageHeader)resource);
 else   if (resource instanceof ModuleDefinition)   composeModuleDefinition(name,(ModuleDefinition)resource);
 else   if (resource instanceof NamingSystem)   composeNamingSystem(name,(NamingSystem)resource);
 else   if (resource instanceof NutritionOrder)   composeNutritionOrder(name,(NutritionOrder)resource);
 else   if (resource instanceof Observation)   composeObservation(name,(Observation)resource);
 else   if (resource instanceof OperationDefinition)   composeOperationDefinition(name,(OperationDefinition)resource);
 else   if (resource instanceof OperationOutcome)   composeOperationOutcome(name,(OperationOutcome)resource);
 else   if (resource instanceof Order)   composeOrder(name,(Order)resource);
 else   if (resource instanceof OrderResponse)   composeOrderResponse(name,(OrderResponse)resource);
 else   if (resource instanceof OrderSet)   composeOrderSet(name,(OrderSet)resource);
 else   if (resource instanceof Organization)   composeOrganization(name,(Organization)resource);
 else   if (resource instanceof Patient)   composePatient(name,(Patient)resource);
 else   if (resource instanceof PaymentNotice)   composePaymentNotice(name,(PaymentNotice)resource);
 else   if (resource instanceof PaymentReconciliation)   composePaymentReconciliation(name,(PaymentReconciliation)resource);
 else   if (resource instanceof Person)   composePerson(name,(Person)resource);
 else   if (resource instanceof Practitioner)   composePractitioner(name,(Practitioner)resource);
 else   if (resource instanceof PractitionerRole)   composePractitionerRole(name,(PractitionerRole)resource);
 else   if (resource instanceof Procedure)   composeProcedure(name,(Procedure)resource);
 else   if (resource instanceof ProcedureRequest)   composeProcedureRequest(name,(ProcedureRequest)resource);
 else   if (resource instanceof ProcessRequest)   composeProcessRequest(name,(ProcessRequest)resource);
 else   if (resource instanceof ProcessResponse)   composeProcessResponse(name,(ProcessResponse)resource);
 else   if (resource instanceof Protocol)   composeProtocol(name,(Protocol)resource);
 else   if (resource instanceof Provenance)   composeProvenance(name,(Provenance)resource);
 else   if (resource instanceof Questionnaire)   composeQuestionnaire(name,(Questionnaire)resource);
 else   if (resource instanceof QuestionnaireResponse)   composeQuestionnaireResponse(name,(QuestionnaireResponse)resource);
 else   if (resource instanceof ReferralRequest)   composeReferralRequest(name,(ReferralRequest)resource);
 else   if (resource instanceof RelatedPerson)   composeRelatedPerson(name,(RelatedPerson)resource);
 else   if (resource instanceof RiskAssessment)   composeRiskAssessment(name,(RiskAssessment)resource);
 else   if (resource instanceof Schedule)   composeSchedule(name,(Schedule)resource);
 else   if (resource instanceof SearchParameter)   composeSearchParameter(name,(SearchParameter)resource);
 else   if (resource instanceof Sequence)   composeSequence(name,(Sequence)resource);
 else   if (resource instanceof Slot)   composeSlot(name,(Slot)resource);
 else   if (resource instanceof Specimen)   composeSpecimen(name,(Specimen)resource);
 else   if (resource instanceof StructureDefinition)   composeStructureDefinition(name,(StructureDefinition)resource);
 else   if (resource instanceof StructureMap)   composeStructureMap(name,(StructureMap)resource);
 else   if (resource instanceof Subscription)   composeSubscription(name,(Subscription)resource);
 else   if (resource instanceof Substance)   composeSubstance(name,(Substance)resource);
 else   if (resource instanceof SupplyDelivery)   composeSupplyDelivery(name,(SupplyDelivery)resource);
 else   if (resource instanceof SupplyRequest)   composeSupplyRequest(name,(SupplyRequest)resource);
 else   if (resource instanceof Task)   composeTask(name,(Task)resource);
 else   if (resource instanceof TestScript)   composeTestScript(name,(TestScript)resource);
 else   if (resource instanceof ValueSet)   composeValueSet(name,(ValueSet)resource);
 else   if (resource instanceof VisionPrescription)   composeVisionPrescription(name,(VisionPrescription)resource);
 else   if (resource instanceof Binary)   composeBinary(name,(Binary)resource);
 else   throw new Error("String_Node_Str" + resource.getClass().getName());
}