nus-yam/ex-repair huggingface dataset:
Program: 23679
Project: 23679
Buggy source:
public org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent convertConformanceContactComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceContactComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent();
  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.Conformance.ConformanceContactComponent convertConformanceContactComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceContactComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  return tgt;
}
Program: 23680
Project: 23680
Buggy source:
public org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.dstu3.model.Appointment.AppointmentParticipantComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent tgt=new org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType())   tgt.addType(convertCodeableConcept(t));
  tgt.setActor(convertReference(src.getActor()));
  tgt.setRequired(convertParticipantRequired(src.getRequired()));
  tgt.setStatus(convertParticipationStatus(src.getStatus()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent convertAppointmentParticipantComponent(org.hl7.fhir.dstu3.model.Appointment.AppointmentParticipantComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent tgt=new org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType())   tgt.addType(convertCodeableConcept(t));
  tgt.setActor(convertReference(src.getActor()));
  tgt.setRequired(convertParticipantRequired(src.getRequired()));
  tgt.setStatus(convertParticipationStatus(src.getStatus()));
  return tgt;
}
Program: 23681
Project: 23681
Buggy source:
public org.hl7.fhir.dstu2.model.Communication convertCommunication(org.hl7.fhir.dstu3.model.Communication src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Communication tgt=new org.hl7.fhir.dstu2.model.Communication();
  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.Communication.CommunicationPayloadComponent t : src.getPayload())   tgt.addPayload(convertCommunicationPayloadComponent(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getMedium())   tgt.addMedium(convertCodeableConcept(t));
  tgt.setStatus(convertCommunicationStatus(src.getStatus()));
  tgt.setEncounter(convertReference(src.getContext()));
  tgt.setSent(src.getSent());
  tgt.setReceived(src.getReceived());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())   tgt.addReason(convertCodeableConcept(t));
  tgt.setSubject(convertReference(src.getSubject()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Communication convertCommunication(org.hl7.fhir.dstu3.model.Communication src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Communication tgt=new org.hl7.fhir.dstu2.model.Communication();
  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.Communication.CommunicationPayloadComponent t : src.getPayload())   tgt.addPayload(convertCommunicationPayloadComponent(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getMedium())   tgt.addMedium(convertCodeableConcept(t));
  tgt.setStatus(convertCommunicationStatus(src.getStatus()));
  tgt.setEncounter(convertReference(src.getContext()));
  tgt.setSent(src.getSent());
  tgt.setReceived(src.getReceived());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())   tgt.addReason(convertCodeableConcept(t));
  tgt.setSubject(convertReference(src.getSubject()));
  return tgt;
}
Program: 23683
Project: 23683
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.TestScript.TestActionComponent t : src.getAction())   tgt.addAction(convertTestActionComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent convertTestScriptTestComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.TestScript.TestActionComponent t : src.getAction())   tgt.addAction(convertTestActionComponent(t));
  return tgt;
}
Program: 23684
Project: 23684
Buggy source:
public org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderSupplementComponent convertNutritionOrderSupplementComponent(org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestSupplementComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderSupplementComponent tgt=new org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderSupplementComponent();
  copyElement(src,tgt);
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setProductName(src.getProductName());
  for (  org.hl7.fhir.dstu3.model.Timing t : src.getSchedule())   tgt.addSchedule(convertTiming(t));
  tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
  tgt.setInstruction(src.getInstruction());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderSupplementComponent convertNutritionOrderSupplementComponent(org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestSupplementComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderSupplementComponent tgt=new org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderSupplementComponent();
  copyElement(src,tgt);
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setProductName(src.getProductName());
  for (  org.hl7.fhir.dstu3.model.Timing t : src.getSchedule())   tgt.addSchedule(convertTiming(t));
  tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
  tgt.setInstruction(src.getInstruction());
  return tgt;
}
Program: 23685
Project: 23685
Buggy source:
public org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent convertPatientLinkComponent(org.hl7.fhir.dstu3.model.Patient.PatientLinkComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent tgt=new org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent();
  copyElement(src,tgt);
  tgt.setOther(convertReference(src.getOther()));
  tgt.setType(convertLinkType(src.getType()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent convertPatientLinkComponent(org.hl7.fhir.dstu3.model.Patient.PatientLinkComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent tgt=new org.hl7.fhir.dstu2.model.Patient.PatientLinkComponent();
  copyElement(src,tgt);
  tgt.setOther(convertReference(src.getOther()));
  tgt.setType(convertLinkType(src.getType()));
  return tgt;
}
Program: 23686
Project: 23686
Buggy source:
public org.hl7.fhir.dstu2.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.dstu3.model.DeviceUseStatement src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DeviceUseStatement tgt=new org.hl7.fhir.dstu2.model.DeviceUseStatement();
  copyDomainResource(src,tgt);
  tgt.setBodySite(convertType(src.getBodySite()));
  tgt.setWhenUsed(convertPeriod(src.getWhenUsed()));
  tgt.setDevice(convertReference(src.getDevice()));
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getIndication())   tgt.addIndication(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getNotes())   tgt.addNotes(t.getValue());
  tgt.setRecordedOn(src.getRecordedOn());
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setTiming(convertType(src.getTiming()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DeviceUseStatement convertDeviceUseStatement(org.hl7.fhir.dstu3.model.DeviceUseStatement src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DeviceUseStatement tgt=new org.hl7.fhir.dstu2.model.DeviceUseStatement();
  copyDomainResource(src,tgt);
  tgt.setBodySite(convertType(src.getBodySite()));
  tgt.setWhenUsed(convertPeriod(src.getWhenUsed()));
  tgt.setDevice(convertReference(src.getDevice()));
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getIndication())   tgt.addIndication(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getNotes())   tgt.addNotes(t.getValue());
  tgt.setRecordedOn(src.getRecordedOn());
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setTiming(convertType(src.getTiming()));
  return tgt;
}
Program: 23687
Project: 23687
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent();
  copyElement(src,tgt);
  tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent convertTeardownActionComponent(org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownActionComponent();
  copyElement(src,tgt);
  tgt.setOperation(convertSetupActionOperationComponent(src.getOperation()));
  return tgt;
}
Program: 23688
Project: 23688
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent t : src.getAction())   tgt.addAction(convertTeardownActionComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownComponent convertTestScriptTeardownComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptTeardownComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptTeardownComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.TestScript.TeardownActionComponent t : src.getAction())   tgt.addAction(convertTeardownActionComponent(t));
  return tgt;
}
Program: 23689
Project: 23689
Buggy source:
public org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent tgt=new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getActionResulting())   tgt.addActionResulting(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getProgress())   tgt.addProgress(convertAnnotation(t));
  tgt.setReference(convertReference(src.getReference()));
  tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent convertCarePlanActivityComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent tgt=new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getActionResulting())   tgt.addActionResulting(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getProgress())   tgt.addProgress(convertAnnotation(t));
  tgt.setReference(convertReference(src.getReference()));
  tgt.setDetail(convertCarePlanActivityDetailComponent(src.getDetail()));
  return tgt;
}
Program: 23690
Project: 23690
Buggy source:
public org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt=new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent();
  copyElement(src,tgt);
  tgt.setRelation(src.getRelation());
  tgt.setUrl(src.getUrl());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt=new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent();
  copyElement(src,tgt);
  tgt.setRelation(src.getRelation());
  tgt.setUrl(src.getUrl());
  return tgt;
}
Program: 23691
Project: 23691
Buggy source:
public org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent convertAuditEventAgentComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent tgt=new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole())   tgt.addRole(convertCodeableConcept(t));
  tgt.setReference(convertReference(src.getReference()));
  tgt.setUserId(convertIdentifier(src.getUserId()));
  tgt.setAltId(src.getAltId());
  tgt.setName(src.getName());
  tgt.setRequestor(src.getRequestor());
  tgt.setLocation(convertReference(src.getLocation()));
  for (  org.hl7.fhir.dstu3.model.UriType t : src.getPolicy())   tgt.addPolicy(t.getValue());
  tgt.setMedia(convertCoding(src.getMedia()));
  tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork()));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getPurposeOfUse())   tgt.addPurposeOfUse(convertCoding(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent convertAuditEventAgentComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent tgt=new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole())   tgt.addRole(convertCodeableConcept(t));
  tgt.setReference(convertReference(src.getReference()));
  tgt.setUserId(convertIdentifier(src.getUserId()));
  tgt.setAltId(src.getAltId());
  tgt.setName(src.getName());
  tgt.setRequestor(src.getRequestor());
  tgt.setLocation(convertReference(src.getLocation()));
  for (  org.hl7.fhir.dstu3.model.UriType t : src.getPolicy())   tgt.addPolicy(t.getValue());
  tgt.setMedia(convertCoding(src.getMedia()));
  tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork()));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getPurposeOfUse())   tgt.addPurposeOfUse(convertCoding(t));
  return tgt;
}
Program: 23693
Project: 23693
Buggy source:
public org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent convertImmunizationReactionComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationReactionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent tgt=new org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent();
  copyElement(src,tgt);
  tgt.setDate(src.getDate());
  tgt.setDetail(convertReference(src.getDetail()));
  tgt.setReported(src.getReported());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent convertImmunizationReactionComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationReactionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent tgt=new org.hl7.fhir.dstu2.model.Immunization.ImmunizationReactionComponent();
  copyElement(src,tgt);
  tgt.setDate(src.getDate());
  tgt.setDetail(convertReference(src.getDetail()));
  tgt.setReported(src.getReported());
  return tgt;
}
Program: 23694
Project: 23694
Buggy source:
public org.hl7.fhir.dstu2.model.Condition convertCondition(org.hl7.fhir.dstu3.model.Condition src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Condition tgt=new org.hl7.fhir.dstu2.model.Condition();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setPatient(convertReference(src.getSubject()));
  tgt.setEncounter(convertReference(src.getContext()));
  tgt.setAsserter(convertReference(src.getAsserter()));
  tgt.setDateRecorded(src.getDateRecorded());
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setCategory(convertCodeableConcept(src.getCategory()));
  tgt.setClinicalStatus(src.getClinicalStatus().toCode());
  tgt.setVerificationStatus(convertConditionVerificationStatus(src.getVerificationStatus()));
  tgt.setSeverity(convertCodeableConcept(src.getSeverity()));
  tgt.setOnset(convertType(src.getOnset()));
  tgt.setAbatement(convertType(src.getAbatement()));
  tgt.setStage(convertConditionStageComponent(src.getStage()));
  for (  org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent t : src.getEvidence())   tgt.addEvidence(convertConditionEvidenceComponent(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getBodySite())   tgt.addBodySite(convertCodeableConcept(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Condition convertCondition(org.hl7.fhir.dstu3.model.Condition src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Condition tgt=new org.hl7.fhir.dstu2.model.Condition();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setPatient(convertReference(src.getSubject()));
  tgt.setEncounter(convertReference(src.getContext()));
  tgt.setAsserter(convertReference(src.getAsserter()));
  tgt.setDateRecorded(src.getDateRecorded());
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setCategory(convertCodeableConcept(src.getCategory()));
  tgt.setClinicalStatus(src.getClinicalStatus().toCode());
  tgt.setVerificationStatus(convertConditionVerificationStatus(src.getVerificationStatus()));
  tgt.setSeverity(convertCodeableConcept(src.getSeverity()));
  tgt.setOnset(convertType(src.getOnset()));
  tgt.setAbatement(convertType(src.getAbatement()));
  tgt.setStage(convertConditionStageComponent(src.getStage()));
  for (  org.hl7.fhir.dstu3.model.Condition.ConditionEvidenceComponent t : src.getEvidence())   tgt.addEvidence(convertConditionEvidenceComponent(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getBodySite())   tgt.addBodySite(convertCodeableConcept(t));
  return tgt;
}
Program: 23695
Project: 23695
Buggy source:
public org.hl7.fhir.dstu2.model.MedicationAdministration convertMedicationAdministration(org.hl7.fhir.dstu3.model.MedicationAdministration src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.MedicationAdministration tgt=new org.hl7.fhir.dstu2.model.MedicationAdministration();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertMedicationAdministrationStatus(src.getStatus()));
  tgt.setMedication(convertType(src.getMedication()));
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setEffectiveTime(convertType(src.getEffectiveTime()));
  tgt.setPrescription(convertReference(src.getPrescription()));
  tgt.setWasNotGiven(src.getWasNotGiven());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotGiven())   tgt.addReasonNotGiven(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonGiven())   tgt.addReasonGiven(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getDevice())   tgt.addDevice(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNote())   tgt.setNote(t.getText());
  tgt.setDosage(convertMedicationAdministrationDosageComponent(src.getDosage()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.MedicationAdministration convertMedicationAdministration(org.hl7.fhir.dstu3.model.MedicationAdministration src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.MedicationAdministration tgt=new org.hl7.fhir.dstu2.model.MedicationAdministration();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertMedicationAdministrationStatus(src.getStatus()));
  tgt.setMedication(convertType(src.getMedication()));
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setEffectiveTime(convertType(src.getEffectiveTime()));
  tgt.setPrescription(convertReference(src.getPrescription()));
  tgt.setWasNotGiven(src.getWasNotGiven());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotGiven())   tgt.addReasonNotGiven(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonGiven())   tgt.addReasonGiven(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getDevice())   tgt.addDevice(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNote())   tgt.setNote(t.getText());
  tgt.setDosage(convertMedicationAdministrationDosageComponent(src.getDosage()));
  return tgt;
}
Program: 23696
Project: 23696
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent();
  copyElement(src,tgt);
  tgt.setLabel(src.getLabel());
  tgt.setDescription(src.getDescription());
  tgt.setDirection(convertAssertionDirectionType(src.getDirection()));
  tgt.setCompareToSourceId(src.getCompareToSourceId());
  tgt.setCompareToSourcePath(src.getCompareToSourcePath());
  tgt.setContentType(convertContentType(src.getContentType()));
  tgt.setHeaderField(src.getHeaderField());
  tgt.setMinimumId(src.getMinimumId());
  tgt.setNavigationLinks(src.getNavigationLinks());
  tgt.setOperator(convertAssertionOperatorType(src.getOperator()));
  tgt.setPath(src.getPath());
  tgt.setResource(src.getResource());
  tgt.setResponse(convertAssertionResponseTypes(src.getResponse()));
  tgt.setResponseCode(src.getResponseCode());
  tgt.setSourceId(src.getSourceId());
  tgt.setValidateProfileId(src.getValidateProfileId());
  tgt.setValue(src.getValue());
  tgt.setWarningOnly(src.getWarningOnly());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent convertSetupActionAssertComponent(org.hl7.fhir.dstu3.model.TestScript.SetupActionAssertComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent();
  copyElement(src,tgt);
  tgt.setLabel(src.getLabel());
  tgt.setDescription(src.getDescription());
  tgt.setDirection(convertAssertionDirectionType(src.getDirection()));
  tgt.setCompareToSourceId(src.getCompareToSourceId());
  tgt.setCompareToSourcePath(src.getCompareToSourcePath());
  tgt.setContentType(convertContentType(src.getContentType()));
  tgt.setHeaderField(src.getHeaderField());
  tgt.setMinimumId(src.getMinimumId());
  tgt.setNavigationLinks(src.getNavigationLinks());
  tgt.setOperator(convertAssertionOperatorType(src.getOperator()));
  tgt.setPath(src.getPath());
  tgt.setResource(src.getResource());
  tgt.setResponse(convertAssertionResponseTypes(src.getResponse()));
  tgt.setResponseCode(src.getResponseCode());
  tgt.setSourceId(src.getSourceId());
  tgt.setValidateProfileId(src.getValidateProfileId());
  tgt.setValue(src.getValue());
  tgt.setWarningOnly(src.getWarningOnly());
  return tgt;
}
Program: 23697
Project: 23697
Buggy source:
public org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent tgt=new org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent();
  copyElement(src,tgt);
  tgt.setContent(convertType(src.getContent()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent convertLegalLanguageComponent(org.hl7.fhir.dstu3.model.Contract.LegalLanguageComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent tgt=new org.hl7.fhir.dstu2.model.Contract.LegalLanguageComponent();
  copyElement(src,tgt);
  tgt.setContent(convertType(src.getContent()));
  return tgt;
}
Program: 23699
Project: 23699
Buggy source:
public org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingEndpointComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent();
  copyElement(src,tgt);
  tgt.setProtocol(convertCoding(src.getProtocol()));
  tgt.setAddress(src.getAddress());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent convertConformanceMessagingEndpointComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingEndpointComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent();
  copyElement(src,tgt);
  tgt.setProtocol(convertCoding(src.getProtocol()));
  tgt.setAddress(src.getAddress());
  return tgt;
}
Program: 23700
Project: 23700
Buggy source:
public org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt=new org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent();
  copyElement(src,tgt);
  tgt.setSpecType(convertCodeableConcept(src.getSpecType()));
  tgt.setComponentId(convertIdentifier(src.getComponentId()));
  tgt.setProductionSpec(src.getProductionSpec());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt=new org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent();
  copyElement(src,tgt);
  tgt.setSpecType(convertCodeableConcept(src.getSpecType()));
  tgt.setComponentId(convertIdentifier(src.getComponentId()));
  tgt.setProductionSpec(src.getProductionSpec());
  return tgt;
}
Program: 23701
Project: 23701
Buggy source:
public org.hl7.fhir.dstu2.model.Count convertCount(org.hl7.fhir.dstu3.model.Count src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Count tgt=new org.hl7.fhir.dstu2.model.Count();
  copyElement(src,tgt);
  tgt.setValue(src.getValue());
  tgt.setComparator(convertQuantityComparator(src.getComparator()));
  tgt.setUnit(src.getUnit());
  tgt.setSystem(src.getSystem());
  tgt.setCode(src.getCode());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Count convertCount(org.hl7.fhir.dstu3.model.Count src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Count tgt=new org.hl7.fhir.dstu2.model.Count();
  copyElement(src,tgt);
  tgt.setValue(src.getValue());
  tgt.setComparator(convertQuantityComparator(src.getComparator()));
  tgt.setUnit(src.getUnit());
  tgt.setSystem(src.getSystem());
  tgt.setCode(src.getCode());
  return tgt;
}
Program: 23702
Project: 23702
Buggy source:
public org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt=new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionDifferentialComponent();
  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.StructureDefinitionDifferentialComponent convertStructureDefinitionDifferentialComponent(org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionDifferentialComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionDifferentialComponent tgt=new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionDifferentialComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement())   tgt.addElement(convertElementDefinition(t));
  return tgt;
}
Program: 23703
Project: 23703
Buggy source:
public org.hl7.fhir.dstu2.model.Quantity convertQuantity(org.hl7.fhir.dstu3.model.Quantity src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Quantity tgt=new org.hl7.fhir.dstu2.model.Quantity();
  copyElement(src,tgt);
  tgt.setValue(src.getValue());
  tgt.setComparator(convertQuantityComparator(src.getComparator()));
  tgt.setUnit(src.getUnit());
  tgt.setSystem(src.getSystem());
  tgt.setCode(src.getCode());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Quantity convertQuantity(org.hl7.fhir.dstu3.model.Quantity src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Quantity tgt=new org.hl7.fhir.dstu2.model.Quantity();
  copyElement(src,tgt);
  tgt.setValue(src.getValue());
  tgt.setComparator(convertQuantityComparator(src.getComparator()));
  tgt.setUnit(src.getUnit());
  tgt.setSystem(src.getSystem());
  tgt.setCode(src.getCode());
  return tgt;
}
Program: 23704
Project: 23704
Buggy source:
public org.hl7.fhir.dstu2.model.Medication.MedicationProductIngredientComponent convertMedicationProductIngredientComponent(org.hl7.fhir.dstu3.model.Medication.MedicationProductIngredientComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Medication.MedicationProductIngredientComponent tgt=new org.hl7.fhir.dstu2.model.Medication.MedicationProductIngredientComponent();
  copyElement(src,tgt);
  if (src.hasItemReference())   tgt.setItem((org.hl7.fhir.dstu2.model.Reference)convertType(src.getItem()));
  tgt.setAmount(convertRatio(src.getAmount()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Medication.MedicationProductIngredientComponent convertMedicationProductIngredientComponent(org.hl7.fhir.dstu3.model.Medication.MedicationProductIngredientComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Medication.MedicationProductIngredientComponent tgt=new org.hl7.fhir.dstu2.model.Medication.MedicationProductIngredientComponent();
  copyElement(src,tgt);
  if (src.hasItemReference())   tgt.setItem((org.hl7.fhir.dstu2.model.Reference)convertType(src.getItem()));
  tgt.setAmount(convertRatio(src.getAmount()));
  return tgt;
}
Program: 23705
Project: 23705
Buggy source:
public org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent tgt=new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent();
  copyElement(src,tgt);
  tgt.setAddress(src.getAddress());
  tgt.setType(convertAuditEventParticipantNetworkType(src.getType()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent convertAuditEventAgentNetworkComponent(org.hl7.fhir.dstu3.model.AuditEvent.AuditEventAgentNetworkComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent tgt=new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent();
  copyElement(src,tgt);
  tgt.setAddress(src.getAddress());
  tgt.setType(convertAuditEventParticipantNetworkType(src.getType()));
  return tgt;
}
Program: 23706
Project: 23706
Buggy source:
public org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent tgt=new org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent();
  copyElement(src,tgt);
  tgt.setCode(convertDocumentRelationshipType(src.getCode()));
  tgt.setTarget(convertReference(src.getTarget()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent convertDocumentReferenceRelatesToComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceRelatesToComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent tgt=new org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent();
  copyElement(src,tgt);
  tgt.setCode(convertDocumentRelationshipType(src.getCode()));
  tgt.setTarget(convertReference(src.getTarget()));
  return tgt;
}
Program: 23707
Project: 23707
Buggy source:
public org.hl7.fhir.dstu2.model.Encounter.EncounterStatusHistoryComponent convertEncounterStatusHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterStatusHistoryComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Encounter.EncounterStatusHistoryComponent tgt=new org.hl7.fhir.dstu2.model.Encounter.EncounterStatusHistoryComponent();
  copyElement(src,tgt);
  tgt.setStatus(convertEncounterState(src.getStatus()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Encounter.EncounterStatusHistoryComponent convertEncounterStatusHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterStatusHistoryComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Encounter.EncounterStatusHistoryComponent tgt=new org.hl7.fhir.dstu2.model.Encounter.EncounterStatusHistoryComponent();
  copyElement(src,tgt);
  tgt.setStatus(convertEncounterState(src.getStatus()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}
Program: 23708
Project: 23708
Buggy source:
public org.hl7.fhir.dstu2.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.dstu3.model.AppointmentResponse src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.AppointmentResponse tgt=new org.hl7.fhir.dstu2.model.AppointmentResponse();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setAppointment(convertReference(src.getAppointment()));
  tgt.setStart(src.getStart());
  tgt.setEnd(src.getEnd());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getParticipantType())   tgt.addParticipantType(convertCodeableConcept(t));
  tgt.setActor(convertReference(src.getActor()));
  tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus()));
  tgt.setComment(src.getComment());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.AppointmentResponse convertAppointmentResponse(org.hl7.fhir.dstu3.model.AppointmentResponse src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.AppointmentResponse tgt=new org.hl7.fhir.dstu2.model.AppointmentResponse();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setAppointment(convertReference(src.getAppointment()));
  tgt.setStart(src.getStart());
  tgt.setEnd(src.getEnd());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getParticipantType())   tgt.addParticipantType(convertCodeableConcept(t));
  tgt.setActor(convertReference(src.getActor()));
  tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus()));
  tgt.setComment(src.getComment());
  return tgt;
}
Program: 23709
Project: 23709
Buggy source:
public org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDosageInstructionComponent convertMedicationOrderDosageInstructionComponent(org.hl7.fhir.dstu3.model.MedicationOrder.MedicationOrderDosageInstructionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDosageInstructionComponent tgt=new org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDosageInstructionComponent();
  copyElement(src,tgt);
  tgt.setText(src.getText());
  tgt.setTiming(convertTiming(src.getTiming()));
  tgt.setAsNeeded(convertType(src.getAsNeeded()));
  tgt.setSite(convertType(src.getSite()));
  tgt.setRoute(convertCodeableConcept(src.getRoute()));
  tgt.setMethod(convertCodeableConcept(src.getMethod()));
  tgt.setDose(convertType(src.getDose()));
  tgt.setRate(convertType(src.getRate()));
  tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDosageInstructionComponent convertMedicationOrderDosageInstructionComponent(org.hl7.fhir.dstu3.model.MedicationOrder.MedicationOrderDosageInstructionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDosageInstructionComponent tgt=new org.hl7.fhir.dstu2.model.MedicationOrder.MedicationOrderDosageInstructionComponent();
  copyElement(src,tgt);
  tgt.setText(src.getText());
  tgt.setTiming(convertTiming(src.getTiming()));
  tgt.setAsNeeded(convertType(src.getAsNeeded()));
  tgt.setSite(convertType(src.getSite()));
  tgt.setRoute(convertCodeableConcept(src.getRoute()));
  tgt.setMethod(convertCodeableConcept(src.getMethod()));
  tgt.setDose(convertType(src.getDose()));
  tgt.setRate(convertType(src.getRate()));
  tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod()));
  return tgt;
}
Program: 23710
Project: 23710
Buggy source:
public org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent convertTestScriptMetadataLinkComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent();
  copyElement(src,tgt);
  tgt.setUrl(src.getUrl());
  tgt.setDescription(src.getDescription());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent convertTestScriptMetadataLinkComponent(org.hl7.fhir.dstu3.model.TestScript.TestScriptMetadataLinkComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent tgt=new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent();
  copyElement(src,tgt);
  tgt.setUrl(src.getUrl());
  tgt.setDescription(src.getDescription());
  return tgt;
}
Program: 23711
Project: 23711
Buggy source:
public org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent convertProcedurePerformerComponent(org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent tgt=new org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent();
  copyElement(src,tgt);
  tgt.setActor(convertReference(src.getActor()));
  tgt.setRole(convertCodeableConcept(src.getRole()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent convertProcedurePerformerComponent(org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent tgt=new org.hl7.fhir.dstu2.model.Procedure.ProcedurePerformerComponent();
  copyElement(src,tgt);
  tgt.setActor(convertReference(src.getActor()));
  tgt.setRole(convertCodeableConcept(src.getRole()));
  return tgt;
}
Program: 23712
Project: 23712
Buggy source:
public org.hl7.fhir.dstu2.model.CarePlan.CarePlanRelatedPlanComponent convertCarePlanRelatedPlanComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanRelatedPlanComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.CarePlan.CarePlanRelatedPlanComponent tgt=new org.hl7.fhir.dstu2.model.CarePlan.CarePlanRelatedPlanComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCarePlanRelationship(src.getCode()));
  tgt.setPlan(convertReference(src.getPlan()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.CarePlan.CarePlanRelatedPlanComponent convertCarePlanRelatedPlanComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanRelatedPlanComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.CarePlan.CarePlanRelatedPlanComponent tgt=new org.hl7.fhir.dstu2.model.CarePlan.CarePlanRelatedPlanComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCarePlanRelationship(src.getCode()));
  tgt.setPlan(convertReference(src.getPlan()));
  return tgt;
}
Program: 23713
Project: 23713
Buggy source:
public org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietTextureComponent convertNutritionOrderOralDietTextureComponent(org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestOralDietTextureComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietTextureComponent tgt=new org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietTextureComponent();
  copyElement(src,tgt);
  tgt.setModifier(convertCodeableConcept(src.getModifier()));
  tgt.setFoodType(convertCodeableConcept(src.getFoodType()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietTextureComponent convertNutritionOrderOralDietTextureComponent(org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestOralDietTextureComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietTextureComponent tgt=new org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderOralDietTextureComponent();
  copyElement(src,tgt);
  tgt.setModifier(convertCodeableConcept(src.getModifier()));
  tgt.setFoodType(convertCodeableConcept(src.getFoodType()));
  return tgt;
}