Program: 24131
Project: 24131
Buggy source:
protected void composeNamedReference(String name,Resource resource) throws Exception {
  if (resource instanceof AdverseReaction)   composeAdverseReaction(name,(AdverseReaction)resource);
 else   if (resource instanceof AdverseReactionRisk)   composeAdverseReactionRisk(name,(AdverseReactionRisk)resource);
 else   if (resource instanceof Alert)   composeAlert(name,(Alert)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 Availability)   composeAvailability(name,(Availability)resource);
 else   if (resource instanceof Basic)   composeBasic(name,(Basic)resource);
 else   if (resource instanceof CarePlan)   composeCarePlan(name,(CarePlan)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 Contract)   composeContract(name,(Contract)resource);
 else   if (resource instanceof Contraindication)   composeContraindication(name,(Contraindication)resource);
 else   if (resource instanceof DataElement)   composeDataElement(name,(DataElement)resource);
 else   if (resource instanceof Device)   composeDevice(name,(Device)resource);
 else   if (resource instanceof DeviceObservationReport)   composeDeviceObservationReport(name,(DeviceObservationReport)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 Encounter)   composeEncounter(name,(Encounter)resource);
 else   if (resource instanceof FamilyHistory)   composeFamilyHistory(name,(FamilyHistory)resource);
 else   if (resource instanceof Group)   composeGroup(name,(Group)resource);
 else   if (resource instanceof HealthcareService)   composeHealthcareService(name,(HealthcareService)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 List_)   composeList_(name,(List_)resource);
 else   if (resource instanceof Location)   composeLocation(name,(Location)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 MedicationPrescription)   composeMedicationPrescription(name,(MedicationPrescription)resource);
 else   if (resource instanceof MedicationStatement)   composeMedicationStatement(name,(MedicationStatement)resource);
 else   if (resource instanceof MessageHeader)   composeMessageHeader(name,(MessageHeader)resource);
 else   if (resource instanceof Namespace)   composeNamespace(name,(Namespace)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 Organization)   composeOrganization(name,(Organization)resource);
 else   if (resource instanceof Other)   composeOther(name,(Other)resource);
 else   if (resource instanceof Patient)   composePatient(name,(Patient)resource);
 else   if (resource instanceof Practitioner)   composePractitioner(name,(Practitioner)resource);
 else   if (resource instanceof Procedure)   composeProcedure(name,(Procedure)resource);
 else   if (resource instanceof Profile)   composeProfile(name,(Profile)resource);
 else   if (resource instanceof Provenance)   composeProvenance(name,(Provenance)resource);
 else   if (resource instanceof Query)   composeQuery(name,(Query)resource);
 else   if (resource instanceof Questionnaire)   composeQuestionnaire(name,(Questionnaire)resource);
 else   if (resource instanceof QuestionnaireAnswers)   composeQuestionnaireAnswers(name,(QuestionnaireAnswers)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 SecurityEvent)   composeSecurityEvent(name,(SecurityEvent)resource);
 else   if (resource instanceof Slot)   composeSlot(name,(Slot)resource);
 else   if (resource instanceof Specimen)   composeSpecimen(name,(Specimen)resource);
 else   if (resource instanceof Subscription)   composeSubscription(name,(Subscription)resource);
 else   if (resource instanceof Substance)   composeSubstance(name,(Substance)resource);
 else   if (resource instanceof Supply)   composeSupply(name,(Supply)resource);
 else   if (resource instanceof ValueSet)   composeValueSet(name,(ValueSet)resource);
 else   if (resource instanceof Binary)   composeBinary(name,(Binary)resource);
 else   throw new Exception("String_Node_Str" + resource.getClass().getName());
}

Fixed version (ground truth):
protected void composeNamedReference(String name,Resource resource) throws Exception {
  if (resource instanceof AdverseReaction)   composeAdverseReaction(name,(AdverseReaction)resource);
 else   if (resource instanceof AdverseReactionRisk)   composeAdverseReactionRisk(name,(AdverseReactionRisk)resource);
 else   if (resource instanceof Alert)   composeAlert(name,(Alert)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 Availability)   composeAvailability(name,(Availability)resource);
 else   if (resource instanceof Basic)   composeBasic(name,(Basic)resource);
 else   if (resource instanceof CarePlan)   composeCarePlan(name,(CarePlan)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 Contract)   composeContract(name,(Contract)resource);
 else   if (resource instanceof Contraindication)   composeContraindication(name,(Contraindication)resource);
 else   if (resource instanceof Coverage)   composeCoverage(name,(Coverage)resource);
 else   if (resource instanceof DataElement)   composeDataElement(name,(DataElement)resource);
 else   if (resource instanceof Device)   composeDevice(name,(Device)resource);
 else   if (resource instanceof DeviceObservationReport)   composeDeviceObservationReport(name,(DeviceObservationReport)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 Encounter)   composeEncounter(name,(Encounter)resource);
 else   if (resource instanceof FamilyHistory)   composeFamilyHistory(name,(FamilyHistory)resource);
 else   if (resource instanceof Group)   composeGroup(name,(Group)resource);
 else   if (resource instanceof HealthcareService)   composeHealthcareService(name,(HealthcareService)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 List_)   composeList_(name,(List_)resource);
 else   if (resource instanceof Location)   composeLocation(name,(Location)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 MedicationPrescription)   composeMedicationPrescription(name,(MedicationPrescription)resource);
 else   if (resource instanceof MedicationStatement)   composeMedicationStatement(name,(MedicationStatement)resource);
 else   if (resource instanceof MessageHeader)   composeMessageHeader(name,(MessageHeader)resource);
 else   if (resource instanceof Namespace)   composeNamespace(name,(Namespace)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 OralHealthClaim)   composeOralHealthClaim(name,(OralHealthClaim)resource);
 else   if (resource instanceof Order)   composeOrder(name,(Order)resource);
 else   if (resource instanceof OrderResponse)   composeOrderResponse(name,(OrderResponse)resource);
 else   if (resource instanceof Organization)   composeOrganization(name,(Organization)resource);
 else   if (resource instanceof Other)   composeOther(name,(Other)resource);
 else   if (resource instanceof Patient)   composePatient(name,(Patient)resource);
 else   if (resource instanceof Practitioner)   composePractitioner(name,(Practitioner)resource);
 else   if (resource instanceof Procedure)   composeProcedure(name,(Procedure)resource);
 else   if (resource instanceof Profile)   composeProfile(name,(Profile)resource);
 else   if (resource instanceof Provenance)   composeProvenance(name,(Provenance)resource);
 else   if (resource instanceof Query)   composeQuery(name,(Query)resource);
 else   if (resource instanceof Questionnaire)   composeQuestionnaire(name,(Questionnaire)resource);
 else   if (resource instanceof QuestionnaireAnswers)   composeQuestionnaireAnswers(name,(QuestionnaireAnswers)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 SecurityEvent)   composeSecurityEvent(name,(SecurityEvent)resource);
 else   if (resource instanceof Slot)   composeSlot(name,(Slot)resource);
 else   if (resource instanceof Specimen)   composeSpecimen(name,(Specimen)resource);
 else   if (resource instanceof Subscription)   composeSubscription(name,(Subscription)resource);
 else   if (resource instanceof Substance)   composeSubstance(name,(Substance)resource);
 else   if (resource instanceof Supply)   composeSupply(name,(Supply)resource);
 else   if (resource instanceof ValueSet)   composeValueSet(name,(ValueSet)resource);
 else   if (resource instanceof Binary)   composeBinary(name,(Binary)resource);
 else   throw new Exception("String_Node_Str" + resource.getClass().getName());
}