Program: 23220
Project: 23220
Buggy source:
public org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  if (src instanceof org.hl7.fhir.r4.model.Parameters)   return convertParameters((org.hl7.fhir.r4.model.Parameters)src);
  if (src instanceof org.hl7.fhir.r4.model.Appointment)   return convertAppointment((org.hl7.fhir.r4.model.Appointment)src);
  if (src instanceof org.hl7.fhir.r4.model.AppointmentResponse)   return convertAppointmentResponse((org.hl7.fhir.r4.model.AppointmentResponse)src);
  if (src instanceof org.hl7.fhir.r4.model.AuditEvent)   return convertAuditEvent((org.hl7.fhir.r4.model.AuditEvent)src);
  if (src instanceof org.hl7.fhir.r4.model.Basic)   return convertBasic((org.hl7.fhir.r4.model.Basic)src);
  if (src instanceof org.hl7.fhir.r4.model.Binary)   return convertBinary((org.hl7.fhir.r4.model.Binary)src);
  if (src instanceof org.hl7.fhir.r4.model.Bundle)   return convertBundle((org.hl7.fhir.r4.model.Bundle)src);
  if (src instanceof org.hl7.fhir.r4.model.CarePlan)   return convertCarePlan((org.hl7.fhir.r4.model.CarePlan)src);
  if (src instanceof org.hl7.fhir.r4.model.ClinicalImpression)   return convertClinicalImpression((org.hl7.fhir.r4.model.ClinicalImpression)src);
  if (src instanceof org.hl7.fhir.r4.model.Communication)   return convertCommunication((org.hl7.fhir.r4.model.Communication)src);
  if (src instanceof org.hl7.fhir.r4.model.CommunicationRequest)   return convertCommunicationRequest((org.hl7.fhir.r4.model.CommunicationRequest)src);
  if (src instanceof org.hl7.fhir.r4.model.Composition)   return convertComposition((org.hl7.fhir.r4.model.Composition)src);
  if (src instanceof org.hl7.fhir.r4.model.ConceptMap)   return convertConceptMap((org.hl7.fhir.r4.model.ConceptMap)src);
  if (src instanceof org.hl7.fhir.r4.model.Condition)   return convertCondition((org.hl7.fhir.r4.model.Condition)src);
  if (src instanceof org.hl7.fhir.r4.model.CapabilityStatement)   return convertConformance((org.hl7.fhir.r4.model.CapabilityStatement)src);
  if (src instanceof org.hl7.fhir.r4.model.Contract)   return convertContract((org.hl7.fhir.r4.model.Contract)src);
  if (src instanceof org.hl7.fhir.r4.model.DetectedIssue)   return convertDetectedIssue((org.hl7.fhir.r4.model.DetectedIssue)src);
  if (src instanceof org.hl7.fhir.r4.model.Device)   return convertDevice((org.hl7.fhir.r4.model.Device)src);
  if (src instanceof org.hl7.fhir.r4.model.DeviceComponent)   return convertDeviceComponent((org.hl7.fhir.r4.model.DeviceComponent)src);
  if (src instanceof org.hl7.fhir.r4.model.DeviceMetric)   return convertDeviceMetric((org.hl7.fhir.r4.model.DeviceMetric)src);
  if (src instanceof org.hl7.fhir.r4.model.DeviceUseStatement)   return convertDeviceUseStatement((org.hl7.fhir.r4.model.DeviceUseStatement)src);
  if (src instanceof org.hl7.fhir.r4.model.DiagnosticReport)   return convertDiagnosticReport((org.hl7.fhir.r4.model.DiagnosticReport)src);
  if (src instanceof org.hl7.fhir.r4.model.DocumentManifest)   return convertDocumentManifest((org.hl7.fhir.r4.model.DocumentManifest)src);
  if (src instanceof org.hl7.fhir.r4.model.DocumentReference)   return convertDocumentReference((org.hl7.fhir.r4.model.DocumentReference)src);
  if (src instanceof org.hl7.fhir.r4.model.Encounter)   return convertEncounter((org.hl7.fhir.r4.model.Encounter)src);
  if (src instanceof org.hl7.fhir.r4.model.EnrollmentRequest)   return convertEnrollmentRequest((org.hl7.fhir.r4.model.EnrollmentRequest)src);
  if (src instanceof org.hl7.fhir.r4.model.EnrollmentResponse)   return convertEnrollmentResponse((org.hl7.fhir.r4.model.EnrollmentResponse)src);
  if (src instanceof org.hl7.fhir.r4.model.EpisodeOfCare)   return convertEpisodeOfCare((org.hl7.fhir.r4.model.EpisodeOfCare)src);
  if (src instanceof org.hl7.fhir.r4.model.FamilyMemberHistory)   return convertFamilyMemberHistory((org.hl7.fhir.r4.model.FamilyMemberHistory)src);
  if (src instanceof org.hl7.fhir.r4.model.Flag)   return convertFlag((org.hl7.fhir.r4.model.Flag)src);
  if (src instanceof org.hl7.fhir.r4.model.Group)   return convertGroup((org.hl7.fhir.r4.model.Group)src);
  if (src instanceof org.hl7.fhir.r4.model.HealthcareService)   return convertHealthcareService((org.hl7.fhir.r4.model.HealthcareService)src);
  if (src instanceof org.hl7.fhir.r4.model.ImagingStudy)   return convertImagingStudy((org.hl7.fhir.r4.model.ImagingStudy)src);
  if (src instanceof org.hl7.fhir.r4.model.Immunization)   return convertImmunization((org.hl7.fhir.r4.model.Immunization)src);
  if (src instanceof org.hl7.fhir.r4.model.ImmunizationRecommendation)   return convertImmunizationRecommendation((org.hl7.fhir.r4.model.ImmunizationRecommendation)src);
  if (src instanceof org.hl7.fhir.r4.model.ImplementationGuide)   return convertImplementationGuide((org.hl7.fhir.r4.model.ImplementationGuide)src);
  if (src instanceof org.hl7.fhir.r4.model.ListResource)   return convertList((org.hl7.fhir.r4.model.ListResource)src);
  if (src instanceof org.hl7.fhir.r4.model.Location)   return convertLocation((org.hl7.fhir.r4.model.Location)src);
  if (src instanceof org.hl7.fhir.r4.model.Media)   return convertMedia((org.hl7.fhir.r4.model.Media)src);
  if (src instanceof org.hl7.fhir.r4.model.Medication)   return convertMedication((org.hl7.fhir.r4.model.Medication)src);
  if (src instanceof org.hl7.fhir.r4.model.MedicationDispense)   return convertMedicationDispense((org.hl7.fhir.r4.model.MedicationDispense)src);
  if (src instanceof org.hl7.fhir.r4.model.MedicationStatement)   return convertMedicationStatement((org.hl7.fhir.r4.model.MedicationStatement)src);
  if (src instanceof org.hl7.fhir.r4.model.MessageHeader)   return convertMessageHeader((org.hl7.fhir.r4.model.MessageHeader)src);
  if (src instanceof org.hl7.fhir.r4.model.NamingSystem)   return convertNamingSystem((org.hl7.fhir.r4.model.NamingSystem)src);
  if (src instanceof org.hl7.fhir.r4.model.Observation)   return convertObservation((org.hl7.fhir.r4.model.Observation)src);
  if (src instanceof org.hl7.fhir.r4.model.OperationDefinition)   return convertOperationDefinition((org.hl7.fhir.r4.model.OperationDefinition)src);
  if (src instanceof org.hl7.fhir.r4.model.OperationOutcome)   return convertOperationOutcome((org.hl7.fhir.r4.model.OperationOutcome)src);
  if (src instanceof org.hl7.fhir.r4.model.Organization)   return convertOrganization((org.hl7.fhir.r4.model.Organization)src);
  if (src instanceof org.hl7.fhir.r4.model.Patient)   return convertPatient((org.hl7.fhir.r4.model.Patient)src);
  if (src instanceof org.hl7.fhir.r4.model.Person)   return convertPerson((org.hl7.fhir.r4.model.Person)src);
  if (src instanceof org.hl7.fhir.r4.model.Practitioner)   return convertPractitioner((org.hl7.fhir.r4.model.Practitioner)src);
  if (src instanceof org.hl7.fhir.r4.model.Procedure)   return convertProcedure((org.hl7.fhir.r4.model.Procedure)src);
  if (src instanceof org.hl7.fhir.r4.model.ProcedureRequest)   return convertProcedureRequest((org.hl7.fhir.r4.model.ProcedureRequest)src);
  if (src instanceof org.hl7.fhir.r4.model.Provenance)   return convertProvenance((org.hl7.fhir.r4.model.Provenance)src);
  if (src instanceof org.hl7.fhir.r4.model.Questionnaire)   return convertQuestionnaire((org.hl7.fhir.r4.model.Questionnaire)src);
  if (src instanceof org.hl7.fhir.r4.model.QuestionnaireResponse)   return convertQuestionnaireResponse((org.hl7.fhir.r4.model.QuestionnaireResponse)src);
  if (src instanceof org.hl7.fhir.r4.model.ReferralRequest)   return convertReferralRequest((org.hl7.fhir.r4.model.ReferralRequest)src);
  if (src instanceof org.hl7.fhir.r4.model.RelatedPerson)   return convertRelatedPerson((org.hl7.fhir.r4.model.RelatedPerson)src);
  if (src instanceof org.hl7.fhir.r4.model.RiskAssessment)   return convertRiskAssessment((org.hl7.fhir.r4.model.RiskAssessment)src);
  if (src instanceof org.hl7.fhir.r4.model.Schedule)   return convertSchedule((org.hl7.fhir.r4.model.Schedule)src);
  if (src instanceof org.hl7.fhir.r4.model.SearchParameter)   return convertSearchParameter((org.hl7.fhir.r4.model.SearchParameter)src);
  if (src instanceof org.hl7.fhir.r4.model.Slot)   return convertSlot((org.hl7.fhir.r4.model.Slot)src);
  if (src instanceof org.hl7.fhir.r4.model.StructureDefinition)   return convertStructureDefinition((org.hl7.fhir.r4.model.StructureDefinition)src);
  if (src instanceof org.hl7.fhir.r4.model.Subscription)   return convertSubscription((org.hl7.fhir.r4.model.Subscription)src);
  if (src instanceof org.hl7.fhir.r4.model.Substance)   return convertSubstance((org.hl7.fhir.r4.model.Substance)src);
  if (src instanceof org.hl7.fhir.r4.model.SupplyDelivery)   return convertSupplyDelivery((org.hl7.fhir.r4.model.SupplyDelivery)src);
  if (src instanceof org.hl7.fhir.r4.model.SupplyRequest)   return convertSupplyRequest((org.hl7.fhir.r4.model.SupplyRequest)src);
  if (src instanceof org.hl7.fhir.r4.model.TestScript)   return convertTestScript((org.hl7.fhir.r4.model.TestScript)src);
  if (src instanceof org.hl7.fhir.r4.model.ValueSet)   return convertValueSet((org.hl7.fhir.r4.model.ValueSet)src);
  throw new Error("String_Node_Str" + src.fhirType());
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Resource convertResource(org.hl7.fhir.r4.model.Resource src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  if (src instanceof org.hl7.fhir.r4.model.Parameters)   return convertParameters((org.hl7.fhir.r4.model.Parameters)src);
  if (src instanceof org.hl7.fhir.r4.model.Appointment)   return convertAppointment((org.hl7.fhir.r4.model.Appointment)src);
  if (src instanceof org.hl7.fhir.r4.model.AppointmentResponse)   return convertAppointmentResponse((org.hl7.fhir.r4.model.AppointmentResponse)src);
  if (src instanceof org.hl7.fhir.r4.model.AuditEvent)   return convertAuditEvent((org.hl7.fhir.r4.model.AuditEvent)src);
  if (src instanceof org.hl7.fhir.r4.model.Basic)   return convertBasic((org.hl7.fhir.r4.model.Basic)src);
  if (src instanceof org.hl7.fhir.r4.model.Binary)   return convertBinary((org.hl7.fhir.r4.model.Binary)src);
  if (src instanceof org.hl7.fhir.r4.model.Bundle)   return convertBundle((org.hl7.fhir.r4.model.Bundle)src);
  if (src instanceof org.hl7.fhir.r4.model.CarePlan)   return convertCarePlan((org.hl7.fhir.r4.model.CarePlan)src);
  if (src instanceof org.hl7.fhir.r4.model.ClinicalImpression)   return convertClinicalImpression((org.hl7.fhir.r4.model.ClinicalImpression)src);
  if (src instanceof org.hl7.fhir.r4.model.Communication)   return convertCommunication((org.hl7.fhir.r4.model.Communication)src);
  if (src instanceof org.hl7.fhir.r4.model.CommunicationRequest)   return convertCommunicationRequest((org.hl7.fhir.r4.model.CommunicationRequest)src);
  if (src instanceof org.hl7.fhir.r4.model.Composition)   return convertComposition((org.hl7.fhir.r4.model.Composition)src);
  if (src instanceof org.hl7.fhir.r4.model.ConceptMap)   return convertConceptMap((org.hl7.fhir.r4.model.ConceptMap)src);
  if (src instanceof org.hl7.fhir.r4.model.Condition)   return convertCondition((org.hl7.fhir.r4.model.Condition)src);
  if (src instanceof org.hl7.fhir.r4.model.CapabilityStatement)   return convertConformance((org.hl7.fhir.r4.model.CapabilityStatement)src);
  if (src instanceof org.hl7.fhir.r4.model.Contract)   return convertContract((org.hl7.fhir.r4.model.Contract)src);
  if (src instanceof org.hl7.fhir.r4.model.DetectedIssue)   return convertDetectedIssue((org.hl7.fhir.r4.model.DetectedIssue)src);
  if (src instanceof org.hl7.fhir.r4.model.Device)   return convertDevice((org.hl7.fhir.r4.model.Device)src);
  if (src instanceof org.hl7.fhir.r4.model.DeviceComponent)   return convertDeviceComponent((org.hl7.fhir.r4.model.DeviceComponent)src);
  if (src instanceof org.hl7.fhir.r4.model.DeviceMetric)   return convertDeviceMetric((org.hl7.fhir.r4.model.DeviceMetric)src);
  if (src instanceof org.hl7.fhir.r4.model.DeviceUseStatement)   return convertDeviceUseStatement((org.hl7.fhir.r4.model.DeviceUseStatement)src);
  if (src instanceof org.hl7.fhir.r4.model.DiagnosticReport)   return convertDiagnosticReport((org.hl7.fhir.r4.model.DiagnosticReport)src);
  if (src instanceof org.hl7.fhir.r4.model.DocumentManifest)   return convertDocumentManifest((org.hl7.fhir.r4.model.DocumentManifest)src);
  if (src instanceof org.hl7.fhir.r4.model.DocumentReference)   return convertDocumentReference((org.hl7.fhir.r4.model.DocumentReference)src);
  if (src instanceof org.hl7.fhir.r4.model.Encounter)   return convertEncounter((org.hl7.fhir.r4.model.Encounter)src);
  if (src instanceof org.hl7.fhir.r4.model.EnrollmentRequest)   return convertEnrollmentRequest((org.hl7.fhir.r4.model.EnrollmentRequest)src);
  if (src instanceof org.hl7.fhir.r4.model.EnrollmentResponse)   return convertEnrollmentResponse((org.hl7.fhir.r4.model.EnrollmentResponse)src);
  if (src instanceof org.hl7.fhir.r4.model.EpisodeOfCare)   return convertEpisodeOfCare((org.hl7.fhir.r4.model.EpisodeOfCare)src);
  if (src instanceof org.hl7.fhir.r4.model.FamilyMemberHistory)   return convertFamilyMemberHistory((org.hl7.fhir.r4.model.FamilyMemberHistory)src);
  if (src instanceof org.hl7.fhir.r4.model.Flag)   return convertFlag((org.hl7.fhir.r4.model.Flag)src);
  if (src instanceof org.hl7.fhir.r4.model.Group)   return convertGroup((org.hl7.fhir.r4.model.Group)src);
  if (src instanceof org.hl7.fhir.r4.model.HealthcareService)   return convertHealthcareService((org.hl7.fhir.r4.model.HealthcareService)src);
  if (src instanceof org.hl7.fhir.r4.model.ImagingStudy)   return convertImagingStudy((org.hl7.fhir.r4.model.ImagingStudy)src);
  if (src instanceof org.hl7.fhir.r4.model.Immunization)   return convertImmunization((org.hl7.fhir.r4.model.Immunization)src);
  if (src instanceof org.hl7.fhir.r4.model.ImmunizationRecommendation)   return convertImmunizationRecommendation((org.hl7.fhir.r4.model.ImmunizationRecommendation)src);
  if (src instanceof org.hl7.fhir.r4.model.ImplementationGuide)   return convertImplementationGuide((org.hl7.fhir.r4.model.ImplementationGuide)src);
  if (src instanceof org.hl7.fhir.r4.model.ListResource)   return convertList((org.hl7.fhir.r4.model.ListResource)src);
  if (src instanceof org.hl7.fhir.r4.model.Location)   return convertLocation((org.hl7.fhir.r4.model.Location)src);
  if (src instanceof org.hl7.fhir.r4.model.Media)   return convertMedia((org.hl7.fhir.r4.model.Media)src);
  if (src instanceof org.hl7.fhir.r4.model.Medication)   return convertMedication((org.hl7.fhir.r4.model.Medication)src);
  if (src instanceof org.hl7.fhir.r4.model.MedicationDispense)   return convertMedicationDispense((org.hl7.fhir.r4.model.MedicationDispense)src);
  if (src instanceof org.hl7.fhir.r4.model.MedicationStatement)   return convertMedicationStatement((org.hl7.fhir.r4.model.MedicationStatement)src);
  if (src instanceof org.hl7.fhir.r4.model.MessageHeader)   return convertMessageHeader((org.hl7.fhir.r4.model.MessageHeader)src);
  if (src instanceof org.hl7.fhir.r4.model.NamingSystem)   return convertNamingSystem((org.hl7.fhir.r4.model.NamingSystem)src);
  if (src instanceof org.hl7.fhir.r4.model.Observation)   return convertObservation((org.hl7.fhir.r4.model.Observation)src);
  if (src instanceof org.hl7.fhir.r4.model.OperationDefinition)   return convertOperationDefinition((org.hl7.fhir.r4.model.OperationDefinition)src);
  if (src instanceof org.hl7.fhir.r4.model.OperationOutcome)   return convertOperationOutcome((org.hl7.fhir.r4.model.OperationOutcome)src);
  if (src instanceof org.hl7.fhir.r4.model.Organization)   return convertOrganization((org.hl7.fhir.r4.model.Organization)src);
  if (src instanceof org.hl7.fhir.r4.model.Patient)   return convertPatient((org.hl7.fhir.r4.model.Patient)src);
  if (src instanceof org.hl7.fhir.r4.model.Person)   return convertPerson((org.hl7.fhir.r4.model.Person)src);
  if (src instanceof org.hl7.fhir.r4.model.Practitioner)   return convertPractitioner((org.hl7.fhir.r4.model.Practitioner)src);
  if (src instanceof org.hl7.fhir.r4.model.Procedure)   return convertProcedure((org.hl7.fhir.r4.model.Procedure)src);
  if (src instanceof org.hl7.fhir.r4.model.ProcedureRequest)   return convertProcedureRequest((org.hl7.fhir.r4.model.ProcedureRequest)src);
  if (src instanceof org.hl7.fhir.r4.model.Provenance)   return convertProvenance((org.hl7.fhir.r4.model.Provenance)src);
  if (src instanceof org.hl7.fhir.r4.model.Questionnaire)   return convertQuestionnaire((org.hl7.fhir.r4.model.Questionnaire)src);
  if (src instanceof org.hl7.fhir.r4.model.QuestionnaireResponse)   return convertQuestionnaireResponse((org.hl7.fhir.r4.model.QuestionnaireResponse)src);
  if (src instanceof org.hl7.fhir.r4.model.RelatedPerson)   return convertRelatedPerson((org.hl7.fhir.r4.model.RelatedPerson)src);
  if (src instanceof org.hl7.fhir.r4.model.RiskAssessment)   return convertRiskAssessment((org.hl7.fhir.r4.model.RiskAssessment)src);
  if (src instanceof org.hl7.fhir.r4.model.Schedule)   return convertSchedule((org.hl7.fhir.r4.model.Schedule)src);
  if (src instanceof org.hl7.fhir.r4.model.SearchParameter)   return convertSearchParameter((org.hl7.fhir.r4.model.SearchParameter)src);
  if (src instanceof org.hl7.fhir.r4.model.Slot)   return convertSlot((org.hl7.fhir.r4.model.Slot)src);
  if (src instanceof org.hl7.fhir.r4.model.StructureDefinition)   return convertStructureDefinition((org.hl7.fhir.r4.model.StructureDefinition)src);
  if (src instanceof org.hl7.fhir.r4.model.Subscription)   return convertSubscription((org.hl7.fhir.r4.model.Subscription)src);
  if (src instanceof org.hl7.fhir.r4.model.Substance)   return convertSubstance((org.hl7.fhir.r4.model.Substance)src);
  if (src instanceof org.hl7.fhir.r4.model.SupplyDelivery)   return convertSupplyDelivery((org.hl7.fhir.r4.model.SupplyDelivery)src);
  if (src instanceof org.hl7.fhir.r4.model.SupplyRequest)   return convertSupplyRequest((org.hl7.fhir.r4.model.SupplyRequest)src);
  if (src instanceof org.hl7.fhir.r4.model.TestScript)   return convertTestScript((org.hl7.fhir.r4.model.TestScript)src);
  if (src instanceof org.hl7.fhir.r4.model.ValueSet)   return convertValueSet((org.hl7.fhir.r4.model.ValueSet)src);
  throw new Error("String_Node_Str" + src.fhirType());
}