nus-yam/ex-repair huggingface dataset:
Program: 23488
Project: 23488
Buggy source:
public org.hl7.fhir.dstu2.model.Person convertPerson(org.hl7.fhir.dstu3.model.Person src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Person tgt=new org.hl7.fhir.dstu2.model.Person();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  for (  org.hl7.fhir.dstu3.model.HumanName t : src.getName())   tgt.addName(convertHumanName(t));
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  tgt.setGender(convertAdministrativeGender(src.getGender()));
  tgt.setBirthDate(src.getBirthDate());
  for (  org.hl7.fhir.dstu3.model.Address t : src.getAddress())   tgt.addAddress(convertAddress(t));
  tgt.setPhoto(convertAttachment(src.getPhoto()));
  tgt.setManagingOrganization(convertReference(src.getManagingOrganization()));
  tgt.setActive(src.getActive());
  for (  org.hl7.fhir.dstu3.model.Person.PersonLinkComponent t : src.getLink())   tgt.addLink(convertPersonLinkComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Person convertPerson(org.hl7.fhir.dstu3.model.Person src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Person tgt=new org.hl7.fhir.dstu2.model.Person();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  for (  org.hl7.fhir.dstu3.model.HumanName t : src.getName())   tgt.addName(convertHumanName(t));
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  tgt.setGender(convertAdministrativeGender(src.getGender()));
  tgt.setBirthDate(src.getBirthDate());
  for (  org.hl7.fhir.dstu3.model.Address t : src.getAddress())   tgt.addAddress(convertAddress(t));
  tgt.setPhoto(convertAttachment(src.getPhoto()));
  tgt.setManagingOrganization(convertReference(src.getManagingOrganization()));
  tgt.setActive(src.getActive());
  for (  org.hl7.fhir.dstu3.model.Person.PersonLinkComponent t : src.getLink())   tgt.addLink(convertPersonLinkComponent(t));
  return tgt;
}
Program: 23489
Project: 23489
Buggy source:
public org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent convertImmunizationRecommendationRecommendationProtocolComponent(org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent tgt=new org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent();
  copyElement(src,tgt);
  tgt.setDoseSequence(src.getDoseSequence());
  tgt.setDescription(src.getDescription());
  tgt.setAuthority(convertReference(src.getAuthority()));
  tgt.setSeries(src.getSeries());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent convertImmunizationRecommendationRecommendationProtocolComponent(org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent tgt=new org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent();
  copyElement(src,tgt);
  tgt.setDoseSequence(src.getDoseSequence());
  tgt.setDescription(src.getDescription());
  tgt.setAuthority(convertReference(src.getAuthority()));
  tgt.setSeries(src.getSeries());
  return tgt;
}
Program: 23490
Project: 23490
Buggy source:
public org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent convertQuestionnaireGroupComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent tgt=new org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent();
  copyElement(src,tgt);
  tgt.setLinkId(src.getLinkId());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getConcept())   tgt.addConcept(convertCoding(t));
  tgt.setText(src.getText());
  tgt.setRequired(src.getRequired());
  tgt.setRepeats(src.getRepeats());
  for (  org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent t : src.getItem())   if (t.getType() == org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.GROUP)   tgt.addGroup(convertQuestionnaireGroupComponent(t));
 else   tgt.addQuestion(convertQuestionnaireQuestionComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent convertQuestionnaireGroupComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent tgt=new org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent();
  copyElement(src,tgt);
  tgt.setLinkId(src.getLinkId());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getConcept())   tgt.addConcept(convertCoding(t));
  tgt.setText(src.getText());
  tgt.setRequired(src.getRequired());
  tgt.setRepeats(src.getRepeats());
  for (  org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent t : src.getItem())   if (t.getType() == org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.GROUP)   tgt.addGroup(convertQuestionnaireGroupComponent(t));
 else   tgt.addQuestion(convertQuestionnaireQuestionComponent(t));
  return tgt;
}
Program: 23491
Project: 23491
Buggy source:
public org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt=new org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent();
  copyElement(src,tgt);
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setRef(convertReference(src.getRef()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent tgt=new org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContextRelatedComponent();
  copyElement(src,tgt);
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setRef(convertReference(src.getRef()));
  return tgt;
}
Program: 23492
Project: 23492
Buggy source:
public org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent tgt=new org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent();
  copyElement(src,tgt);
  tgt.setAction(convertCodeableConcept(src.getAction()));
  tgt.setDate(src.getDate());
  tgt.setAuthor(convertReference(src.getAuthor()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent convertDetectedIssueMitigationComponent(org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent tgt=new org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent();
  copyElement(src,tgt);
  tgt.setAction(convertCodeableConcept(src.getAction()));
  tgt.setDate(src.getDate());
  tgt.setAuthor(convertReference(src.getAuthor()));
  return tgt;
}
Program: 23493
Project: 23493
Buggy source:
public org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent tgt=new org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent();
  copyElement(src,tgt);
  tgt.setComment(src.getComment());
  tgt.setLink(convertReference(src.getLink()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent convertDiagnosticReportImageComponent(org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent tgt=new org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent();
  copyElement(src,tgt);
  tgt.setComment(src.getComment());
  tgt.setLink(convertReference(src.getLink()));
  return tgt;
}
Program: 23494
Project: 23494
Buggy source:
public org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent convertOperationDefinitionParameterComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent tgt=new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setUse(convertOperationParameterUse(src.getUse()));
  tgt.setMin(src.getMin());
  tgt.setMax(src.getMax());
  tgt.setDocumentation(src.getDocumentation());
  if (src.hasSearchType()) {
    tgt.setType(src.getSearchType().toCode());
    tgt.setType("String_Node_Str");
  }
 else   tgt.setType(src.getType());
  tgt.setProfile(convertReference(src.getProfile()));
  tgt.setBinding(convertOperationDefinitionParameterBindingComponent(src.getBinding()));
  for (  org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getPart())   tgt.addPart(convertOperationDefinitionParameterComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent convertOperationDefinitionParameterComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent tgt=new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setUse(convertOperationParameterUse(src.getUse()));
  tgt.setMin(src.getMin());
  tgt.setMax(src.getMax());
  tgt.setDocumentation(src.getDocumentation());
  if (src.hasSearchType()) {
    tgt.setType(src.getSearchType().toCode());
    tgt.setType("String_Node_Str");
  }
 else   tgt.setType(src.getType());
  tgt.setProfile(convertReference(src.getProfile()));
  tgt.setBinding(convertOperationDefinitionParameterBindingComponent(src.getBinding()));
  for (  org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getPart())   tgt.addPart(convertOperationDefinitionParameterComponent(t));
  return tgt;
}
Program: 23495
Project: 23495
Buggy source:
public org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent tgt=new org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent();
  copyElement(src,tgt);
  tgt.setMode(convertSearchEntryMode(src.getMode()));
  tgt.setScore(src.getScore());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent tgt=new org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent();
  copyElement(src,tgt);
  tgt.setMode(convertSearchEntryMode(src.getMode()));
  tgt.setScore(src.getScore());
  return tgt;
}
Program: 23496
Project: 23496
Buggy source:
public org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent tgt=new org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent();
  copyElement(src,tgt);
  tgt.setContent(convertType(src.getContent()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent convertFriendlyLanguageComponent(org.hl7.fhir.dstu3.model.Contract.FriendlyLanguageComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent tgt=new org.hl7.fhir.dstu2.model.Contract.FriendlyLanguageComponent();
  copyElement(src,tgt);
  tgt.setContent(convertType(src.getContent()));
  return tgt;
}
Program: 23497
Project: 23497
Buggy source:
public org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt=new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent();
  copyElement(src,tgt);
  tgt.setType(src.getType());
  tgt.setProfile(convertReference(src.getProfile()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt=new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent();
  copyElement(src,tgt);
  tgt.setType(src.getType());
  tgt.setProfile(convertReference(src.getProfile()));
  return tgt;
}
Program: 23498
Project: 23498
Buggy source:
public org.hl7.fhir.dstu2.model.ReferralRequest convertReferralRequest(org.hl7.fhir.dstu3.model.ReferralRequest src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ReferralRequest tgt=new org.hl7.fhir.dstu2.model.ReferralRequest();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertReferralStatus(src.getStatus()));
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setPriority(convertCodeableConcept(src.getPriority()));
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setFulfillmentTime(convertPeriod(src.getFulfillmentTime()));
  tgt.setRequester(convertReference(src.getRequester()));
  tgt.setSpecialty(convertCodeableConcept(src.getSpecialty()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getRecipient())   tgt.addRecipient(convertReference(t));
  tgt.setReason(convertCodeableConcept(src.getReason()));
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceRequested())   tgt.addServiceRequested(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInformation())   tgt.addSupportingInformation(convertReference(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ReferralRequest convertReferralRequest(org.hl7.fhir.dstu3.model.ReferralRequest src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ReferralRequest tgt=new org.hl7.fhir.dstu2.model.ReferralRequest();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertReferralStatus(src.getStatus()));
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setPriority(convertCodeableConcept(src.getPriority()));
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setFulfillmentTime(convertPeriod(src.getFulfillmentTime()));
  tgt.setRequester(convertReference(src.getRequester()));
  tgt.setSpecialty(convertCodeableConcept(src.getSpecialty()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getRecipient())   tgt.addRecipient(convertReference(t));
  tgt.setReason(convertCodeableConcept(src.getReason()));
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceRequested())   tgt.addServiceRequested(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInformation())   tgt.addSupportingInformation(convertReference(t));
  return tgt;
}
Program: 23499
Project: 23499
Buggy source:
public org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent convertDataElementContactComponent(org.hl7.fhir.dstu3.model.DataElement.DataElementContactComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent tgt=new org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent convertDataElementContactComponent(org.hl7.fhir.dstu3.model.DataElement.DataElementContactComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent tgt=new org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  return tgt;
}
Program: 23500
Project: 23500
Buggy source:
public org.hl7.fhir.dstu2.model.ProcessRequest.ItemsComponent convertItemsComponent(org.hl7.fhir.dstu3.model.ProcessRequest.ItemsComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ProcessRequest.ItemsComponent tgt=new org.hl7.fhir.dstu2.model.ProcessRequest.ItemsComponent();
  copyElement(src,tgt);
  tgt.setSequenceLinkId(src.getSequenceLinkId());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ProcessRequest.ItemsComponent convertItemsComponent(org.hl7.fhir.dstu3.model.ProcessRequest.ItemsComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ProcessRequest.ItemsComponent tgt=new org.hl7.fhir.dstu2.model.ProcessRequest.ItemsComponent();
  copyElement(src,tgt);
  tgt.setSequenceLinkId(src.getSequenceLinkId());
  return tgt;
}
Program: 23501
Project: 23501
Buggy source:
public org.hl7.fhir.dstu2.model.Binary convertBinary(org.hl7.fhir.dstu3.model.Binary src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Binary tgt=new org.hl7.fhir.dstu2.model.Binary();
  copyResource(src,tgt);
  tgt.setContentType(src.getContentType());
  tgt.setContent(src.getContent());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Binary convertBinary(org.hl7.fhir.dstu3.model.Binary src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Binary tgt=new org.hl7.fhir.dstu2.model.Binary();
  copyResource(src,tgt);
  tgt.setContentType(src.getContentType());
  tgt.setContent(src.getContent());
  return tgt;
}
Program: 23502
Project: 23502
Buggy source:
public org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent tgt=new org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent();
  copyElement(src,tgt);
  tgt.setContent(convertType(src.getContent()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent convertComputableLanguageComponent(org.hl7.fhir.dstu3.model.Contract.ComputableLanguageComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent tgt=new org.hl7.fhir.dstu2.model.Contract.ComputableLanguageComponent();
  copyElement(src,tgt);
  tgt.setContent(convertType(src.getContent()));
  return tgt;
}
Program: 23503
Project: 23503
Buggy source:
public org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent convertAuditEventEntityComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent tgt=new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent();
  copyElement(src,tgt);
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setReference(convertReference(src.getReference()));
  tgt.setType(convertCoding(src.getType()));
  tgt.setRole(convertCoding(src.getRole()));
  tgt.setLifecycle(convertCoding(src.getLifecycle()));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getSecurityLabel())   tgt.addSecurityLabel(convertCoding(t));
  tgt.setName(src.getName());
  tgt.setDescription(src.getDescription());
  tgt.setQuery(src.getQuery());
  for (  org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail())   tgt.addDetail(convertAuditEventEntityDetailComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent convertAuditEventEntityComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent tgt=new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectComponent();
  copyElement(src,tgt);
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setReference(convertReference(src.getReference()));
  tgt.setType(convertCoding(src.getType()));
  tgt.setRole(convertCoding(src.getRole()));
  tgt.setLifecycle(convertCoding(src.getLifecycle()));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getSecurityLabel())   tgt.addSecurityLabel(convertCoding(t));
  tgt.setName(src.getName());
  tgt.setDescription(src.getDescription());
  tgt.setQuery(src.getQuery());
  for (  org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityDetailComponent t : src.getDetail())   tgt.addDetail(convertAuditEventEntityDetailComponent(t));
  return tgt;
}
Program: 23504
Project: 23504
Buggy source:
public org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent convertQuestionnaireItemToGroup(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent tgt=new org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent();
  copyElement(src,tgt);
  tgt.setLinkId(src.getLinkId());
  tgt.setText(src.getText());
  tgt.setSubject(convertReference(src.getSubject()));
  for (  org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem())   if (t.hasAnswer())   tgt.addQuestion(convertQuestionnaireItemToQuestion(t));
 else   tgt.addGroup(convertQuestionnaireItemToGroup(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent convertQuestionnaireItemToGroup(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent tgt=new org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent();
  copyElement(src,tgt);
  tgt.setLinkId(src.getLinkId());
  tgt.setText(src.getText());
  tgt.setSubject(convertReference(src.getSubject()));
  for (  org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem())   if (t.hasAnswer())   tgt.addQuestion(convertQuestionnaireItemToQuestion(t));
 else   tgt.addGroup(convertQuestionnaireItemToGroup(t));
  return tgt;
}
Program: 23505
Project: 23505
Buggy source:
public org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent tgt=new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent();
  copyElement(src,tgt);
  tgt.setSite(src.getSite());
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getType())   tgt.addType(convertCoding(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent tgt=new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent();
  copyElement(src,tgt);
  tgt.setSite(src.getSite());
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getType())   tgt.addType(convertCoding(t));
  return tgt;
}
Program: 23506
Project: 23506
Buggy source:
public org.hl7.fhir.dstu2.model.VisionPrescription.VisionPrescriptionDispenseComponent convertVisionPrescriptionDispenseComponent(org.hl7.fhir.dstu3.model.VisionPrescription.VisionPrescriptionDispenseComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.VisionPrescription.VisionPrescriptionDispenseComponent tgt=new org.hl7.fhir.dstu2.model.VisionPrescription.VisionPrescriptionDispenseComponent();
  copyElement(src,tgt);
  tgt.setProduct(convertCoding(src.getProduct()));
  tgt.setEye(convertVisionEyes(src.getEye()));
  tgt.setSphere(src.getSphere());
  tgt.setCylinder(src.getCylinder());
  tgt.setAxis(src.getAxis());
  tgt.setPrism(src.getPrism());
  tgt.setBase(convertVisionBase(src.getBase()));
  tgt.setAdd(src.getAdd());
  tgt.setPower(src.getPower());
  tgt.setBackCurve(src.getBackCurve());
  tgt.setDiameter(src.getDiameter());
  tgt.setDuration(convertSimpleQuantity(src.getDuration()));
  tgt.setColor(src.getColor());
  tgt.setBrand(src.getBrand());
  tgt.setNotes(src.getNotes());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.VisionPrescription.VisionPrescriptionDispenseComponent convertVisionPrescriptionDispenseComponent(org.hl7.fhir.dstu3.model.VisionPrescription.VisionPrescriptionDispenseComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.VisionPrescription.VisionPrescriptionDispenseComponent tgt=new org.hl7.fhir.dstu2.model.VisionPrescription.VisionPrescriptionDispenseComponent();
  copyElement(src,tgt);
  tgt.setProduct(convertCoding(src.getProduct()));
  tgt.setEye(convertVisionEyes(src.getEye()));
  tgt.setSphere(src.getSphere());
  tgt.setCylinder(src.getCylinder());
  tgt.setAxis(src.getAxis());
  tgt.setPrism(src.getPrism());
  tgt.setBase(convertVisionBase(src.getBase()));
  tgt.setAdd(src.getAdd());
  tgt.setPower(src.getPower());
  tgt.setBackCurve(src.getBackCurve());
  tgt.setDiameter(src.getDiameter());
  tgt.setDuration(convertSimpleQuantity(src.getDuration()));
  tgt.setColor(src.getColor());
  tgt.setBrand(src.getBrand());
  tgt.setNotes(src.getNotes());
  return tgt;
}
Program: 23507
Project: 23507
Buggy source:
public org.hl7.fhir.dstu2.model.Organization convertOrganization(org.hl7.fhir.dstu3.model.Organization src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Organization tgt=new org.hl7.fhir.dstu2.model.Organization();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setActive(src.getActive());
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  for (  org.hl7.fhir.dstu3.model.Address t : src.getAddress())   tgt.addAddress(convertAddress(t));
  tgt.setPartOf(convertReference(src.getPartOf()));
  for (  org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent t : src.getContact())   tgt.addContact(convertOrganizationContactComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Organization convertOrganization(org.hl7.fhir.dstu3.model.Organization src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Organization tgt=new org.hl7.fhir.dstu2.model.Organization();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setActive(src.getActive());
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  for (  org.hl7.fhir.dstu3.model.Address t : src.getAddress())   tgt.addAddress(convertAddress(t));
  tgt.setPartOf(convertReference(src.getPartOf()));
  for (  org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent t : src.getContact())   tgt.addContact(convertOrganizationContactComponent(t));
  return tgt;
}
Program: 23508
Project: 23508
Buggy source:
public org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderSubstitutionComponent convertMedicationOrderSubstitutionComponent(org.hl7.fhir.dstu3.model.MedicationOrder.MedicationOrderSubstitutionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderSubstitutionComponent tgt=new org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderSubstitutionComponent();
  copyElement(src,tgt);
  tgt.setReason(convertCodeableConcept(src.getReason()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderSubstitutionComponent convertMedicationOrderSubstitutionComponent(org.hl7.fhir.dstu3.model.MedicationOrder.MedicationOrderSubstitutionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderSubstitutionComponent tgt=new org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderSubstitutionComponent();
  copyElement(src,tgt);
  tgt.setReason(convertCodeableConcept(src.getReason()));
  return tgt;
}
Program: 23509
Project: 23509
Buggy source:
public org.hl7.fhir.dstu2.model.BodySite convertBodySite(org.hl7.fhir.dstu3.model.BodySite src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.BodySite tgt=new org.hl7.fhir.dstu2.model.BodySite();
  copyDomainResource(src,tgt);
  tgt.setPatient(convertReference(src.getPatient()));
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setCode(convertCodeableConcept(src.getCode()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier())   tgt.addModifier(convertCodeableConcept(t));
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.Attachment t : src.getImage())   tgt.addImage(convertAttachment(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.BodySite convertBodySite(org.hl7.fhir.dstu3.model.BodySite src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.BodySite tgt=new org.hl7.fhir.dstu2.model.BodySite();
  copyDomainResource(src,tgt);
  tgt.setPatient(convertReference(src.getPatient()));
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setCode(convertCodeableConcept(src.getCode()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getModifier())   tgt.addModifier(convertCodeableConcept(t));
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.Attachment t : src.getImage())   tgt.addImage(convertAttachment(t));
  return tgt;
}
Program: 23510
Project: 23510
Buggy source:
public org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent convertImagingStudySeriesInstanceComponent(org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent tgt=new org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent();
  copyElement(src,tgt);
  tgt.setUid(src.getUid());
  tgt.setNumber(src.getNumber());
  tgt.setSopClass(src.getSopClass());
  tgt.setTitle(src.getTitle());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent convertImagingStudySeriesInstanceComponent(org.hl7.fhir.dstu3.model.ImagingStudy.ImagingStudySeriesInstanceComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent tgt=new org.hl7.fhir.dstu2.model.ImagingStudy.ImagingStudySeriesInstanceComponent();
  copyElement(src,tgt);
  tgt.setUid(src.getUid());
  tgt.setNumber(src.getNumber());
  tgt.setSopClass(src.getSopClass());
  tgt.setTitle(src.getTitle());
  return tgt;
}
Program: 23511
Project: 23511
Buggy source:
public org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent();
  copyElement(src,tgt);
  tgt.setSystem(src.getSystem());
  tgt.setAbstract(src.getAbstract());
  tgt.setVersion(src.getVersion());
  tgt.setCode(src.getCode());
  tgt.setDisplay(src.getDisplay());
  for (  org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains())   tgt.addContains(convertValueSetExpansionContainsComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent convertValueSetExpansionContainsComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent();
  copyElement(src,tgt);
  tgt.setSystem(src.getSystem());
  tgt.setAbstract(src.getAbstract());
  tgt.setVersion(src.getVersion());
  tgt.setCode(src.getCode());
  tgt.setDisplay(src.getDisplay());
  for (  org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains())   tgt.addContains(convertValueSetExpansionContainsComponent(t));
  return tgt;
}
Program: 23512
Project: 23512
Buggy source:
public org.hl7.fhir.dstu2.model.AuditEvent convertAuditEvent(org.hl7.fhir.dstu3.model.AuditEvent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.AuditEvent tgt=new org.hl7.fhir.dstu2.model.AuditEvent();
  copyDomainResource(src,tgt);
  tgt.getEvent().setType(convertCoding(src.getType()));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getSubtype())   tgt.getEvent().addSubtype(convertCoding(t));
  tgt.getEvent().setAction(convertAuditEventAction(src.getAction()));
  tgt.getEvent().setDateTime(src.getRecorded());
  tgt.getEvent().setOutcome(convertAuditEventOutcome(src.getOutcome()));
  tgt.getEvent().setOutcomeDesc(src.getOutcomeDesc());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getPurposeOfEvent())   tgt.getEvent().addPurposeOfEvent(convertCoding(t));
  for (  org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent t : src.getAgent())   tgt.addParticipant(convertAuditEventAgentComponent(t));
  tgt.setSource(convertAuditEventSourceComponent(src.getSource()));
  for (  org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityComponent t : src.getEntity())   tgt.addObject(convertAuditEventEntityComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.AuditEvent convertAuditEvent(org.hl7.fhir.dstu3.model.AuditEvent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.AuditEvent tgt=new org.hl7.fhir.dstu2.model.AuditEvent();
  copyDomainResource(src,tgt);
  tgt.getEvent().setType(convertCoding(src.getType()));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getSubtype())   tgt.getEvent().addSubtype(convertCoding(t));
  tgt.getEvent().setAction(convertAuditEventAction(src.getAction()));
  tgt.getEvent().setDateTime(src.getRecorded());
  tgt.getEvent().setOutcome(convertAuditEventOutcome(src.getOutcome()));
  tgt.getEvent().setOutcomeDesc(src.getOutcomeDesc());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getPurposeOfEvent())   tgt.getEvent().addPurposeOfEvent(convertCoding(t));
  for (  org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent t : src.getAgent())   tgt.addParticipant(convertAuditEventAgentComponent(t));
  tgt.setSource(convertAuditEventSourceComponent(src.getSource()));
  for (  org.hl7.fhir.dstu3.model.AuditEvent.AuditEventEntityComponent t : src.getEntity())   tgt.addObject(convertAuditEventEntityComponent(t));
  return tgt;
}
Program: 23513
Project: 23513
Buggy source:
public org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent convertDataElementMappingComponent(org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent tgt=new org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent();
  copyElement(src,tgt);
  tgt.setIdentity(src.getIdentity());
  tgt.setUri(src.getUri());
  tgt.setName(src.getName());
  tgt.setComments(src.getComment());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent convertDataElementMappingComponent(org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent tgt=new org.hl7.fhir.dstu2.model.DataElement.DataElementMappingComponent();
  copyElement(src,tgt);
  tgt.setIdentity(src.getIdentity());
  tgt.setUri(src.getUri());
  tgt.setName(src.getName());
  tgt.setComments(src.getComment());
  return tgt;
}
Program: 23514
Project: 23514
Buggy source:
public org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent convertFamilyMemberHistoryConditionComponent(org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent tgt=new org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setOutcome(convertCodeableConcept(src.getOutcome()));
  tgt.setOnset(convertType(src.getOnset()));
  tgt.setNote(convertAnnotation(src.getNote()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent convertFamilyMemberHistoryConditionComponent(org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent tgt=new org.hl7.fhir.dstu2.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setOutcome(convertCodeableConcept(src.getOutcome()));
  tgt.setOnset(convertType(src.getOnset()));
  tgt.setNote(convertAnnotation(src.getNote()));
  return tgt;
}
Program: 23515
Project: 23515
Buggy source:
public org.hl7.fhir.dstu2.model.Coverage convertCoverage(org.hl7.fhir.dstu3.model.Coverage src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Coverage tgt=new org.hl7.fhir.dstu2.model.Coverage();
  copyDomainResource(src,tgt);
  if (src.hasIssuerReference())   tgt.setIssuer((org.hl7.fhir.dstu2.model.Reference)convertType(src.getIssuer()));
  tgt.setBin(new org.hl7.fhir.dstu2.model.Identifier().setValue(src.getBin()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  tgt.setType(convertCoding(src.getType()));
  if (src.hasPlanholderIdentifier())   tgt.setSubscriberId((org.hl7.fhir.dstu2.model.Identifier)convertType(src.getPlanholder()));
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setGroup(src.getGroup());
  tgt.setPlan(src.getPlan());
  tgt.setSubPlan(src.getSubPlan());
  tgt.setDependent(src.getDependent());
  tgt.setSequence(src.getSequence());
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getContract())   tgt.addContract(convertReference(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Coverage convertCoverage(org.hl7.fhir.dstu3.model.Coverage src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Coverage tgt=new org.hl7.fhir.dstu2.model.Coverage();
  copyDomainResource(src,tgt);
  if (src.hasIssuerReference())   tgt.setIssuer((org.hl7.fhir.dstu2.model.Reference)convertType(src.getIssuer()));
  tgt.setBin(new org.hl7.fhir.dstu2.model.Identifier().setValue(src.getBin()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  tgt.setType(convertCoding(src.getType()));
  if (src.hasPlanholderIdentifier())   tgt.setSubscriberId((org.hl7.fhir.dstu2.model.Identifier)convertType(src.getPlanholder()));
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setGroup(src.getGroup());
  tgt.setPlan(src.getPlan());
  tgt.setSubPlan(src.getSubPlan());
  tgt.setDependent(src.getDependent());
  tgt.setSequence(src.getSequence());
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getContract())   tgt.addContract(convertReference(t));
  return tgt;
}
Program: 23516
Project: 23516
Buggy source:
public org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent convertSubstanceInstanceComponent(org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent tgt=new org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent();
  copyElement(src,tgt);
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setExpiry(src.getExpiry());
  tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent convertSubstanceInstanceComponent(org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent tgt=new org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent();
  copyElement(src,tgt);
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setExpiry(src.getExpiry());
  tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
  return tgt;
}
Program: 23517
Project: 23517
Buggy source:
public org.hl7.fhir.dstu2.model.Narrative convertNarrative(org.hl7.fhir.dstu3.model.Narrative src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Narrative tgt=new org.hl7.fhir.dstu2.model.Narrative();
  copyElement(src,tgt);
  tgt.setStatus(convertNarrativeStatus(src.getStatus()));
  tgt.setDiv(src.getDiv());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Narrative convertNarrative(org.hl7.fhir.dstu3.model.Narrative src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Narrative tgt=new org.hl7.fhir.dstu2.model.Narrative();
  copyElement(src,tgt);
  tgt.setStatus(convertNarrativeStatus(src.getStatus()));
  tgt.setDiv(src.getDiv());
  return tgt;
}
Program: 23518
Project: 23518
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent convertTestActionComponent(org.hl7.fhir.dstu3.model.TestScript.TestActionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent();
  copyElement(src,tgt);
  tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
  tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent convertTestActionComponent(org.hl7.fhir.dstu3.model.TestScript.TestActionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent();
  copyElement(src,tgt);
  tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
  tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
  return tgt;
}