nus-yam/ex-repair huggingface dataset:
Program: 23519
Project: 23519
Buggy source:
public org.hl7.fhir.dstu2.model.Location convertLocation(org.hl7.fhir.dstu3.model.Location src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Location tgt=new org.hl7.fhir.dstu2.model.Location();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertLocationStatus(src.getStatus()));
  tgt.setName(src.getName());
  tgt.setDescription(src.getDescription());
  tgt.setMode(convertLocationMode(src.getMode()));
  tgt.setType(convertCodeableConcept(src.getType()));
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  tgt.setAddress(convertAddress(src.getAddress()));
  tgt.setPhysicalType(convertCodeableConcept(src.getPhysicalType()));
  tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
  tgt.setManagingOrganization(convertReference(src.getManagingOrganization()));
  tgt.setPartOf(convertReference(src.getPartOf()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Location convertLocation(org.hl7.fhir.dstu3.model.Location src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Location tgt=new org.hl7.fhir.dstu2.model.Location();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertLocationStatus(src.getStatus()));
  tgt.setName(src.getName());
  tgt.setDescription(src.getDescription());
  tgt.setMode(convertLocationMode(src.getMode()));
  tgt.setType(convertCodeableConcept(src.getType()));
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  tgt.setAddress(convertAddress(src.getAddress()));
  tgt.setPhysicalType(convertCodeableConcept(src.getPhysicalType()));
  tgt.setPosition(convertLocationPositionComponent(src.getPosition()));
  tgt.setManagingOrganization(convertReference(src.getManagingOrganization()));
  tgt.setPartOf(convertReference(src.getPartOf()));
  return tgt;
}
Program: 23521
Project: 23521
Buggy source:
public org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.dstu3.model.Composition.CompositionEventComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent tgt=new org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode())   tgt.addCode(convertCodeableConcept(t));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getDetail())   tgt.addDetail(convertReference(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent convertCompositionEventComponent(org.hl7.fhir.dstu3.model.Composition.CompositionEventComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent tgt=new org.hl7.fhir.dstu2.model.Composition.CompositionEventComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode())   tgt.addCode(convertCodeableConcept(t));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getDetail())   tgt.addDetail(convertReference(t));
  return tgt;
}
Program: 23522
Project: 23522
Buggy source:
public org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent();
  copyElement(src,tgt);
  tgt.setProperty(src.getProperty());
  tgt.setOp(convertFilterOperator(src.getOp()));
  tgt.setValue(src.getValue());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent convertConceptSetFilterComponent(org.hl7.fhir.dstu3.model.ValueSet.ConceptSetFilterComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent tgt=new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent();
  copyElement(src,tgt);
  tgt.setProperty(src.getProperty());
  tgt.setOp(convertFilterOperator(src.getOp()));
  tgt.setValue(src.getValue());
  return tgt;
}
Program: 23523
Project: 23523
Buggy source:
public org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent tgt=new org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setValue(convertType(src.getValue()));
  tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason()));
  for (  org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange())   tgt.addReferenceRange(convertObservationReferenceRangeComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent convertObservationComponentComponent(org.hl7.fhir.dstu3.model.Observation.ObservationComponentComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent tgt=new org.hl7.fhir.dstu2.model.Observation.ObservationComponentComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setValue(convertType(src.getValue()));
  tgt.setDataAbsentReason(convertCodeableConcept(src.getDataAbsentReason()));
  for (  org.hl7.fhir.dstu3.model.Observation.ObservationReferenceRangeComponent t : src.getReferenceRange())   tgt.addReferenceRange(convertObservationReferenceRangeComponent(t));
  return tgt;
}
Program: 23524
Project: 23524
Buggy source:
public org.hl7.fhir.dstu2.model.Contract.TermActorComponent convertTermAgentComponent(org.hl7.fhir.dstu3.model.Contract.TermAgentComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Contract.TermActorComponent tgt=new org.hl7.fhir.dstu2.model.Contract.TermActorComponent();
  copyElement(src,tgt);
  tgt.setEntity(convertReference(src.getActor()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole())   tgt.addRole(convertCodeableConcept(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Contract.TermActorComponent convertTermAgentComponent(org.hl7.fhir.dstu3.model.Contract.TermAgentComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Contract.TermActorComponent tgt=new org.hl7.fhir.dstu2.model.Contract.TermActorComponent();
  copyElement(src,tgt);
  tgt.setEntity(convertReference(src.getActor()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getRole())   tgt.addRole(convertCodeableConcept(t));
  return tgt;
}
Program: 23525
Project: 23525
Buggy source:
public org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent convertQuestionnaireItemToQuestion(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent tgt=new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent();
  copyElement(src,tgt);
  tgt.setLinkId(src.getLinkId());
  tgt.setText(src.getText());
  for (  org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer())   tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent convertQuestionnaireItemToQuestion(org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent tgt=new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent();
  copyElement(src,tgt);
  tgt.setLinkId(src.getLinkId());
  tgt.setText(src.getText());
  for (  org.hl7.fhir.dstu3.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer())   tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t));
  return tgt;
}
Program: 23527
Project: 23527
Buggy source:
public org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent tgt=new org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent();
  copyElement(src,tgt);
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setRef(convertReference(src.getRef()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent tgt=new org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent();
  copyElement(src,tgt);
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setRef(convertReference(src.getRef()));
  return tgt;
}
Program: 23528
Project: 23528
Buggy source:
public org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent convertNutritionOrderEnteralFormulaAdministrationComponent(org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestEnteralFormulaAdministrationComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent tgt=new org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent();
  copyElement(src,tgt);
  tgt.setSchedule(convertTiming(src.getSchedule()));
  tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
  tgt.setRate(convertType(src.getRate()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent convertNutritionOrderEnteralFormulaAdministrationComponent(org.hl7.fhir.dstu3.model.NutritionRequest.NutritionRequestEnteralFormulaAdministrationComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent tgt=new org.hl7.fhir.dstu2.model.NutritionOrder.NutritionOrderEnteralFormulaAdministrationComponent();
  copyElement(src,tgt);
  tgt.setSchedule(convertTiming(src.getSchedule()));
  tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
  tgt.setRate(convertType(src.getRate()));
  return tgt;
}
Program: 23529
Project: 23529
Buggy source:
public org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent convertMessageSourceComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent tgt=new org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setSoftware(src.getSoftware());
  tgt.setVersion(src.getVersion());
  tgt.setContact(convertContactPoint(src.getContact()));
  tgt.setEndpoint(src.getEndpoint());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent convertMessageSourceComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageSourceComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent tgt=new org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setSoftware(src.getSoftware());
  tgt.setVersion(src.getVersion());
  tgt.setContact(convertContactPoint(src.getContact()));
  tgt.setEndpoint(src.getEndpoint());
  return tgt;
}
Program: 23530
Project: 23530
Buggy source:
public org.hl7.fhir.dstu2.model.Flag convertFlag(org.hl7.fhir.dstu3.model.Flag src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Flag tgt=new org.hl7.fhir.dstu2.model.Flag();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setCategory(convertCodeableConcept(src.getCategory()));
  tgt.setStatus(convertFlagStatus(src.getStatus()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setAuthor(convertReference(src.getAuthor()));
  tgt.setCode(convertCodeableConcept(src.getCode()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Flag convertFlag(org.hl7.fhir.dstu3.model.Flag src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Flag tgt=new org.hl7.fhir.dstu2.model.Flag();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setCategory(convertCodeableConcept(src.getCategory()));
  tgt.setStatus(convertFlagStatus(src.getStatus()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setAuthor(convertReference(src.getAuthor()));
  tgt.setCode(convertCodeableConcept(src.getCode()));
  return tgt;
}
Program: 23531
Project: 23531
Buggy source:
public org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent tgt=new org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent();
  copyElement(src,tgt);
  tgt.setStatus(src.getStatus());
  tgt.setLocation(src.getLocation());
  tgt.setEtag(src.getEtag());
  tgt.setLastModified(src.getLastModified());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent tgt=new org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent();
  copyElement(src,tgt);
  tgt.setStatus(src.getStatus());
  tgt.setLocation(src.getLocation());
  tgt.setEtag(src.getEtag());
  tgt.setLastModified(src.getLastModified());
  return tgt;
}
Program: 23532
Project: 23532
Buggy source:
public org.hl7.fhir.dstu2.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.dstu3.model.QuestionnaireResponse src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.QuestionnaireResponse tgt=new org.hl7.fhir.dstu2.model.QuestionnaireResponse();
  copyDomainResource(src,tgt);
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setQuestionnaire(convertReference(src.getQuestionnaire()));
  tgt.setStatus(convertQuestionnaireResponseStatus(src.getStatus()));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setAuthor(convertReference(src.getAuthor()));
  tgt.setAuthored(src.getAuthored());
  tgt.setSource(convertReference(src.getSource()));
  tgt.setEncounter(convertReference(src.getContext()));
  if (src.getItem().size() != 1)   throw new FHIRException("String_Node_Str");
  tgt.setGroup(convertQuestionnaireItemToGroup(src.getItem().get(0)));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.QuestionnaireResponse convertQuestionnaireResponse(org.hl7.fhir.dstu3.model.QuestionnaireResponse src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.QuestionnaireResponse tgt=new org.hl7.fhir.dstu2.model.QuestionnaireResponse();
  copyDomainResource(src,tgt);
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setQuestionnaire(convertReference(src.getQuestionnaire()));
  tgt.setStatus(convertQuestionnaireResponseStatus(src.getStatus()));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setAuthor(convertReference(src.getAuthor()));
  tgt.setAuthored(src.getAuthored());
  tgt.setSource(convertReference(src.getSource()));
  tgt.setEncounter(convertReference(src.getContext()));
  if (src.getItem().size() != 1)   throw new FHIRException("String_Node_Str");
  tgt.setGroup(convertQuestionnaireItemToGroup(src.getItem().get(0)));
  return tgt;
}
Program: 23534
Project: 23534
Buggy source:
public org.hl7.fhir.dstu2.model.Group convertGroup(org.hl7.fhir.dstu3.model.Group src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Group tgt=new org.hl7.fhir.dstu2.model.Group();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setType(convertGroupType(src.getType()));
  tgt.setActual(src.getActual());
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setName(src.getName());
  tgt.setQuantity(src.getQuantity());
  for (  org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent t : src.getCharacteristic())   tgt.addCharacteristic(convertGroupCharacteristicComponent(t));
  for (  org.hl7.fhir.dstu3.model.Group.GroupMemberComponent t : src.getMember())   tgt.addMember(convertGroupMemberComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Group convertGroup(org.hl7.fhir.dstu3.model.Group src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Group tgt=new org.hl7.fhir.dstu2.model.Group();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setType(convertGroupType(src.getType()));
  tgt.setActual(src.getActual());
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setName(src.getName());
  tgt.setQuantity(src.getQuantity());
  for (  org.hl7.fhir.dstu3.model.Group.GroupCharacteristicComponent t : src.getCharacteristic())   tgt.addCharacteristic(convertGroupCharacteristicComponent(t));
  for (  org.hl7.fhir.dstu3.model.Group.GroupMemberComponent t : src.getMember())   tgt.addMember(convertGroupMemberComponent(t));
  return tgt;
}
Program: 23535
Project: 23535
Buggy source:
public org.hl7.fhir.dstu2.model.ValueSet convertValueSet(org.hl7.fhir.dstu3.model.ValueSet src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ValueSet tgt=new org.hl7.fhir.dstu2.model.ValueSet();
  copyDomainResource(src,tgt);
  tgt.setUrl(src.getUrl());
  for (  org.hl7.fhir.dstu3.model.Identifier i : src.getIdentifier())   tgt.setIdentifier(convertIdentifier(i));
  tgt.setVersion(src.getVersion());
  tgt.setName(src.getName());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  tgt.setExperimental(src.getExperimental());
  tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.ValueSet.ValueSetContactComponent t : src.getContact())   tgt.addContact(convertValueSetContactComponent(t));
  tgt.setDate(src.getDate());
  tgt.setLockedDate(src.getLockedDate());
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getUseContext())   tgt.addUseContext(convertCodeableConcept(t));
  tgt.setImmutable(src.getImmutable());
  tgt.setRequirements(src.getRequirements());
  tgt.setCopyright(src.getCopyright());
  tgt.setExtensible(src.getExtensible());
  tgt.setCompose(convertValueSetComposeComponent(src.getCompose()));
  tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ValueSet convertValueSet(org.hl7.fhir.dstu3.model.ValueSet src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ValueSet tgt=new org.hl7.fhir.dstu2.model.ValueSet();
  copyDomainResource(src,tgt);
  tgt.setUrl(src.getUrl());
  for (  org.hl7.fhir.dstu3.model.Identifier i : src.getIdentifier())   tgt.setIdentifier(convertIdentifier(i));
  tgt.setVersion(src.getVersion());
  tgt.setName(src.getName());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  tgt.setExperimental(src.getExperimental());
  tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.ValueSet.ValueSetContactComponent t : src.getContact())   tgt.addContact(convertValueSetContactComponent(t));
  tgt.setDate(src.getDate());
  tgt.setLockedDate(src.getLockedDate());
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getUseContext())   tgt.addUseContext(convertCodeableConcept(t));
  tgt.setImmutable(src.getImmutable());
  tgt.setRequirements(src.getRequirements());
  tgt.setCopyright(src.getCopyright());
  tgt.setExtensible(src.getExtensible());
  tgt.setCompose(convertValueSetComposeComponent(src.getCompose()));
  tgt.setExpansion(convertValueSetExpansionComponent(src.getExpansion()));
  return tgt;
}
Program: 23536
Project: 23536
Buggy source:
public org.hl7.fhir.dstu2.model.Distance convertDistance(org.hl7.fhir.dstu3.model.Distance src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Distance tgt=new org.hl7.fhir.dstu2.model.Distance();
  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.Distance convertDistance(org.hl7.fhir.dstu3.model.Distance src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Distance tgt=new org.hl7.fhir.dstu2.model.Distance();
  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: 23537
Project: 23537
Buggy source:
public org.hl7.fhir.dstu2.model.DataElement convertDataElement(org.hl7.fhir.dstu3.model.DataElement src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DataElement tgt=new org.hl7.fhir.dstu2.model.DataElement();
  copyDomainResource(src,tgt);
  tgt.setUrl(src.getUrl());
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setVersion(src.getVersion());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  tgt.setExperimental(src.getExperimental());
  tgt.setPublisher(src.getPublisher());
  tgt.setDate(src.getDate());
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.DataElement.DataElementContactComponent t : src.getContact())   tgt.addContact(convertDataElementContactComponent(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getUseContext())   tgt.addUseContext(convertCodeableConcept(t));
  tgt.setCopyright(src.getCopyright());
  tgt.setStringency(convertDataElementStringency(src.getStringency()));
  for (  org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent t : src.getMapping())   tgt.addMapping(convertDataElementMappingComponent(t));
  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.DataElement convertDataElement(org.hl7.fhir.dstu3.model.DataElement src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DataElement tgt=new org.hl7.fhir.dstu2.model.DataElement();
  copyDomainResource(src,tgt);
  tgt.setUrl(src.getUrl());
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setVersion(src.getVersion());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  tgt.setExperimental(src.getExperimental());
  tgt.setPublisher(src.getPublisher());
  tgt.setDate(src.getDate());
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.DataElement.DataElementContactComponent t : src.getContact())   tgt.addContact(convertDataElementContactComponent(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getUseContext())   tgt.addUseContext(convertCodeableConcept(t));
  tgt.setCopyright(src.getCopyright());
  tgt.setStringency(convertDataElementStringency(src.getStringency()));
  for (  org.hl7.fhir.dstu3.model.DataElement.DataElementMappingComponent t : src.getMapping())   tgt.addMapping(convertDataElementMappingComponent(t));
  for (  org.hl7.fhir.dstu3.model.ElementDefinition t : src.getElement())   tgt.addElement(convertElementDefinition(t));
  return tgt;
}
Program: 23538
Project: 23538
Buggy source:
public org.hl7.fhir.dstu2.model.Specimen.SpecimenContainerComponent convertSpecimenContainerComponent(org.hl7.fhir.dstu3.model.Specimen.SpecimenContainerComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Specimen.SpecimenContainerComponent tgt=new org.hl7.fhir.dstu2.model.Specimen.SpecimenContainerComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setDescription(src.getDescription());
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setCapacity(convertSimpleQuantity(src.getCapacity()));
  tgt.setSpecimenQuantity(convertSimpleQuantity(src.getSpecimenQuantity()));
  tgt.setAdditive(convertType(src.getAdditive()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Specimen.SpecimenContainerComponent convertSpecimenContainerComponent(org.hl7.fhir.dstu3.model.Specimen.SpecimenContainerComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Specimen.SpecimenContainerComponent tgt=new org.hl7.fhir.dstu2.model.Specimen.SpecimenContainerComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setDescription(src.getDescription());
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setCapacity(convertSimpleQuantity(src.getCapacity()));
  tgt.setSpecimenQuantity(convertSimpleQuantity(src.getSpecimenQuantity()));
  tgt.setAdditive(convertType(src.getAdditive()));
  return tgt;
}
Program: 23539
Project: 23539
Buggy source:
public org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent tgt=new org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent();
  copyElement(src,tgt);
  tgt.setEntity(convertType(src.getEntity()));
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setEffectiveTime(src.getEffectiveTime());
  tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
  tgt.setUnitPrice(convertMoney(src.getUnitPrice()));
  tgt.setFactor(src.getFactor());
  tgt.setPoints(src.getPoints());
  tgt.setNet(convertMoney(src.getNet()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent convertValuedItemComponent(org.hl7.fhir.dstu3.model.Contract.ValuedItemComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent tgt=new org.hl7.fhir.dstu2.model.Contract.ValuedItemComponent();
  copyElement(src,tgt);
  tgt.setEntity(convertType(src.getEntity()));
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setEffectiveTime(src.getEffectiveTime());
  tgt.setQuantity(convertSimpleQuantity(src.getQuantity()));
  tgt.setUnitPrice(convertMoney(src.getUnitPrice()));
  tgt.setFactor(src.getFactor());
  tgt.setPoints(src.getPoints());
  tgt.setNet(convertMoney(src.getNet()));
  return tgt;
}
Program: 23540
Project: 23540
Buggy source:
public org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent convertPractitionerQualificationComponent(org.hl7.fhir.dstu3.model.Practitioner.PractitionerQualificationComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent tgt=new org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  tgt.setIssuer(convertReference(src.getIssuer()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent convertPractitionerQualificationComponent(org.hl7.fhir.dstu3.model.Practitioner.PractitionerQualificationComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent tgt=new org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  tgt.setIssuer(convertReference(src.getIssuer()));
  return tgt;
}
Program: 23542
Project: 23542
Buggy source:
public org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent convertImmunizationRecommendationRecommendationComponent(org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent tgt=new org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent();
  copyElement(src,tgt);
  tgt.setDate(src.getDate());
  tgt.setVaccineCode(convertCodeableConcept(src.getVaccineCode()));
  tgt.setDoseNumber(src.getDoseNumber());
  tgt.setForecastStatus(convertCodeableConcept(src.getForecastStatus()));
  for (  org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent t : src.getDateCriterion())   tgt.addDateCriterion(convertImmunizationRecommendationRecommendationDateCriterionComponent(t));
  tgt.setProtocol(convertImmunizationRecommendationRecommendationProtocolComponent(src.getProtocol()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupportingImmunization())   tgt.addSupportingImmunization(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupportingPatientInformation())   tgt.addSupportingPatientInformation(convertReference(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent convertImmunizationRecommendationRecommendationComponent(org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent tgt=new org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent();
  copyElement(src,tgt);
  tgt.setDate(src.getDate());
  tgt.setVaccineCode(convertCodeableConcept(src.getVaccineCode()));
  tgt.setDoseNumber(src.getDoseNumber());
  tgt.setForecastStatus(convertCodeableConcept(src.getForecastStatus()));
  for (  org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent t : src.getDateCriterion())   tgt.addDateCriterion(convertImmunizationRecommendationRecommendationDateCriterionComponent(t));
  tgt.setProtocol(convertImmunizationRecommendationRecommendationProtocolComponent(src.getProtocol()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupportingImmunization())   tgt.addSupportingImmunization(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupportingPatientInformation())   tgt.addSupportingPatientInformation(convertReference(t));
  return tgt;
}
Program: 23543
Project: 23543
Buggy source:
public org.hl7.fhir.dstu2.model.EligibilityResponse convertEligibilityResponse(org.hl7.fhir.dstu3.model.EligibilityResponse src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.EligibilityResponse tgt=new org.hl7.fhir.dstu2.model.EligibilityResponse();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  if (src.hasRequestReference())   tgt.setRequest((org.hl7.fhir.dstu2.model.Reference)convertType(src.getRequest()));
  tgt.setDisposition(src.getDisposition());
  tgt.setRuleset(convertCoding(src.getRuleset()));
  tgt.setOriginalRuleset(convertCoding(src.getOriginalRuleset()));
  tgt.setCreated(src.getCreated());
  if (src.hasOrganization())   tgt.setOrganization((org.hl7.fhir.dstu2.model.Reference)convertType(src.getOrganization()));
  if (src.hasRequestProvider())   tgt.setRequestProvider((org.hl7.fhir.dstu2.model.Reference)convertType(src.getRequestProvider()));
  if (src.hasRequestOrganization())   tgt.setRequestOrganization((org.hl7.fhir.dstu2.model.Reference)convertType(src.getRequestOrganization()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.EligibilityResponse convertEligibilityResponse(org.hl7.fhir.dstu3.model.EligibilityResponse src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.EligibilityResponse tgt=new org.hl7.fhir.dstu2.model.EligibilityResponse();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  if (src.hasRequestReference())   tgt.setRequest((org.hl7.fhir.dstu2.model.Reference)convertType(src.getRequest()));
  tgt.setDisposition(src.getDisposition());
  tgt.setRuleset(convertCoding(src.getRuleset()));
  tgt.setOriginalRuleset(convertCoding(src.getOriginalRuleset()));
  tgt.setCreated(src.getCreated());
  if (src.hasOrganization())   tgt.setOrganization((org.hl7.fhir.dstu2.model.Reference)convertType(src.getOrganization()));
  if (src.hasRequestProvider())   tgt.setRequestProvider((org.hl7.fhir.dstu2.model.Reference)convertType(src.getRequestProvider()));
  if (src.hasRequestOrganization())   tgt.setRequestOrganization((org.hl7.fhir.dstu2.model.Reference)convertType(src.getRequestOrganization()));
  return tgt;
}
Program: 23544
Project: 23544
Buggy source:
public org.hl7.fhir.dstu2.model.Account convertAccount(org.hl7.fhir.dstu3.model.Account src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Account tgt=new org.hl7.fhir.dstu2.model.Account();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setName(src.getName());
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setStatus(convertAccountStatus(src.getStatus()));
  tgt.setActivePeriod(convertPeriod(src.getActive()));
  tgt.setCurrency(convertCoding(src.getCurrency()));
  tgt.setBalance(convertMoney(src.getBalance()));
  tgt.setCoveragePeriod(convertPeriod(src.getCoveragePeriod()));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setOwner(convertReference(src.getOwner()));
  tgt.setDescription(src.getDescription());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Account convertAccount(org.hl7.fhir.dstu3.model.Account src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Account tgt=new org.hl7.fhir.dstu2.model.Account();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setName(src.getName());
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setStatus(convertAccountStatus(src.getStatus()));
  tgt.setActivePeriod(convertPeriod(src.getActive()));
  tgt.setCurrency(convertCoding(src.getCurrency()));
  tgt.setBalance(convertMoney(src.getBalance()));
  tgt.setCoveragePeriod(convertPeriod(src.getCoveragePeriod()));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setOwner(convertReference(src.getOwner()));
  tgt.setDescription(src.getDescription());
  return tgt;
}
Program: 23545
Project: 23545
Buggy source:
public org.hl7.fhir.dstu2.model.DiagnosticOrder convertDiagnosticOrder(org.hl7.fhir.dstu3.model.DiagnosticRequest src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DiagnosticOrder tgt=new org.hl7.fhir.dstu2.model.DiagnosticOrder();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setEncounter(convertReference(src.getContext()));
  tgt.setOrderer(convertReference(src.getRequester()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())   tgt.addReason(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInformation())   tgt.addSupportingInformation(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNote())   tgt.addNote(convertAnnotation(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DiagnosticOrder convertDiagnosticOrder(org.hl7.fhir.dstu3.model.DiagnosticRequest src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DiagnosticOrder tgt=new org.hl7.fhir.dstu2.model.DiagnosticOrder();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setEncounter(convertReference(src.getContext()));
  tgt.setOrderer(convertReference(src.getRequester()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())   tgt.addReason(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInformation())   tgt.addSupportingInformation(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNote())   tgt.addNote(convertAnnotation(t));
  return tgt;
}
Program: 23546
Project: 23546
Buggy source:
public org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent convertImmunizationExplanationComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent tgt=new org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())   tgt.addReason(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotGiven())   tgt.addReasonNotGiven(convertCodeableConcept(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent convertImmunizationExplanationComponent(org.hl7.fhir.dstu3.model.Immunization.ImmunizationExplanationComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent tgt=new org.hl7.fhir.dstu2.model.Immunization.ImmunizationExplanationComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason())   tgt.addReason(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotGiven())   tgt.addReasonNotGiven(convertCodeableConcept(t));
  return tgt;
}
Program: 23547
Project: 23547
Buggy source:
public org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent convertSearchParameterContactComponent(org.hl7.fhir.dstu3.model.SearchParameter.SearchParameterContactComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent tgt=new org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent();
  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.SearchParameter.SearchParameterContactComponent convertSearchParameterContactComponent(org.hl7.fhir.dstu3.model.SearchParameter.SearchParameterContactComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent tgt=new org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  return tgt;
}
Program: 23548
Project: 23548
Buggy source:
public org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent src,org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt=new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent();
  copyElement(src,tgt);
  tgt.setCodeSystem(g.getTarget());
  tgt.setCode(src.getCode());
  tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
  tgt.setComments(src.getComments());
  for (  org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn())   tgt.addDependsOn(convertOtherElementComponent(t));
  for (  org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getProduct())   tgt.addProduct(convertOtherElementComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent src,org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt=new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent();
  copyElement(src,tgt);
  tgt.setCodeSystem(g.getTarget());
  tgt.setCode(src.getCode());
  tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
  tgt.setComments(src.getComments());
  for (  org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn())   tgt.addDependsOn(convertOtherElementComponent(t));
  for (  org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getProduct())   tgt.addProduct(convertOtherElementComponent(t));
  return tgt;
}
Program: 23549
Project: 23549
Buggy source:
public org.hl7.fhir.dstu2.model.SupplyRequest.SupplyRequestWhenComponent convertSupplyRequestWhenComponent(org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestWhenComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.SupplyRequest.SupplyRequestWhenComponent tgt=new org.hl7.fhir.dstu2.model.SupplyRequest.SupplyRequestWhenComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setSchedule(convertTiming(src.getSchedule()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.SupplyRequest.SupplyRequestWhenComponent convertSupplyRequestWhenComponent(org.hl7.fhir.dstu3.model.SupplyRequest.SupplyRequestWhenComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.SupplyRequest.SupplyRequestWhenComponent tgt=new org.hl7.fhir.dstu2.model.SupplyRequest.SupplyRequestWhenComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setSchedule(convertTiming(src.getSchedule()));
  return tgt;
}
Program: 23550
Project: 23550
Buggy source:
public org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent tgt=new org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent();
  copyElement(src,tgt);
  tgt.setContent(convertType(src.getContent()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent convertCommunicationRequestPayloadComponent(org.hl7.fhir.dstu3.model.CommunicationRequest.CommunicationRequestPayloadComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent tgt=new org.hl7.fhir.dstu2.model.CommunicationRequest.CommunicationRequestPayloadComponent();
  copyElement(src,tgt);
  tgt.setContent(convertType(src.getContent()));
  return tgt;
}
Program: 23551
Project: 23551
Buggy source:
public org.hl7.fhir.dstu2.model.Slot convertSlot(org.hl7.fhir.dstu3.model.Slot src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Slot tgt=new org.hl7.fhir.dstu2.model.Slot();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceType())   tgt.setType(convertCodeableConcept(t));
  tgt.setSchedule(convertReference(src.getSchedule()));
  tgt.setStart(src.getStart());
  tgt.setEnd(src.getEnd());
  tgt.setOverbooked(src.getOverbooked());
  tgt.setComment(src.getComment());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Slot convertSlot(org.hl7.fhir.dstu3.model.Slot src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Slot tgt=new org.hl7.fhir.dstu2.model.Slot();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getServiceType())   tgt.setType(convertCodeableConcept(t));
  tgt.setSchedule(convertReference(src.getSchedule()));
  tgt.setStart(src.getStart());
  tgt.setEnd(src.getEnd());
  tgt.setOverbooked(src.getOverbooked());
  tgt.setComment(src.getComment());
  return tgt;
}