nus-yam/ex-repair huggingface dataset:
Program: 23552
Project: 23552
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationComponent();
  copyElement(src,tgt);
  tgt.setType(convertCoding(src.getType()));
  tgt.setResource(src.getResource());
  tgt.setLabel(src.getLabel());
  tgt.setDescription(src.getDescription());
  tgt.setAccept(convertContentType(src.getAccept()));
  tgt.setContentType(convertContentType(src.getContentType()));
  tgt.setDestination(src.getDestination());
  tgt.setEncodeRequestUrl(src.getEncodeRequestUrl());
  tgt.setParams(src.getParams());
  for (  org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader())   tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t));
  tgt.setResponseId(src.getResponseId());
  tgt.setSourceId(src.getSourceId());
  tgt.setTargetId(src.getTargetId());
  tgt.setUrl(src.getUrl());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationComponent convertSetupActionOperationComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationComponent();
  copyElement(src,tgt);
  tgt.setType(convertCoding(src.getType()));
  tgt.setResource(src.getResource());
  tgt.setLabel(src.getLabel());
  tgt.setDescription(src.getDescription());
  tgt.setAccept(convertContentType(src.getAccept()));
  tgt.setContentType(convertContentType(src.getContentType()));
  tgt.setDestination(src.getDestination());
  tgt.setEncodeRequestUrl(src.getEncodeRequestUrl());
  tgt.setParams(src.getParams());
  for (  org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader())   tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t));
  tgt.setResponseId(src.getResponseId());
  tgt.setSourceId(src.getSourceId());
  tgt.setTargetId(src.getTargetId());
  tgt.setUrl(src.getUrl());
  return tgt;
}
Program: 23553
Project: 23553
Buggy source:
public org.hl7.fhir.dstu2.model.Meta convertMeta(org.hl7.fhir.dstu3.model.Meta src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Meta tgt=new org.hl7.fhir.dstu2.model.Meta();
  copyElement(src,tgt);
  tgt.setVersionId(src.getVersionId());
  tgt.setLastUpdated(src.getLastUpdated());
  for (  org.hl7.fhir.dstu3.model.UriType t : src.getProfile())   tgt.addProfile(t.getValue());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getSecurity())   tgt.addSecurity(convertCoding(t));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getTag())   tgt.addTag(convertCoding(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Meta convertMeta(org.hl7.fhir.dstu3.model.Meta src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Meta tgt=new org.hl7.fhir.dstu2.model.Meta();
  copyElement(src,tgt);
  tgt.setVersionId(src.getVersionId());
  tgt.setLastUpdated(src.getLastUpdated());
  for (  org.hl7.fhir.dstu3.model.UriType t : src.getProfile())   tgt.addProfile(t.getValue());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getSecurity())   tgt.addSecurity(convertCoding(t));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getTag())   tgt.addTag(convertCoding(t));
  return tgt;
}
Program: 23555
Project: 23555
Buggy source:
public org.hl7.fhir.dstu2.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.dstu3.model.Patient.ContactComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Patient.ContactComponent tgt=new org.hl7.fhir.dstu2.model.Patient.ContactComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRelationship())   tgt.addRelationship(convertCodeableConcept(t));
  tgt.setName(convertHumanName(src.getName()));
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  tgt.setAddress(convertAddress(src.getAddress()));
  tgt.setGender(convertAdministrativeGender(src.getGender()));
  tgt.setOrganization(convertReference(src.getOrganization()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Patient.ContactComponent convertContactComponent(org.hl7.fhir.dstu3.model.Patient.ContactComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Patient.ContactComponent tgt=new org.hl7.fhir.dstu2.model.Patient.ContactComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRelationship())   tgt.addRelationship(convertCodeableConcept(t));
  tgt.setName(convertHumanName(src.getName()));
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  tgt.setAddress(convertAddress(src.getAddress()));
  tgt.setGender(convertAdministrativeGender(src.getGender()));
  tgt.setOrganization(convertReference(src.getOrganization()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}
Program: 23556
Project: 23556
Buggy source:
public org.hl7.fhir.dstu3.model.ExplanationOfBenefit convertExplanationOfBenefit(org.hl7.fhir.dstu2.model.ExplanationOfBenefit src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu3.model.ExplanationOfBenefit tgt=new org.hl7.fhir.dstu3.model.ExplanationOfBenefit();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setRuleset(convertCoding(src.getRuleset()));
  tgt.setOriginalRuleset(convertCoding(src.getOriginalRuleset()));
  tgt.setCreated(src.getCreated());
  tgt.setDisposition(src.getDisposition());
  tgt.setOrganization(convertType(src.getOrganization()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu3.model.ExplanationOfBenefit convertExplanationOfBenefit(org.hl7.fhir.dstu2.model.ExplanationOfBenefit src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu3.model.ExplanationOfBenefit tgt=new org.hl7.fhir.dstu3.model.ExplanationOfBenefit();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setRuleset(convertCoding(src.getRuleset()));
  tgt.setOriginalRuleset(convertCoding(src.getOriginalRuleset()));
  tgt.setCreated(src.getCreated());
  tgt.setDisposition(src.getDisposition());
  tgt.setOrganization(convertType(src.getOrganization()));
  return tgt;
}
Program: 23558
Project: 23558
Buggy source:
public org.hl7.fhir.dstu2.model.Media convertMedia(org.hl7.fhir.dstu3.model.Media src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Media tgt=new org.hl7.fhir.dstu2.model.Media();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setType(convertDigitalMediaType(src.getType()));
  tgt.setSubtype(convertCodeableConcept(src.getSubtype()));
  tgt.setView(convertCodeableConcept(src.getView()));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setOperator(convertReference(src.getOperator()));
  tgt.setDeviceName(src.getDeviceName());
  tgt.setHeight(src.getHeight());
  tgt.setWidth(src.getWidth());
  tgt.setFrames(src.getFrames());
  tgt.setDuration(src.getDuration());
  tgt.setContent(convertAttachment(src.getContent()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Media convertMedia(org.hl7.fhir.dstu3.model.Media src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Media tgt=new org.hl7.fhir.dstu2.model.Media();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setType(convertDigitalMediaType(src.getType()));
  tgt.setSubtype(convertCodeableConcept(src.getSubtype()));
  tgt.setView(convertCodeableConcept(src.getView()));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setOperator(convertReference(src.getOperator()));
  tgt.setDeviceName(src.getDeviceName());
  tgt.setHeight(src.getHeight());
  tgt.setWidth(src.getWidth());
  tgt.setFrames(src.getFrames());
  tgt.setDuration(src.getDuration());
  tgt.setContent(convertAttachment(src.getContent()));
  return tgt;
}
Program: 23559
Project: 23559
Buggy source:
public org.hl7.fhir.dstu2.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.dstu3.model.OperationDefinition src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.OperationDefinition tgt=new org.hl7.fhir.dstu2.model.OperationDefinition();
  copyDomainResource(src,tgt);
  tgt.setUrl(src.getUrl());
  tgt.setVersion(src.getVersion());
  tgt.setName(src.getName());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  tgt.setKind(convertOperationKind(src.getKind()));
  tgt.setExperimental(src.getExperimental());
  tgt.setDate(src.getDate());
  tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact())   tgt.addContact(convertOperationDefinitionContactComponent(t));
  tgt.setDescription(src.getDescription());
  tgt.setRequirements(src.getRequirements());
  tgt.setIdempotent(src.getIdempotent());
  tgt.setCode(src.getCode());
  tgt.setNotes(src.getComment());
  tgt.setBase(convertReference(src.getBase()));
  tgt.setSystem(src.getSystem());
  for (  org.hl7.fhir.dstu3.model.CodeType t : src.getType())   tgt.addType(t.getValue());
  tgt.setInstance(src.getInstance());
  for (  org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter())   tgt.addParameter(convertOperationDefinitionParameterComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.OperationDefinition convertOperationDefinition(org.hl7.fhir.dstu3.model.OperationDefinition src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.OperationDefinition tgt=new org.hl7.fhir.dstu2.model.OperationDefinition();
  copyDomainResource(src,tgt);
  tgt.setUrl(src.getUrl());
  tgt.setVersion(src.getVersion());
  tgt.setName(src.getName());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  tgt.setKind(convertOperationKind(src.getKind()));
  tgt.setExperimental(src.getExperimental());
  tgt.setDate(src.getDate());
  tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact())   tgt.addContact(convertOperationDefinitionContactComponent(t));
  tgt.setDescription(src.getDescription());
  tgt.setRequirements(src.getRequirements());
  tgt.setIdempotent(src.getIdempotent());
  tgt.setCode(src.getCode());
  tgt.setNotes(src.getComment());
  tgt.setBase(convertReference(src.getBase()));
  tgt.setSystem(src.getSystem());
  for (  org.hl7.fhir.dstu3.model.CodeType t : src.getType())   tgt.addType(t.getValue());
  tgt.setInstance(src.getInstance());
  for (  org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter())   tgt.addParameter(convertOperationDefinitionParameterComponent(t));
  return tgt;
}
Program: 23560
Project: 23560
Buggy source:
public org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent convertNamingSystemContactComponent(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemContactComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent tgt=new org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent();
  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.NamingSystem.NamingSystemContactComponent convertNamingSystemContactComponent(org.hl7.fhir.dstu3.model.NamingSystem.NamingSystemContactComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent tgt=new org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  return tgt;
}
Program: 23561
Project: 23561
Buggy source:
public org.hl7.fhir.dstu2.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.dstu3.model.Composition.SectionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Composition.SectionComponent tgt=new org.hl7.fhir.dstu2.model.Composition.SectionComponent();
  copyElement(src,tgt);
  tgt.setTitle(src.getTitle());
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setText(convertNarrative(src.getText()));
  tgt.setMode(src.getMode().toCode());
  tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getEntry())   tgt.addEntry(convertReference(t));
  tgt.setEmptyReason(convertCodeableConcept(src.getEmptyReason()));
  for (  org.hl7.fhir.dstu3.model.Composition.SectionComponent t : src.getSection())   tgt.addSection(convertSectionComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Composition.SectionComponent convertSectionComponent(org.hl7.fhir.dstu3.model.Composition.SectionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Composition.SectionComponent tgt=new org.hl7.fhir.dstu2.model.Composition.SectionComponent();
  copyElement(src,tgt);
  tgt.setTitle(src.getTitle());
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setText(convertNarrative(src.getText()));
  tgt.setMode(src.getMode().toCode());
  tgt.setOrderedBy(convertCodeableConcept(src.getOrderedBy()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getEntry())   tgt.addEntry(convertReference(t));
  tgt.setEmptyReason(convertCodeableConcept(src.getEmptyReason()));
  for (  org.hl7.fhir.dstu3.model.Composition.SectionComponent t : src.getSection())   tgt.addSection(convertSectionComponent(t));
  return tgt;
}
Program: 23562
Project: 23562
Buggy source:
public org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt=new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek> t : src.getDaysOfWeek())   tgt.addDaysOfWeek(convertDaysOfWeek(t.getValue()));
  tgt.setAllDay(src.getAllDay());
  tgt.setAvailableStartTime(src.getAvailableStartTime());
  tgt.setAvailableEndTime(src.getAvailableEndTime());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent convertHealthcareServiceAvailableTimeComponent(org.hl7.fhir.dstu3.model.HealthcareService.HealthcareServiceAvailableTimeComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent tgt=new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.HealthcareService.DaysOfWeek> t : src.getDaysOfWeek())   tgt.addDaysOfWeek(convertDaysOfWeek(t.getValue()));
  tgt.setAllDay(src.getAllDay());
  tgt.setAvailableStartTime(src.getAvailableStartTime());
  tgt.setAvailableEndTime(src.getAvailableEndTime());
  return tgt;
}
Program: 23563
Project: 23563
Buggy source:
public org.hl7.fhir.dstu2.model.EnrollmentResponse convertEnrollmentResponse(org.hl7.fhir.dstu3.model.EnrollmentResponse src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.EnrollmentResponse tgt=new org.hl7.fhir.dstu2.model.EnrollmentResponse();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setDisposition(src.getDisposition());
  tgt.setRuleset(convertCoding(src.getRuleset()));
  tgt.setOriginalRuleset(convertCoding(src.getOriginalRuleset()));
  tgt.setCreated(src.getCreated());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.EnrollmentResponse convertEnrollmentResponse(org.hl7.fhir.dstu3.model.EnrollmentResponse src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.EnrollmentResponse tgt=new org.hl7.fhir.dstu2.model.EnrollmentResponse();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setDisposition(src.getDisposition());
  tgt.setRuleset(convertCoding(src.getRuleset()));
  tgt.setOriginalRuleset(convertCoding(src.getOriginalRuleset()));
  tgt.setCreated(src.getCreated());
  return tgt;
}
Program: 23564
Project: 23564
Buggy source:
public org.hl7.fhir.dstu2.model.Goal.GoalOutcomeComponent convertGoalOutcomeComponent(org.hl7.fhir.dstu3.model.Goal.GoalOutcomeComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Goal.GoalOutcomeComponent tgt=new org.hl7.fhir.dstu2.model.Goal.GoalOutcomeComponent();
  copyElement(src,tgt);
  tgt.setResult(convertType(src.getResult()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Goal.GoalOutcomeComponent convertGoalOutcomeComponent(org.hl7.fhir.dstu3.model.Goal.GoalOutcomeComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Goal.GoalOutcomeComponent tgt=new org.hl7.fhir.dstu2.model.Goal.GoalOutcomeComponent();
  copyElement(src,tgt);
  tgt.setResult(convertType(src.getResult()));
  return tgt;
}
Program: 23565
Project: 23565
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionComponent convertSetupActionComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionComponent();
  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.TestScriptSetupActionComponent convertSetupActionComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionComponent();
  copyElement(src,tgt);
  tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
  tgt.setAssert(convertSetupActionAssertComponent(src.getAssert()));
  return tgt;
}
Program: 23566
Project: 23566
Buggy source:
public org.hl7.fhir.dstu2.model.Address convertAddress(org.hl7.fhir.dstu3.model.Address src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Address tgt=new org.hl7.fhir.dstu2.model.Address();
  copyElement(src,tgt);
  tgt.setUse(convertAddressUse(src.getUse()));
  tgt.setType(convertAddressType(src.getType()));
  tgt.setText(src.getText());
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getLine())   tgt.addLine(t.getValue());
  tgt.setCity(src.getCity());
  tgt.setDistrict(src.getDistrict());
  tgt.setState(src.getState());
  tgt.setPostalCode(src.getPostalCode());
  tgt.setCountry(src.getCountry());
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Address convertAddress(org.hl7.fhir.dstu3.model.Address src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Address tgt=new org.hl7.fhir.dstu2.model.Address();
  copyElement(src,tgt);
  tgt.setUse(convertAddressUse(src.getUse()));
  tgt.setType(convertAddressType(src.getType()));
  tgt.setText(src.getText());
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getLine())   tgt.addLine(t.getValue());
  tgt.setCity(src.getCity());
  tgt.setDistrict(src.getDistrict());
  tgt.setState(src.getState());
  tgt.setPostalCode(src.getPostalCode());
  tgt.setCountry(src.getCountry());
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}
Program: 23567
Project: 23567
Buggy source:
public org.hl7.fhir.dstu2.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.dstu3.model.Patient.AnimalComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Patient.AnimalComponent tgt=new org.hl7.fhir.dstu2.model.Patient.AnimalComponent();
  copyElement(src,tgt);
  tgt.setSpecies(convertCodeableConcept(src.getSpecies()));
  tgt.setBreed(convertCodeableConcept(src.getBreed()));
  tgt.setGenderStatus(convertCodeableConcept(src.getGenderStatus()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Patient.AnimalComponent convertAnimalComponent(org.hl7.fhir.dstu3.model.Patient.AnimalComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Patient.AnimalComponent tgt=new org.hl7.fhir.dstu2.model.Patient.AnimalComponent();
  copyElement(src,tgt);
  tgt.setSpecies(convertCodeableConcept(src.getSpecies()));
  tgt.setBreed(convertCodeableConcept(src.getBreed()));
  tgt.setGenderStatus(convertCodeableConcept(src.getGenderStatus()));
  return tgt;
}
Program: 23568
Project: 23568
Buggy source:
public org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietComponent convertNutritionOrderOralDietComponent(org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestOralDietComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietComponent tgt=new org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType())   tgt.addType(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.Timing t : src.getSchedule())   tgt.addSchedule(convertTiming(t));
  for (  org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestOralDietNutrientComponent t : src.getNutrient())   tgt.addNutrient(convertNutritionOrderOralDietNutrientComponent(t));
  for (  org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestOralDietTextureComponent t : src.getTexture())   tgt.addTexture(convertNutritionOrderOralDietTextureComponent(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getFluidConsistencyType())   tgt.addFluidConsistencyType(convertCodeableConcept(t));
  tgt.setInstruction(src.getInstruction());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietComponent convertNutritionOrderOralDietComponent(org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestOralDietComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietComponent tgt=new org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType())   tgt.addType(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.Timing t : src.getSchedule())   tgt.addSchedule(convertTiming(t));
  for (  org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestOralDietNutrientComponent t : src.getNutrient())   tgt.addNutrient(convertNutritionOrderOralDietNutrientComponent(t));
  for (  org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestOralDietTextureComponent t : src.getTexture())   tgt.addTexture(convertNutritionOrderOralDietTextureComponent(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getFluidConsistencyType())   tgt.addFluidConsistencyType(convertCodeableConcept(t));
  tgt.setInstruction(src.getInstruction());
  return tgt;
}
Program: 23569
Project: 23569
Buggy source:
public org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent convertQuestionnaireResponseItemAnswerComponent(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent tgt=new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent();
  copyElement(src,tgt);
  tgt.setValue(convertType(src.getValue()));
  for (  org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem())   tgt.addGroup(convertQuestionnaireItemToGroup(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent convertQuestionnaireResponseItemAnswerComponent(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent tgt=new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent();
  copyElement(src,tgt);
  tgt.setValue(convertType(src.getValue()));
  for (  org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem())   tgt.addGroup(convertQuestionnaireItemToGroup(t));
  return tgt;
}
Program: 23570
Project: 23570
Buggy source:
public org.hl7.fhir.dstu2.model.Reference convertReference(org.hl7.fhir.dstu3.model.Reference src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Reference tgt=new org.hl7.fhir.dstu2.model.Reference();
  copyElement(src,tgt);
  tgt.setReference(src.getReference());
  tgt.setDisplay(src.getDisplay());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Reference convertReference(org.hl7.fhir.dstu3.model.Reference src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Reference tgt=new org.hl7.fhir.dstu2.model.Reference();
  copyElement(src,tgt);
  tgt.setReference(src.getReference());
  tgt.setDisplay(src.getDisplay());
  return tgt;
}
Program: 23571
Project: 23571
Buggy source:
public org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.dstu3.model.Communication.CommunicationPayloadComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent tgt=new org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent();
  copyElement(src,tgt);
  tgt.setContent(convertType(src.getContent()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent convertCommunicationPayloadComponent(org.hl7.fhir.dstu3.model.Communication.CommunicationPayloadComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent tgt=new org.hl7.fhir.dstu2.model.Communication.CommunicationPayloadComponent();
  copyElement(src,tgt);
  tgt.setContent(convertType(src.getContent()));
  return tgt;
}
Program: 23572
Project: 23572
Buggy source:
public org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceRestResourceComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent();
  copyElement(src,tgt);
  tgt.setType(src.getType());
  tgt.setProfile(convertReference(src.getProfile()));
  for (  org.hl7.fhir.dstu3.model.Conformance.ResourceInteractionComponent t : src.getInteraction())   tgt.addInteraction(convertResourceInteractionComponent(t));
  tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning()));
  tgt.setReadHistory(src.getReadHistory());
  tgt.setUpdateCreate(src.getUpdateCreate());
  tgt.setConditionalCreate(src.getConditionalCreate());
  tgt.setConditionalUpdate(src.getConditionalUpdate());
  tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete()));
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getSearchInclude())   tgt.addSearchInclude(t.getValue());
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getSearchRevInclude())   tgt.addSearchRevInclude(t.getValue());
  for (  org.hl7.fhir.dstu3.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam())   tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent convertConformanceRestResourceComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceRestResourceComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceComponent();
  copyElement(src,tgt);
  tgt.setType(src.getType());
  tgt.setProfile(convertReference(src.getProfile()));
  for (  org.hl7.fhir.dstu3.model.Conformance.ResourceInteractionComponent t : src.getInteraction())   tgt.addInteraction(convertResourceInteractionComponent(t));
  tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning()));
  tgt.setReadHistory(src.getReadHistory());
  tgt.setUpdateCreate(src.getUpdateCreate());
  tgt.setConditionalCreate(src.getConditionalCreate());
  tgt.setConditionalUpdate(src.getConditionalUpdate());
  tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete()));
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getSearchInclude())   tgt.addSearchInclude(t.getValue());
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getSearchRevInclude())   tgt.addSearchRevInclude(t.getValue());
  for (  org.hl7.fhir.dstu3.model.Conformance.ConformanceRestResourceSearchParamComponent t : src.getSearchParam())   tgt.addSearchParam(convertConformanceRestResourceSearchParamComponent(t));
  return tgt;
}
Program: 23573
Project: 23573
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent();
  copyElement(src,tgt);
  tgt.setField(src.getField());
  tgt.setValue(src.getValue());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent convertSetupActionOperationRequestHeaderComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionOperationRequestHeaderComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent();
  copyElement(src,tgt);
  tgt.setField(src.getField());
  tgt.setValue(src.getValue());
  return tgt;
}
Program: 23575
Project: 23575
Buggy source:
public org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseQuestionComponent(org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt=new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent();
  copyElement(src,tgt);
  tgt.setLinkId(src.getLinkId());
  tgt.setText(src.getText());
  for (  org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent t : src.getAnswer())   tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent convertQuestionnaireResponseQuestionComponent(org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt=new org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent();
  copyElement(src,tgt);
  tgt.setLinkId(src.getLinkId());
  tgt.setText(src.getText());
  for (  org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent t : src.getAnswer())   tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t));
  return tgt;
}
Program: 23576
Project: 23576
Buggy source:
public org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent convertObservationRelatedComponent(org.hl7.fhir.dstu3.model.Observation.ObservationRelatedComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent tgt=new org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent();
  copyElement(src,tgt);
  tgt.setType(convertObservationRelationshipType(src.getType()));
  tgt.setTarget(convertReference(src.getTarget()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent convertObservationRelatedComponent(org.hl7.fhir.dstu3.model.Observation.ObservationRelatedComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent tgt=new org.hl7.fhir.dstu2.model.Observation.ObservationRelatedComponent();
  copyElement(src,tgt);
  tgt.setType(convertObservationRelationshipType(src.getType()));
  tgt.setTarget(convertReference(src.getTarget()));
  return tgt;
}
Program: 23577
Project: 23577
Buggy source:
public org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent tgt=new org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent();
  copyElement(src,tgt);
  if (src.hasItemReference())   tgt.setItem((org.hl7.fhir.dstu2.model.Reference)convertType(src.getItem()));
  tgt.setAmount(convertSimpleQuantity(src.getAmount()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent convertMedicationPackageContentComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent tgt=new org.hl7.fhir.dstu2.model.Medication.MedicationPackageContentComponent();
  copyElement(src,tgt);
  if (src.hasItemReference())   tgt.setItem((org.hl7.fhir.dstu2.model.Reference)convertType(src.getItem()));
  tgt.setAmount(convertSimpleQuantity(src.getAmount()));
  return tgt;
}
Program: 23579
Project: 23579
Buggy source:
public org.hl7.fhir.dstu2.model.Questionnaire convertQuestionnaire(org.hl7.fhir.dstu3.model.Questionnaire src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Questionnaire tgt=new org.hl7.fhir.dstu2.model.Questionnaire();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setVersion(src.getVersion());
  tgt.setStatus(convertQuestionnaireStatus(src.getStatus()));
  tgt.setDate(src.getDate());
  tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent root=tgt.getGroup();
  root.setTitle(src.getTitle());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getConcept()) {
    root.addConcept(convertCoding(t));
  }
  for (  org.hl7.fhir.dstu3.model.CodeType t : src.getSubjectType())   tgt.addSubjectType(t.getValue());
  for (  org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent t : src.getItem())   if (t.getType() == org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.GROUP)   root.addGroup(convertQuestionnaireGroupComponent(t));
 else   root.addQuestion(convertQuestionnaireQuestionComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Questionnaire convertQuestionnaire(org.hl7.fhir.dstu3.model.Questionnaire src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Questionnaire tgt=new org.hl7.fhir.dstu2.model.Questionnaire();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setVersion(src.getVersion());
  tgt.setStatus(convertQuestionnaireStatus(src.getStatus()));
  tgt.setDate(src.getDate());
  tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent root=tgt.getGroup();
  root.setTitle(src.getTitle());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getConcept()) {
    root.addConcept(convertCoding(t));
  }
  for (  org.hl7.fhir.dstu3.model.CodeType t : src.getSubjectType())   tgt.addSubjectType(t.getValue());
  for (  org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent t : src.getItem())   if (t.getType() == org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemType.GROUP)   root.addGroup(convertQuestionnaireGroupComponent(t));
 else   root.addQuestion(convertQuestionnaireQuestionComponent(t));
  return tgt;
}
Program: 23580
Project: 23580
Buggy source:
public org.hl7.fhir.dstu2.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.dstu3.model.DeviceMetric src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DeviceMetric tgt=new org.hl7.fhir.dstu2.model.DeviceMetric();
  copyDomainResource(src,tgt);
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setUnit(convertCodeableConcept(src.getUnit()));
  tgt.setSource(convertReference(src.getSource()));
  tgt.setParent(convertReference(src.getParent()));
  tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus()));
  tgt.setColor(convertDeviceMetricColor(src.getColor()));
  tgt.setCategory(convertDeviceMetricCategory(src.getCategory()));
  tgt.setMeasurementPeriod(convertTiming(src.getMeasurementPeriod()));
  for (  org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration())   tgt.addCalibration(convertDeviceMetricCalibrationComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DeviceMetric convertDeviceMetric(org.hl7.fhir.dstu3.model.DeviceMetric src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DeviceMetric tgt=new org.hl7.fhir.dstu2.model.DeviceMetric();
  copyDomainResource(src,tgt);
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setUnit(convertCodeableConcept(src.getUnit()));
  tgt.setSource(convertReference(src.getSource()));
  tgt.setParent(convertReference(src.getParent()));
  tgt.setOperationalStatus(convertDeviceMetricOperationalStatus(src.getOperationalStatus()));
  tgt.setColor(convertDeviceMetricColor(src.getColor()));
  tgt.setCategory(convertDeviceMetricCategory(src.getCategory()));
  tgt.setMeasurementPeriod(convertTiming(src.getMeasurementPeriod()));
  for (  org.hl7.fhir.dstu3.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration())   tgt.addCalibration(convertDeviceMetricCalibrationComponent(t));
  return tgt;
}
Program: 23581
Project: 23581
Buggy source:
public org.hl7.fhir.dstu2.model.PaymentReconciliation.NotesComponent convertNotesComponent(org.hl7.fhir.dstu3.model.PaymentReconciliation.NotesComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.PaymentReconciliation.NotesComponent tgt=new org.hl7.fhir.dstu2.model.PaymentReconciliation.NotesComponent();
  copyElement(src,tgt);
  tgt.setType(convertCoding(src.getType()));
  tgt.setText(src.getText());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.PaymentReconciliation.NotesComponent convertNotesComponent(org.hl7.fhir.dstu3.model.PaymentReconciliation.NotesComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.PaymentReconciliation.NotesComponent tgt=new org.hl7.fhir.dstu2.model.PaymentReconciliation.NotesComponent();
  copyElement(src,tgt);
  tgt.setType(convertCoding(src.getType()));
  tgt.setText(src.getText());
  return tgt;
}
Program: 23582
Project: 23582
Buggy source:
public org.hl7.fhir.dstu2.model.ContactPoint convertContactPoint(org.hl7.fhir.dstu3.model.ContactPoint src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ContactPoint tgt=new org.hl7.fhir.dstu2.model.ContactPoint();
  copyElement(src,tgt);
  tgt.setSystem(convertContactPointSystem(src.getSystem()));
  tgt.setValue(src.getValue());
  tgt.setUse(convertContactPointUse(src.getUse()));
  tgt.setRank(src.getRank());
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ContactPoint convertContactPoint(org.hl7.fhir.dstu3.model.ContactPoint src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ContactPoint tgt=new org.hl7.fhir.dstu2.model.ContactPoint();
  copyElement(src,tgt);
  tgt.setSystem(convertContactPointSystem(src.getSystem()));
  tgt.setValue(src.getValue());
  tgt.setUse(convertContactPointUse(src.getUse()));
  tgt.setRank(src.getRank());
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}
Program: 23583
Project: 23583
Buggy source:
public org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingEventComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCoding(src.getCode()));
  tgt.setCategory(convertMessageSignificanceCategory(src.getCategory()));
  tgt.setMode(convertConformanceEventMode(src.getMode()));
  tgt.setFocus(src.getFocus());
  tgt.setRequest(convertReference(src.getRequest()));
  tgt.setResponse(convertReference(src.getResponse()));
  tgt.setDocumentation(src.getDocumentation());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent convertConformanceMessagingEventComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingEventComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCoding(src.getCode()));
  tgt.setCategory(convertMessageSignificanceCategory(src.getCategory()));
  tgt.setMode(convertConformanceEventMode(src.getMode()));
  tgt.setFocus(src.getFocus());
  tgt.setRequest(convertReference(src.getRequest()));
  tgt.setResponse(convertReference(src.getResponse()));
  tgt.setDocumentation(src.getDocumentation());
  return tgt;
}
Program: 23584
Project: 23584
Buggy source:
public org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent convertDocumentManifestContentComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent tgt=new org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent();
  copyElement(src,tgt);
  tgt.setP(convertType(src.getP()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent convertDocumentManifestContentComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent tgt=new org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestContentComponent();
  copyElement(src,tgt);
  tgt.setP(convertType(src.getP()));
  return tgt;
}
Program: 23585
Project: 23585
Buggy source:
public org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent convertObservationReferenceRangeComponent(org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent tgt=new org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent();
  copyElement(src,tgt);
  tgt.setLow(convertSimpleQuantity(src.getLow()));
  tgt.setHigh(convertSimpleQuantity(src.getHigh()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept c : src.getMeaning())   tgt.setMeaning(convertCodeableConcept(c));
  tgt.setAge(convertRange(src.getAge()));
  tgt.setText(src.getText());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent convertObservationReferenceRangeComponent(org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent tgt=new org.hl7.fhir.dstu2.model.Observation.ObservationReferenceRangeComponent();
  copyElement(src,tgt);
  tgt.setLow(convertSimpleQuantity(src.getLow()));
  tgt.setHigh(convertSimpleQuantity(src.getHigh()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept c : src.getMeaning())   tgt.setMeaning(convertCodeableConcept(c));
  tgt.setAge(convertRange(src.getAge()));
  tgt.setText(src.getText());
  return tgt;
}