nus-yam/ex-repair huggingface dataset:
Program: 23744
Project: 23744
Buggy source:
public org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent tgt=new org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent();
  copyElement(src,tgt);
  tgt.setPurpose(convertCodeableConcept(src.getPurpose()));
  tgt.setName(convertHumanName(src.getName()));
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  tgt.setAddress(convertAddress(src.getAddress()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent convertOrganizationContactComponent(org.hl7.fhir.dstu3.model.Organization.OrganizationContactComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent tgt=new org.hl7.fhir.dstu2.model.Organization.OrganizationContactComponent();
  copyElement(src,tgt);
  tgt.setPurpose(convertCodeableConcept(src.getPurpose()));
  tgt.setName(convertHumanName(src.getName()));
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  tgt.setAddress(convertAddress(src.getAddress()));
  return tgt;
}
Program: 23745
Project: 23745
Buggy source:
public org.hl7.fhir.dstu2.model.ValueSet.ValueSetCodeSystemComponent convertCodeSystem(org.hl7.fhir.dstu3.model.CodeSystem src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ValueSetCodeSystemComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ValueSetCodeSystemComponent();
  copyElement(src,tgt);
  tgt.setSystem(src.getUrl());
  tgt.setVersion(src.getVersion());
  tgt.setCaseSensitive(src.getCaseSensitive());
  for (  ConceptDefinitionComponent cc : src.getConcept())   tgt.addConcept(convertCodeSystemConcept(src,cc));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ValueSet.ValueSetCodeSystemComponent convertCodeSystem(org.hl7.fhir.dstu3.model.CodeSystem src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ValueSetCodeSystemComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ValueSetCodeSystemComponent();
  copyElement(src,tgt);
  tgt.setSystem(src.getUrl());
  tgt.setVersion(src.getVersion());
  tgt.setCaseSensitive(src.getCaseSensitive());
  for (  ConceptDefinitionComponent cc : src.getConcept())   tgt.addConcept(convertCodeSystemConcept(src,cc));
  return tgt;
}
Program: 23746
Project: 23746
Buggy source:
public org.hl7.fhir.dstu2.model.ProcessResponse.ProcessResponseNotesComponent convertProcessResponseNotesComponent(org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseNotesComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ProcessResponse.ProcessResponseNotesComponent tgt=new org.hl7.fhir.dstu2.model.ProcessResponse.ProcessResponseNotesComponent();
  copyElement(src,tgt);
  tgt.setType(convertCoding(src.getType()));
  tgt.setText(src.getText());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ProcessResponse.ProcessResponseNotesComponent convertProcessResponseNotesComponent(org.hl7.fhir.dstu3.model.ProcessResponse.ProcessResponseNotesComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ProcessResponse.ProcessResponseNotesComponent tgt=new org.hl7.fhir.dstu2.model.ProcessResponse.ProcessResponseNotesComponent();
  copyElement(src,tgt);
  tgt.setType(convertCoding(src.getType()));
  tgt.setText(src.getText());
  return tgt;
}
Program: 23747
Project: 23747
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent convertTestScriptVariableComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setHeaderField(src.getHeaderField());
  tgt.setPath(src.getPath());
  tgt.setSourceId(src.getSourceId());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent convertTestScriptVariableComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setHeaderField(src.getHeaderField());
  tgt.setPath(src.getPath());
  tgt.setSourceId(src.getSourceId());
  return tgt;
}
Program: 23748
Project: 23748
Buggy source:
public org.hl7.fhir.dstu2.model.NutritionOrder convertNutritionOrder(org.hl7.fhir.dstu3.model.NutritionRequest src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.NutritionOrder tgt=new org.hl7.fhir.dstu2.model.NutritionOrder();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertNutritionOrderStatus(src.getStatus()));
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setDateTime(src.getDateTime());
  tgt.setOrderer(convertReference(src.getOrderer()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getAllergyIntolerance())   tgt.addAllergyIntolerance(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getFoodPreferenceModifier())   tgt.addFoodPreferenceModifier(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getExcludeFoodModifier())   tgt.addExcludeFoodModifier(convertCodeableConcept(t));
  tgt.setOralDiet(convertNutritionOrderOralDietComponent(src.getOralDiet()));
  for (  org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestSupplementComponent t : src.getSupplement())   tgt.addSupplement(convertNutritionOrderSupplementComponent(t));
  tgt.setEnteralFormula(convertNutritionOrderEnteralFormulaComponent(src.getEnteralFormula()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.NutritionOrder convertNutritionOrder(org.hl7.fhir.dstu3.model.NutritionRequest src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.NutritionOrder tgt=new org.hl7.fhir.dstu2.model.NutritionOrder();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertNutritionOrderStatus(src.getStatus()));
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setDateTime(src.getDateTime());
  tgt.setOrderer(convertReference(src.getOrderer()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getAllergyIntolerance())   tgt.addAllergyIntolerance(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getFoodPreferenceModifier())   tgt.addFoodPreferenceModifier(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getExcludeFoodModifier())   tgt.addExcludeFoodModifier(convertCodeableConcept(t));
  tgt.setOralDiet(convertNutritionOrderOralDietComponent(src.getOralDiet()));
  for (  org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestSupplementComponent t : src.getSupplement())   tgt.addSupplement(convertNutritionOrderSupplementComponent(t));
  tgt.setEnteralFormula(convertNutritionOrderEnteralFormulaComponent(src.getEnteralFormula()));
  return tgt;
}
Program: 23749
Project: 23749
Buggy source:
public org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setValue(convertType(src.getValue()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent convertValueSetExpansionParameterComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetExpansionParameterComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setValue(convertType(src.getValue()));
  return tgt;
}
Program: 23750
Project: 23750
Buggy source:
public org.hl7.fhir.dstu2.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.dstu3.model.Contract.SignatoryComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Contract.SignatoryComponent tgt=new org.hl7.fhir.dstu2.model.Contract.SignatoryComponent();
  copyElement(src,tgt);
  tgt.setType(convertCoding(src.getType()));
  tgt.setParty(convertReference(src.getParty()));
  for (  org.hl7.fhir.dstu3.model.Signature t : src.getSignature())   tgt.setSignature(Base64.encodeBase64String(t.getBlob()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Contract.SignatoryComponent convertSignatoryComponent(org.hl7.fhir.dstu3.model.Contract.SignatoryComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Contract.SignatoryComponent tgt=new org.hl7.fhir.dstu2.model.Contract.SignatoryComponent();
  copyElement(src,tgt);
  tgt.setType(convertCoding(src.getType()));
  tgt.setParty(convertReference(src.getParty()));
  for (  org.hl7.fhir.dstu3.model.Signature t : src.getSignature())   tgt.setSignature(Base64.encodeBase64String(t.getBlob()));
  return tgt;
}
Program: 23751
Project: 23751
Buggy source:
public org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent convertCodeSystemDesignation(ConceptDefinitionDesignationComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent();
  copyElement(src,tgt);
  tgt.setUse(convertCoding(src.getUse()));
  tgt.setLanguage(src.getLanguage());
  tgt.setValue(src.getValue());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent convertCodeSystemDesignation(ConceptDefinitionDesignationComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent();
  copyElement(src,tgt);
  tgt.setUse(convertCoding(src.getUse()));
  tgt.setLanguage(src.getLanguage());
  tgt.setValue(src.getValue());
  return tgt;
}
Program: 23752
Project: 23752
Buggy source:
public org.hl7.fhir.dstu2.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Bundle tgt=new org.hl7.fhir.dstu2.model.Bundle();
  copyResource(src,tgt);
  tgt.setType(convertBundleType(src.getType()));
  tgt.setTotal(src.getTotal());
  for (  org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink())   tgt.addLink(convertBundleLinkComponent(t));
  for (  org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry())   tgt.addEntry(convertBundleEntryComponent(t));
  tgt.setSignature(convertSignature(src.getSignature()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Bundle tgt=new org.hl7.fhir.dstu2.model.Bundle();
  copyResource(src,tgt);
  tgt.setType(convertBundleType(src.getType()));
  tgt.setTotal(src.getTotal());
  for (  org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink())   tgt.addLink(convertBundleLinkComponent(t));
  for (  org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry())   tgt.addEntry(convertBundleEntryComponent(t));
  tgt.setSignature(convertSignature(src.getSignature()));
  return tgt;
}
Program: 23753
Project: 23753
Buggy source:
public org.hl7.fhir.dstu2.model.Range convertRange(org.hl7.fhir.dstu3.model.Range src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Range tgt=new org.hl7.fhir.dstu2.model.Range();
  copyElement(src,tgt);
  tgt.setLow(convertSimpleQuantity(src.getLow()));
  tgt.setHigh(convertSimpleQuantity(src.getHigh()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Range convertRange(org.hl7.fhir.dstu3.model.Range src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Range tgt=new org.hl7.fhir.dstu2.model.Range();
  copyElement(src,tgt);
  tgt.setLow(convertSimpleQuantity(src.getLow()));
  tgt.setHigh(convertSimpleQuantity(src.getHigh()));
  return tgt;
}
Program: 23754
Project: 23754
Buggy source:
public org.hl7.fhir.dstu2.model.EligibilityRequest convertEligibilityRequest(org.hl7.fhir.dstu3.model.EligibilityRequest src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.EligibilityRequest tgt=new org.hl7.fhir.dstu2.model.EligibilityRequest();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setRuleset(convertCoding(src.getRuleset()));
  tgt.setOriginalRuleset(convertCoding(src.getOriginalRuleset()));
  tgt.setCreated(src.getCreated());
  if (src.hasProviderReference())   tgt.setProvider((org.hl7.fhir.dstu2.model.Reference)convertType(src.getProvider()));
  if (src.hasOrganizationReference())   tgt.setOrganization((org.hl7.fhir.dstu2.model.Reference)convertType(src.getOrganization()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.EligibilityRequest convertEligibilityRequest(org.hl7.fhir.dstu3.model.EligibilityRequest src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.EligibilityRequest tgt=new org.hl7.fhir.dstu2.model.EligibilityRequest();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setRuleset(convertCoding(src.getRuleset()));
  tgt.setOriginalRuleset(convertCoding(src.getOriginalRuleset()));
  tgt.setCreated(src.getCreated());
  if (src.hasProviderReference())   tgt.setProvider((org.hl7.fhir.dstu2.model.Reference)convertType(src.getProvider()));
  if (src.hasOrganizationReference())   tgt.setOrganization((org.hl7.fhir.dstu2.model.Reference)convertType(src.getOrganization()));
  return tgt;
}
Program: 23755
Project: 23755
Buggy source:
public org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent tgt=new org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getDetail())   tgt.addDetail(convertReference(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent convertConditionEvidenceComponent(org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent tgt=new org.hl7.fhir.dstu2.model.Condition.ConditionEvidenceComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getDetail())   tgt.addDetail(convertReference(t));
  return tgt;
}
Program: 23756
Project: 23756
Buggy source:
public org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionBindingComponent convertElementDefinitionBindingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionBindingComponent tgt=new org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionBindingComponent();
  copyElement(src,tgt);
  tgt.setStrength(convertBindingStrength(src.getStrength()));
  tgt.setDescription(src.getDescription());
  tgt.setValueSet(convertType(src.getValueSet()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionBindingComponent convertElementDefinitionBindingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionBindingComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionBindingComponent tgt=new org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionBindingComponent();
  copyElement(src,tgt);
  tgt.setStrength(convertBindingStrength(src.getStrength()));
  tgt.setDescription(src.getDescription());
  tgt.setValueSet(convertType(src.getValueSet()));
  return tgt;
}
Program: 23757
Project: 23757
Buggy source:
public org.hl7.fhir.dstu2.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.CodeableConcept tgt=new org.hl7.fhir.dstu2.model.CodeableConcept();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getCoding())   tgt.addCoding(convertCoding(t));
  tgt.setText(src.getText());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.dstu3.model.CodeableConcept src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.CodeableConcept tgt=new org.hl7.fhir.dstu2.model.CodeableConcept();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getCoding())   tgt.addCoding(convertCoding(t));
  tgt.setText(src.getText());
  return tgt;
}
Program: 23758
Project: 23758
Buggy source:
public org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt=new org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent();
  copyElement(src,tgt);
  if (src.hasItemCodeableConcept())   try {
    tgt.setItem(convertCodeableConcept(src.getItemCodeableConcept()));
  }
 catch (  org.hl7.fhir.dstu3.exceptions.FHIRException e) {
  }
  tgt.setCause(src.getCause());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent convertClinicalImpressionFindingComponent(org.hl7.fhir.dstu3.model.ClinicalImpression.ClinicalImpressionFindingComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent tgt=new org.hl7.fhir.dstu2.model.ClinicalImpression.ClinicalImpressionFindingComponent();
  copyElement(src,tgt);
  if (src.hasItemCodeableConcept())   try {
    tgt.setItem(convertCodeableConcept(src.getItemCodeableConcept()));
  }
 catch (  org.hl7.fhir.dstu3.exceptions.FHIRException e) {
  }
  tgt.setCause(src.getCause());
  return tgt;
}
Program: 23759
Project: 23759
Buggy source:
public org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDispenseRequestComponent convertMedicationOrderDispenseRequestComponent(org.hl7.fhir.dstu3.model.MedicationOrder.MedicationOrderDispenseRequestComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDispenseRequestComponent tgt=new org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDispenseRequestComponent();
  copyElement(src,tgt);
  tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod()));
  tgt.setNumberOfRepeatsAllowed(src.getNumberOfRepeatsAllowed());
  tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
  tgt.setExpectedSupplyDuration(convertDuration(src.getExpectedSupplyDuration()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDispenseRequestComponent convertMedicationOrderDispenseRequestComponent(org.hl7.fhir.dstu3.model.MedicationOrder.MedicationOrderDispenseRequestComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDispenseRequestComponent tgt=new org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDispenseRequestComponent();
  copyElement(src,tgt);
  tgt.setValidityPeriod(convertPeriod(src.getValidityPeriod()));
  tgt.setNumberOfRepeatsAllowed(src.getNumberOfRepeatsAllowed());
  tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
  tgt.setExpectedSupplyDuration(convertDuration(src.getExpectedSupplyDuration()));
  return tgt;
}
Program: 23760
Project: 23760
Buggy source:
public org.hl7.fhir.dstu2.model.Device convertDevice(org.hl7.fhir.dstu3.model.Device src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Device tgt=new org.hl7.fhir.dstu2.model.Device();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setUdi(src.getUdiCarrier().getValue());
  tgt.setStatus(convertDeviceStatus(src.getStatus()));
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setLotNumber(src.getLotNumber());
  tgt.setManufacturer(src.getManufacturer());
  tgt.setManufactureDate(src.getManufactureDate());
  tgt.setExpiry(src.getExpirationDate());
  tgt.setModel(src.getModel());
  tgt.setVersion(src.getVersion());
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setOwner(convertReference(src.getOwner()));
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getContact())   tgt.addContact(convertContactPoint(t));
  tgt.setLocation(convertReference(src.getLocation()));
  tgt.setUrl(src.getUrl());
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNote())   tgt.addNote(convertAnnotation(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Device convertDevice(org.hl7.fhir.dstu3.model.Device src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Device tgt=new org.hl7.fhir.dstu2.model.Device();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setUdi(src.getUdiCarrier().getValue());
  tgt.setStatus(convertDeviceStatus(src.getStatus()));
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setLotNumber(src.getLotNumber());
  tgt.setManufacturer(src.getManufacturer());
  tgt.setManufactureDate(src.getManufactureDate());
  tgt.setExpiry(src.getExpirationDate());
  tgt.setModel(src.getModel());
  tgt.setVersion(src.getVersion());
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setOwner(convertReference(src.getOwner()));
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getContact())   tgt.addContact(convertContactPoint(t));
  tgt.setLocation(convertReference(src.getLocation()));
  tgt.setUrl(src.getUrl());
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNote())   tgt.addNote(convertAnnotation(t));
  return tgt;
}
Program: 23761
Project: 23761
Buggy source:
public org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent convertCodeSystemConcept(CodeSystem cs,ConceptDefinitionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent();
  copyElement(src,tgt);
  tgt.setAbstract(CodeSystemUtilities.isAbstract(cs,src));
  tgt.setCode(src.getCode());
  tgt.setDefinition(src.getDefinition());
  tgt.setDisplay(src.getDisplay());
  for (  ConceptDefinitionComponent cc : src.getConcept())   tgt.addConcept(convertCodeSystemConcept(cs,cc));
  for (  ConceptDefinitionDesignationComponent cc : src.getDesignation())   tgt.addDesignation(convertCodeSystemDesignation(cc));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent convertCodeSystemConcept(CodeSystem cs,ConceptDefinitionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionComponent();
  copyElement(src,tgt);
  tgt.setAbstract(CodeSystemUtilities.isAbstract(cs,src));
  tgt.setCode(src.getCode());
  tgt.setDefinition(src.getDefinition());
  tgt.setDisplay(src.getDisplay());
  for (  ConceptDefinitionComponent cc : src.getConcept())   tgt.addConcept(convertCodeSystemConcept(cs,cc));
  for (  ConceptDefinitionDesignationComponent cc : src.getDesignation())   tgt.addDesignation(convertCodeSystemDesignation(cc));
  return tgt;
}
Program: 23762
Project: 23762
Buggy source:
public org.hl7.fhir.dstu2.model.Period convertPeriod(org.hl7.fhir.dstu3.model.Period src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Period tgt=new org.hl7.fhir.dstu2.model.Period();
  copyElement(src,tgt);
  tgt.setStart(src.getStart());
  tgt.setEnd(src.getEnd());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Period convertPeriod(org.hl7.fhir.dstu3.model.Period src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Period tgt=new org.hl7.fhir.dstu2.model.Period();
  copyElement(src,tgt);
  tgt.setStart(src.getStart());
  tgt.setEnd(src.getEnd());
  return tgt;
}
Program: 23763
Project: 23763
Buggy source:
public org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.UriType t : src.getImport())   tgt.addImport(t.getValue());
  for (  org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getInclude())   tgt.addInclude(convertConceptSetComponent(t));
  for (  org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getExclude())   tgt.addExclude(convertConceptSetComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent convertValueSetComposeComponent(org.hl7.fhir.dstu3.model.ValueSet.ValueSetComposeComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ValueSetComposeComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.UriType t : src.getImport())   tgt.addImport(t.getValue());
  for (  org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getInclude())   tgt.addInclude(convertConceptSetComponent(t));
  for (  org.hl7.fhir.dstu3.model.ValueSet.ConceptSetComponent t : src.getExclude())   tgt.addExclude(convertConceptSetComponent(t));
  return tgt;
}
Program: 23764
Project: 23764
Buggy source:
public org.hl7.fhir.dstu2.model.VisionPrescription convertVisionPrescription(org.hl7.fhir.dstu3.model.VisionPrescription src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.VisionPrescription tgt=new org.hl7.fhir.dstu2.model.VisionPrescription();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setDateWritten(src.getDateWritten());
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setPrescriber(convertReference(src.getPrescriber()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setReason(convertType(src.getReason()));
  for (  org.hl7.fhir.dstu3.model.VisionPrescription.VisionPrescriptionDispenseComponent t : src.getDispense())   tgt.addDispense(convertVisionPrescriptionDispenseComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.VisionPrescription convertVisionPrescription(org.hl7.fhir.dstu3.model.VisionPrescription src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.VisionPrescription tgt=new org.hl7.fhir.dstu2.model.VisionPrescription();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setDateWritten(src.getDateWritten());
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setPrescriber(convertReference(src.getPrescriber()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setReason(convertType(src.getReason()));
  for (  org.hl7.fhir.dstu3.model.VisionPrescription.VisionPrescriptionDispenseComponent t : src.getDispense())   tgt.addDispense(convertVisionPrescriptionDispenseComponent(t));
  return tgt;
}
Program: 23765
Project: 23765
Buggy source:
public org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionSnapshotComponent convertStructureDefinitionSnapshotComponent(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionSnapshotComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionSnapshotComponent tgt=new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionSnapshotComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement())   tgt.addElement(convertElementDefinition(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionSnapshotComponent convertStructureDefinitionSnapshotComponent(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionSnapshotComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionSnapshotComponent tgt=new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionSnapshotComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement())   tgt.addElement(convertElementDefinition(t));
  return tgt;
}
Program: 23766
Project: 23766
Buggy source:
public org.hl7.fhir.dstu2.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.dstu3.model.CommunicationRequest src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.CommunicationRequest tgt=new org.hl7.fhir.dstu2.model.CommunicationRequest();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setCategory(convertCodeableConcept(src.getCategory()));
  tgt.setSender(convertReference(src.getSender()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getRecipient())   tgt.addRecipient(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload())   tgt.addPayload(convertCommunicationRequestPayloadComponent(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getMedium())   tgt.addMedium(convertCodeableConcept(t));
  tgt.setRequester(convertReference(src.getRequester()));
  tgt.setStatus(convertCommunicationRequestStatus(src.getStatus()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setScheduled(convertType(src.getScheduled()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())   tgt.addReason(convertCodeableConcept(t));
  tgt.setRequestedOn(src.getRequestedOn());
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setPriority(convertCodeableConcept(src.getPriority()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.CommunicationRequest convertCommunicationRequest(org.hl7.fhir.dstu3.model.CommunicationRequest src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.CommunicationRequest tgt=new org.hl7.fhir.dstu2.model.CommunicationRequest();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setCategory(convertCodeableConcept(src.getCategory()));
  tgt.setSender(convertReference(src.getSender()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getRecipient())   tgt.addRecipient(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestPayloadComponent t : src.getPayload())   tgt.addPayload(convertCommunicationRequestPayloadComponent(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getMedium())   tgt.addMedium(convertCodeableConcept(t));
  tgt.setRequester(convertReference(src.getRequester()));
  tgt.setStatus(convertCommunicationRequestStatus(src.getStatus()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setScheduled(convertType(src.getScheduled()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())   tgt.addReason(convertCodeableConcept(t));
  tgt.setRequestedOn(src.getRequestedOn());
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setPriority(convertCodeableConcept(src.getPriority()));
  return tgt;
}
Program: 23768
Project: 23768
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent convertTestScriptContactComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptContactComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent();
  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.TestScript.TestScriptContactComponent convertTestScriptContactComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptContactComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  return tgt;
}
Program: 23769
Project: 23769
Buggy source:
public org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionMappingComponent convertElementDefinitionMappingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionMappingComponent tgt=new org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionMappingComponent();
  copyElement(src,tgt);
  tgt.setIdentity(src.getIdentity());
  tgt.setLanguage(src.getLanguage());
  tgt.setMap(src.getMap());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionMappingComponent convertElementDefinitionMappingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionMappingComponent tgt=new org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionMappingComponent();
  copyElement(src,tgt);
  tgt.setIdentity(src.getIdentity());
  tgt.setLanguage(src.getLanguage());
  tgt.setMap(src.getMap());
  return tgt;
}
Program: 23770
Project: 23770
Buggy source:
public org.hl7.fhir.dstu2.model.Coding convertCoding(org.hl7.fhir.dstu3.model.Coding src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Coding tgt=new org.hl7.fhir.dstu2.model.Coding();
  copyElement(src,tgt);
  tgt.setSystem(src.getSystem());
  tgt.setVersion(src.getVersion());
  tgt.setCode(src.getCode());
  tgt.setDisplay(src.getDisplay());
  tgt.setUserSelected(src.getUserSelected());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Coding convertCoding(org.hl7.fhir.dstu3.model.Coding src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Coding tgt=new org.hl7.fhir.dstu2.model.Coding();
  copyElement(src,tgt);
  tgt.setSystem(src.getSystem());
  tgt.setVersion(src.getVersion());
  tgt.setCode(src.getCode());
  tgt.setDisplay(src.getDisplay());
  tgt.setUserSelected(src.getUserSelected());
  return tgt;
}
Program: 23771
Project: 23771
Buggy source:
public org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent();
  copyElement(src,tgt);
  tgt.setCode(src.getCode());
  tgt.setDisplay(src.getDisplay());
  for (  org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation())   tgt.addDesignation(convertConceptReferenceDesignationComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent convertConceptReferenceComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent();
  copyElement(src,tgt);
  tgt.setCode(src.getCode());
  tgt.setDisplay(src.getDisplay());
  for (  org.hl7.fhir.dstu3.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation())   tgt.addDesignation(convertConceptReferenceDesignationComponent(t));
  return tgt;
}
Program: 23772
Project: 23772
Buggy source:
public org.hl7.fhir.dstu2.model.RiskAssessment convertRiskAssessment(org.hl7.fhir.dstu3.model.RiskAssessment src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.RiskAssessment tgt=new org.hl7.fhir.dstu2.model.RiskAssessment();
  copyDomainResource(src,tgt);
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setCondition(convertReference(src.getCondition()));
  tgt.setEncounter(convertReference(src.getContext()));
  tgt.setPerformer(convertReference(src.getPerformer()));
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setMethod(convertCodeableConcept(src.getMethod()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getBasis())   tgt.addBasis(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction())   tgt.addPrediction(convertRiskAssessmentPredictionComponent(t));
  tgt.setMitigation(src.getMitigation());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.RiskAssessment convertRiskAssessment(org.hl7.fhir.dstu3.model.RiskAssessment src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.RiskAssessment tgt=new org.hl7.fhir.dstu2.model.RiskAssessment();
  copyDomainResource(src,tgt);
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setCondition(convertReference(src.getCondition()));
  tgt.setEncounter(convertReference(src.getContext()));
  tgt.setPerformer(convertReference(src.getPerformer()));
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setMethod(convertCodeableConcept(src.getMethod()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getBasis())   tgt.addBasis(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction())   tgt.addPrediction(convertRiskAssessmentPredictionComponent(t));
  tgt.setMitigation(src.getMitigation());
  return tgt;
}
Program: 23773
Project: 23773
Buggy source:
public org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceDocumentComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent();
  copyElement(src,tgt);
  tgt.setMode(convertDocumentMode(src.getMode()));
  tgt.setDocumentation(src.getDocumentation());
  tgt.setProfile(convertReference(src.getProfile()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent convertConformanceDocumentComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceDocumentComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceDocumentComponent();
  copyElement(src,tgt);
  tgt.setMode(convertDocumentMode(src.getMode()));
  tgt.setDocumentation(src.getDocumentation());
  tgt.setProfile(convertReference(src.getProfile()));
  return tgt;
}
Program: 23774
Project: 23774
Buggy source:
public org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent convertRiskAssessmentPredictionComponent(org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent tgt=new org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent();
  copyElement(src,tgt);
  tgt.setOutcome(convertCodeableConcept(src.getOutcome()));
  tgt.setProbability(convertType(src.getProbability()));
  tgt.setRelativeRisk(src.getRelativeRisk());
  tgt.setWhen(convertType(src.getWhen()));
  tgt.setRationale(src.getRationale());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent convertRiskAssessmentPredictionComponent(org.hl7.fhir.dstu3.model.RiskAssessment.RiskAssessmentPredictionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent tgt=new org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent();
  copyElement(src,tgt);
  tgt.setOutcome(convertCodeableConcept(src.getOutcome()));
  tgt.setProbability(convertType(src.getProbability()));
  tgt.setRelativeRisk(src.getRelativeRisk());
  tgt.setWhen(convertType(src.getWhen()));
  tgt.setRationale(src.getRationale());
  return tgt;
}
Program: 23776
Project: 23776
Buggy source:
public org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentRelatedAgentComponent convertProvenanceAgentRelatedAgentComponent(org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentRelatedAgentComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentRelatedAgentComponent tgt=new org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentRelatedAgentComponent();
  copyElement(src,tgt);
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setTarget(src.getTarget());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentRelatedAgentComponent convertProvenanceAgentRelatedAgentComponent(org.hl7.fhir.dstu3.model.Provenance.ProvenanceAgentRelatedAgentComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentRelatedAgentComponent tgt=new org.hl7.fhir.dstu2.model.Provenance.ProvenanceAgentRelatedAgentComponent();
  copyElement(src,tgt);
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setTarget(src.getTarget());
  return tgt;
}
Program: 23777
Project: 23777
Buggy source:
public static org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent convertQuestionnaireItemEnableWhenComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt=new org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent();
  copyElement(src,tgt);
  tgt.setQuestion(src.getQuestion());
  tgt.setAnswered(src.getHasAnswer());
  tgt.setAnswer(convertType(src.getAnswer()));
  return tgt;
}

Fixed version (ground truth):
public static org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent convertQuestionnaireItemEnableWhenComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent tgt=new org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemEnableWhenComponent();
  copyElement(src,tgt);
  tgt.setQuestion(src.getQuestion());
  tgt.setAnswered(src.getHasAnswer());
  tgt.setAnswer(convertType(src.getAnswer()));
  return tgt;
}
Program: 23778
Project: 23778
Buggy source:
public static org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent tgt=new org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent();
  copyElement(src,tgt);
  tgt.setType(convertNamingSystemIdentifierType(src.getType()));
  tgt.setValue(src.getValue());
  tgt.setPreferred(src.getPreferred());
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}

Fixed version (ground truth):
public static org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent convertNamingSystemUniqueIdComponent(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemUniqueIdComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent tgt=new org.hl7.fhir.dstu2016may.model.NamingSystem.NamingSystemUniqueIdComponent();
  copyElement(src,tgt);
  tgt.setType(convertNamingSystemIdentifierType(src.getType()));
  tgt.setValue(src.getValue());
  tgt.setPreferred(src.getPreferred());
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}