nus-yam/ex-repair huggingface dataset:
Program: 23451
Project: 23451
Buggy source:
/** 
 * @param element - the candidate that might be in the slice
 * @param path - for reporting any errors. the XPath for the element
 * @param slice - the definition of how slicing is determined
 * @param ed - the slice for which to test membership
 * @return
 * @throws DefinitionException 
 * @throws DefinitionException 
 * @throws Exception
 */
private boolean sliceMatches(Element element,String path,ElementDefinition slice,ElementDefinition ed,StructureDefinition profile) throws DefinitionException, FHIRException {
  if (!slice.getSlicing().hasDiscriminator())   return false;
  for (  StringType s : slice.getSlicing().getDiscriminator()) {
    String discriminator=s.getValue();
    ElementDefinition criteria=getCriteriaForDiscriminator(path,ed,discriminator,profile);
    if (discriminator.equals("String_Node_Str") && criteria.getPath().equals("String_Node_Str")) {
      if (!element.getNamedChildValue("String_Node_Str").equals(((UriType)criteria.getFixed()).asStringValue()))       return false;
    }
 else {
      Element value=getValueForDiscriminator(element,discriminator,criteria);
      if (!valueMatchesCriteria(value,criteria))       return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param element - the candidate that might be in the slice
 * @param path - for reporting any errors. the XPath for the element
 * @param slice - the definition of how slicing is determined
 * @param ed - the slice for which to test membership
 * @return
 * @throws DefinitionException 
 * @throws DefinitionException 
 * @throws Exception
 */
private boolean sliceMatches(Element element,String path,ElementDefinition slice,ElementDefinition ed,StructureDefinition profile) throws DefinitionException, FHIRException {
  if (!slice.getSlicing().hasDiscriminator())   return false;
  for (  StringType s : slice.getSlicing().getDiscriminator()) {
    String discriminator=s.getValue();
    ElementDefinition criteria=getCriteriaForDiscriminator(path,ed,discriminator,profile);
    if (discriminator.equals("String_Node_Str") && criteria.getPath().equals("String_Node_Str")) {
      if (criteria.getFixed() == null)       return false;
 else       if (!element.getNamedChildValue("String_Node_Str").equals(((UriType)criteria.getFixed()).asStringValue()))       return false;
    }
 else {
      Element value=getValueForDiscriminator(element,discriminator,criteria);
      if (!valueMatchesCriteria(value,criteria))       return false;
    }
  }
  return true;
}
Program: 23453
Project: 23453
Buggy source:
private Element getValueForDiscriminator(Element element,String discriminator,ElementDefinition criteria){
  return null;
}

Fixed version (ground truth):
private Element getValueForDiscriminator(Element element,String discriminator,ElementDefinition criteria) throws FHIRException {
  throw new FHIRException("String_Node_Str");
}
Program: 23454
Project: 23454
Buggy source:
private boolean valueMatchesCriteria(Element value,ElementDefinition criteria){
  return false;
}

Fixed version (ground truth):
private boolean valueMatchesCriteria(Element value,ElementDefinition criteria) throws FHIRException {
  throw new FHIRException("String_Node_Str");
}
Program: 23456
Project: 23456
Buggy source:
private boolean isValidFHIRUrn(String uri){
  return (uri.equals("String_Node_Str"));
}

Fixed version (ground truth):
private boolean isValidFHIRUrn(String uri){
  return (uri.equals("String_Node_Str")) || uri.startsWith("String_Node_Str");
}
Program: 23459
Project: 23459
Buggy source:
private void loadValidationPack() throws FileNotFoundException, IOException, FHIRException {
  String source;
  if (version.equals("String_Node_Str"))   source="String_Node_Str";
 else   if (version.equals("String_Node_Str"))   source="String_Node_Str";
 else   throw new FHIRException("String_Node_Str" + version);
  log("String_Node_Str" + source);
  String fn=grabToLocalCache(source);
  log("String_Node_Str");
  context=SimpleWorkerContext.fromPack(fn);
}

Fixed version (ground truth):
private void loadValidationPack() throws FileNotFoundException, IOException, FHIRException {
  String source;
  if (version.equals("String_Node_Str"))   source="String_Node_Str";
 else   if (version.equals("String_Node_Str"))   source="String_Node_Str";
 else   throw new FHIRException("String_Node_Str" + version);
  if (new File("String_Node_Str").exists())   context=SimpleWorkerContext.fromPack("String_Node_Str");
 else {
    log("String_Node_Str" + source);
    String fn=grabToLocalCache(source);
    log("String_Node_Str");
    context=SimpleWorkerContext.fromPack(fn);
  }
}
Program: 23460
Project: 23460
Buggy source:
private Coding buildCoding(String uri,String code) throws FHIRException {
  String system=null;
  ValueSet vs=worker.fetchResource(ValueSet.class,uri);
  if (vs != null) {
    ValueSetExpansionOutcome vse=worker.expandVS(vs,true,false);
    if (vse.getError() != null)     throw new FHIRException(vse.getError());
    for (    ValueSetExpansionContainsComponent t : vse.getValueset().getExpansion().getContains()) {
      if (code.equals(t.getCode()) && t.hasSystem()) {
        system=t.getSystem();
        break;
      }
    }
    if (system == null)     throw new FHIRException("String_Node_Str" + code + "String_Node_Str"+ uri+ "String_Node_Str");
  }
 else   system=uri;
  return new Coding().setSystem(system).setCode(code);
}

Fixed version (ground truth):
private Coding buildCoding(String uri,String code) throws FHIRException {
  String system=null;
  ValueSet vs=worker.fetchResource(ValueSet.class,uri);
  if (vs != null) {
    ValueSetExpansionOutcome vse=worker.expandVS(vs,true,false);
    if (vse.getError() != null)     throw new FHIRException(vse.getError());
    CommaSeparatedStringBuilder b=new CommaSeparatedStringBuilder();
    for (    ValueSetExpansionContainsComponent t : vse.getValueset().getExpansion().getContains()) {
      if (t.hasCode())       b.append(t.getCode());
      if (code.equals(t.getCode()) && t.hasSystem()) {
        system=t.getSystem();
        break;
      }
      if (code.equalsIgnoreCase(t.getDisplay()) && t.hasSystem()) {
        system=t.getSystem();
        break;
      }
    }
    if (system == null)     throw new FHIRException("String_Node_Str" + code + "String_Node_Str"+ uri+ "String_Node_Str"+ b.toString()+ "String_Node_Str");
  }
 else   system=uri;
  return new Coding().setSystem(system).setCode(code);
}
Program: 23462
Project: 23462
Buggy source:
@Override public void setProperty(String name,Base value) throws FHIRException {
  if (name.equals("String_Node_Str"))   this.author=(Type)value;
 else   if (name.equals("String_Node_Str"))   this.time=castToDateTime(value);
 else   if (name.equals("String_Node_Str"))   this.text=castToString(value);
 else   super.setProperty(name,value);
}

Fixed version (ground truth):
@Override public void setProperty(String name,Base value) throws FHIRException {
  if (name.equals("String_Node_Str"))   this.author=castToType(value);
 else   if (name.equals("String_Node_Str"))   this.time=castToDateTime(value);
 else   if (name.equals("String_Node_Str"))   this.text=castToString(value);
 else   super.setProperty(name,value);
}
Program: 23463
Project: 23463
Buggy source:
public static void main(String[] args) throws Exception {
  CKMImporter self=new CKMImporter();
  for (  String s : new File("String_Node_Str").list()) {
    if (s.endsWith("String_Node_Str") && !s.contains("String_Node_Str")) {
      System.out.println("String_Node_Str" + s);
      org.hl7.fhir.dstu2016may.formats.XmlParser xp=new org.hl7.fhir.dstu2016may.formats.XmlParser();
      org.hl7.fhir.dstu2016may.model.Resource r14=xp.parse(new FileInputStream("String_Node_Str" + s));
      org.hl7.fhir.dstu3.model.Resource r17=VersionConvertor_14_20.convertResource(r14);
      org.hl7.fhir.dstu3.formats.XmlParser xc=new org.hl7.fhir.dstu3.formats.XmlParser();
      xc.compose(new FileOutputStream("String_Node_Str" + s),r17);
    }
  }
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  CKMImporter self=new CKMImporter();
  for (  String s : new File("String_Node_Str").list()) {
    if (s.endsWith("String_Node_Str") && !s.contains("String_Node_Str")) {
      System.out.println("String_Node_Str" + s);
      org.hl7.fhir.dstu2016may.formats.XmlParser xp=new org.hl7.fhir.dstu2016may.formats.XmlParser();
      org.hl7.fhir.dstu2016may.model.Resource r14=xp.parse(new FileInputStream("String_Node_Str" + s));
      org.hl7.fhir.dstu3.model.Resource r17=VersionConvertor_14_20.convertResource(r14);
      org.hl7.fhir.dstu3.formats.XmlParser xc=new org.hl7.fhir.dstu3.formats.XmlParser();
      xc.setOutputStyle(OutputStyle.PRETTY);
      xc.compose(new FileOutputStream("String_Node_Str" + s),r17);
    }
  }
  System.out.println("String_Node_Str");
}
Program: 23464
Project: 23464
Buggy source:
public org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent convertMedicationStatementDosageComponent(org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementDosageComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent tgt=new org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent();
  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.setRate(convertType(src.getRate()));
  tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent convertMedicationStatementDosageComponent(org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementDosageComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent tgt=new org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent();
  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.setRate(convertType(src.getRate()));
  tgt.setMaxDosePerPeriod(convertRatio(src.getMaxDosePerPeriod()));
  return tgt;
}
Program: 23465
Project: 23465
Buggy source:
public org.hl7.fhir.dstu2.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.dstu3.model.DocumentManifest src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DocumentManifest tgt=new org.hl7.fhir.dstu2.model.DocumentManifest();
  copyDomainResource(src,tgt);
  tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier()));
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setSubject(convertReference(src.getSubject()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getRecipient())   tgt.addRecipient(convertReference(t));
  tgt.setType(convertCodeableConcept(src.getType()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getAuthor())   tgt.addAuthor(convertReference(t));
  tgt.setCreated(src.getCreated());
  tgt.setSource(src.getSource());
  tgt.setStatus(convertDocumentReferenceStatus(src.getStatus()));
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent t : src.getContent())   tgt.addContent(convertDocumentManifestContentComponent(t));
  for (  org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated())   tgt.addRelated(convertDocumentManifestRelatedComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.dstu3.model.DocumentManifest src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DocumentManifest tgt=new org.hl7.fhir.dstu2.model.DocumentManifest();
  copyDomainResource(src,tgt);
  tgt.setMasterIdentifier(convertIdentifier(src.getMasterIdentifier()));
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setSubject(convertReference(src.getSubject()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getRecipient())   tgt.addRecipient(convertReference(t));
  tgt.setType(convertCodeableConcept(src.getType()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getAuthor())   tgt.addAuthor(convertReference(t));
  tgt.setCreated(src.getCreated());
  tgt.setSource(src.getSource());
  tgt.setStatus(convertDocumentReferenceStatus(src.getStatus()));
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestContentComponent t : src.getContent())   tgt.addContent(convertDocumentManifestContentComponent(t));
  for (  org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated())   tgt.addRelated(convertDocumentManifestRelatedComponent(t));
  return tgt;
}
Program: 23466
Project: 23466
Buggy source:
public org.hl7.fhir.dstu2.model.Specimen convertSpecimen(org.hl7.fhir.dstu3.model.Specimen src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Specimen tgt=new org.hl7.fhir.dstu2.model.Specimen();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setAccessionIdentifier(convertIdentifier(src.getAccessionIdentifier()));
  tgt.setStatus(convertSpecimenStatus(src.getStatus()));
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setReceivedTime(src.getReceivedTime());
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getParent())   tgt.addParent(convertReference(t));
  tgt.setCollection(convertSpecimenCollectionComponent(src.getCollection()));
  for (  org.hl7.fhir.dstu3.model.Specimen.SpecimenTreatmentComponent t : src.getTreatment())   tgt.addTreatment(convertSpecimenTreatmentComponent(t));
  for (  org.hl7.fhir.dstu3.model.Specimen.SpecimenContainerComponent t : src.getContainer())   tgt.addContainer(convertSpecimenContainerComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Specimen convertSpecimen(org.hl7.fhir.dstu3.model.Specimen src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Specimen tgt=new org.hl7.fhir.dstu2.model.Specimen();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setAccessionIdentifier(convertIdentifier(src.getAccessionIdentifier()));
  tgt.setStatus(convertSpecimenStatus(src.getStatus()));
  tgt.setType(convertCodeableConcept(src.getType()));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setReceivedTime(src.getReceivedTime());
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getParent())   tgt.addParent(convertReference(t));
  tgt.setCollection(convertSpecimenCollectionComponent(src.getCollection()));
  for (  org.hl7.fhir.dstu3.model.Specimen.SpecimenTreatmentComponent t : src.getTreatment())   tgt.addTreatment(convertSpecimenTreatmentComponent(t));
  for (  org.hl7.fhir.dstu3.model.Specimen.SpecimenContainerComponent t : src.getContainer())   tgt.addContainer(convertSpecimenContainerComponent(t));
  return tgt;
}
Program: 23467
Project: 23467
Buggy source:
public org.hl7.fhir.dstu2.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Medication.MedicationPackageComponent tgt=new org.hl7.fhir.dstu2.model.Medication.MedicationPackageComponent();
  copyElement(src,tgt);
  tgt.setContainer(convertCodeableConcept(src.getContainer()));
  for (  org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent t : src.getContent())   tgt.addContent(convertMedicationPackageContentComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Medication.MedicationPackageComponent convertMedicationPackageComponent(org.hl7.fhir.dstu3.model.Medication.MedicationPackageComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Medication.MedicationPackageComponent tgt=new org.hl7.fhir.dstu2.model.Medication.MedicationPackageComponent();
  copyElement(src,tgt);
  tgt.setContainer(convertCodeableConcept(src.getContainer()));
  for (  org.hl7.fhir.dstu3.model.Medication.MedicationPackageContentComponent t : src.getContent())   tgt.addContent(convertMedicationPackageContentComponent(t));
  return tgt;
}
Program: 23468
Project: 23468
Buggy source:
public org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent tgt=new org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setTarget(convertReference(src.getTarget()));
  tgt.setEndpoint(src.getEndpoint());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent convertMessageDestinationComponent(org.hl7.fhir.dstu3.model.MessageHeader.MessageDestinationComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent tgt=new org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setTarget(convertReference(src.getTarget()));
  tgt.setEndpoint(src.getEndpoint());
  return tgt;
}
Program: 23469
Project: 23469
Buggy source:
public org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint())   tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
  tgt.setReliableCache(src.getReliableCache());
  tgt.setDocumentation(src.getDocumentation());
  for (  org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent())   tgt.addEvent(convertConformanceMessagingEventComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint())   tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
  tgt.setReliableCache(src.getReliableCache());
  tgt.setDocumentation(src.getDocumentation());
  for (  org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent())   tgt.addEvent(convertConformanceMessagingEventComponent(t));
  return tgt;
}
Program: 23470
Project: 23470
Buggy source:
public org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent convertImplementationGuideContactComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideContactComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent tgt=new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent();
  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.ImplementationGuide.ImplementationGuideContactComponent convertImplementationGuideContactComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideContactComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent tgt=new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  return tgt;
}
Program: 23471
Project: 23471
Buggy source:
public org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent convertOperationDefinitionContactComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionContactComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent tgt=new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent();
  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.OperationDefinition.OperationDefinitionContactComponent convertOperationDefinitionContactComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionContactComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent tgt=new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  for (  org.hl7.fhir.dstu3.model.ContactPoint t : src.getTelecom())   tgt.addTelecom(convertContactPoint(t));
  return tgt;
}
Program: 23472
Project: 23472
Buggy source:
public org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu3.model.Conformance.SystemInteractionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent();
  copyElement(src,tgt);
  tgt.setCode(convertSystemRestfulInteraction(src.getCode()));
  tgt.setDocumentation(src.getDocumentation());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent convertSystemInteractionComponent(org.hl7.fhir.dstu3.model.Conformance.SystemInteractionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent tgt=new org.hl7.fhir.dstu2.model.Conformance.SystemInteractionComponent();
  copyElement(src,tgt);
  tgt.setCode(convertSystemRestfulInteraction(src.getCode()));
  tgt.setDocumentation(src.getDocumentation());
  return tgt;
}
Program: 23473
Project: 23473
Buggy source:
public org.hl7.fhir.dstu2.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.dstu3.model.MedicationStatement src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.MedicationStatement tgt=new org.hl7.fhir.dstu2.model.MedicationStatement();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertMedicationStatementStatus(src.getStatus()));
  tgt.setMedication(convertType(src.getMedication()));
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setEffective(convertType(src.getEffective()));
  tgt.setInformationSource(convertReference(src.getInformationSource()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInformation())   tgt.addSupportingInformation(convertReference(t));
  tgt.setDateAsserted(src.getDateAsserted());
  tgt.setWasNotTaken(src.getNotTaken());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotTaken())   tgt.addReasonNotTaken(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNote())   tgt.setNote(t.getText());
  for (  org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementDosageComponent t : src.getDosage())   tgt.addDosage(convertMedicationStatementDosageComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.dstu3.model.MedicationStatement src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.MedicationStatement tgt=new org.hl7.fhir.dstu2.model.MedicationStatement();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setStatus(convertMedicationStatementStatus(src.getStatus()));
  tgt.setMedication(convertType(src.getMedication()));
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setEffective(convertType(src.getEffective()));
  tgt.setInformationSource(convertReference(src.getInformationSource()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupportingInformation())   tgt.addSupportingInformation(convertReference(t));
  tgt.setDateAsserted(src.getDateAsserted());
  tgt.setWasNotTaken(src.getNotTaken());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotTaken())   tgt.addReasonNotTaken(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNote())   tgt.setNote(t.getText());
  for (  org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementDosageComponent t : src.getDosage())   tgt.addDosage(convertMedicationStatementDosageComponent(t));
  return tgt;
}
Program: 23475
Project: 23475
Buggy source:
public org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent tgt=new org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent();
  copyElement(src,tgt);
  tgt.setAttachment(convertAttachment(src.getAttachment()));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getFormat())   tgt.addFormat(convertCoding(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent convertDocumentReferenceContentComponent(org.hl7.fhir.dstu3.model.DocumentReference.DocumentReferenceContentComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent tgt=new org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceContentComponent();
  copyElement(src,tgt);
  tgt.setAttachment(convertAttachment(src.getAttachment()));
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getFormat())   tgt.addFormat(convertCoding(t));
  return tgt;
}
Program: 23476
Project: 23476
Buggy source:
public org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent convertImplementationGuidePackageComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent tgt=new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource())   tgt.addResource(convertImplementationGuidePackageResourceComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent convertImplementationGuidePackageComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent tgt=new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent();
  copyElement(src,tgt);
  tgt.setName(src.getName());
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource())   tgt.addResource(convertImplementationGuidePackageResourceComponent(t));
  return tgt;
}
Program: 23477
Project: 23477
Buggy source:
public org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent convertEpisodeOfCareStatusHistoryComponent(org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent tgt=new org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent();
  copyElement(src,tgt);
  tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent convertEpisodeOfCareStatusHistoryComponent(org.hl7.fhir.dstu3.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent tgt=new org.hl7.fhir.dstu2.model.EpisodeOfCare.EpisodeOfCareStatusHistoryComponent();
  copyElement(src,tgt);
  tgt.setStatus(convertEpisodeOfCareStatus(src.getStatus()));
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  return tgt;
}
Program: 23478
Project: 23478
Buggy source:
public org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionSlicingComponent convertElementDefinitionSlicingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionSlicingComponent tgt=new org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionSlicingComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getDiscriminator())   tgt.addDiscriminator(t.getValue());
  tgt.setDescription(src.getDescription());
  tgt.setOrdered(src.getOrdered());
  tgt.setRules(convertSlicingRules(src.getRules()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionSlicingComponent convertElementDefinitionSlicingComponent(org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionSlicingComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionSlicingComponent tgt=new org.hl7.fhir.dstu2.model.ElementDefinition.ElementDefinitionSlicingComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getDiscriminator())   tgt.addDiscriminator(t.getValue());
  tgt.setDescription(src.getDescription());
  tgt.setOrdered(src.getOrdered());
  tgt.setRules(convertSlicingRules(src.getRules()));
  return tgt;
}
Program: 23479
Project: 23479
Buggy source:
public org.hl7.fhir.dstu2.model.SimpleQuantity convertSimpleQuantity(org.hl7.fhir.dstu3.model.SimpleQuantity src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.SimpleQuantity tgt=new org.hl7.fhir.dstu2.model.SimpleQuantity();
  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.SimpleQuantity convertSimpleQuantity(org.hl7.fhir.dstu3.model.SimpleQuantity src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.SimpleQuantity tgt=new org.hl7.fhir.dstu2.model.SimpleQuantity();
  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: 23480
Project: 23480
Buggy source:
public org.hl7.fhir.dstu2.model.Medication convertMedication(org.hl7.fhir.dstu3.model.Medication src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Medication tgt=new org.hl7.fhir.dstu2.model.Medication();
  copyDomainResource(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setIsBrand(src.getIsBrand());
  tgt.setManufacturer(convertReference(src.getManufacturer()));
  tgt.setProduct(convertMedicationProductComponent(src.getProduct()));
  tgt.setPackage(convertMedicationPackageComponent(src.getPackage()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Medication convertMedication(org.hl7.fhir.dstu3.model.Medication src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Medication tgt=new org.hl7.fhir.dstu2.model.Medication();
  copyDomainResource(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setIsBrand(src.getIsBrand());
  tgt.setManufacturer(convertReference(src.getManufacturer()));
  tgt.setProduct(convertMedicationProductComponent(src.getProduct()));
  tgt.setPackage(convertMedicationPackageComponent(src.getPackage()));
  return tgt;
}
Program: 23481
Project: 23481
Buggy source:
public org.hl7.fhir.dstu2.model.Goal convertGoal(org.hl7.fhir.dstu3.model.Goal src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Goal tgt=new org.hl7.fhir.dstu2.model.Goal();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setStart(convertType(src.getStart()));
  tgt.setTarget(convertType(src.getTarget()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCategory())   tgt.addCategory(convertCodeableConcept(t));
  tgt.setDescription(src.getDescription().getText());
  tgt.setStatus(convertGoalStatus(src.getStatus()));
  tgt.setStatusDate(src.getStatusDate());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getStatusReason())   tgt.setStatusReason(convertCodeableConcept(t));
  tgt.setPriority(convertCodeableConcept(src.getPriority()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getAddresses())   tgt.addAddresses(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNote())   tgt.addNote(convertAnnotation(t));
  for (  org.hl7.fhir.dstu3.model.Goal.GoalOutcomeComponent t : src.getOutcome())   tgt.addOutcome(convertGoalOutcomeComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Goal convertGoal(org.hl7.fhir.dstu3.model.Goal src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Goal tgt=new org.hl7.fhir.dstu2.model.Goal();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setStart(convertType(src.getStart()));
  tgt.setTarget(convertType(src.getTarget()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCategory())   tgt.addCategory(convertCodeableConcept(t));
  tgt.setDescription(src.getDescription().getText());
  tgt.setStatus(convertGoalStatus(src.getStatus()));
  tgt.setStatusDate(src.getStatusDate());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getStatusReason())   tgt.setStatusReason(convertCodeableConcept(t));
  tgt.setPriority(convertCodeableConcept(src.getPriority()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getAddresses())   tgt.addAddresses(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNote())   tgt.addNote(convertAnnotation(t));
  for (  org.hl7.fhir.dstu3.model.Goal.GoalOutcomeComponent t : src.getOutcome())   tgt.addOutcome(convertGoalOutcomeComponent(t));
  return tgt;
}
Program: 23482
Project: 23482
Buggy source:
public org.hl7.fhir.dstu2.model.FamilyMemberHistory convertFamilyMemberHistory(org.hl7.fhir.dstu3.model.FamilyMemberHistory src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.FamilyMemberHistory tgt=new org.hl7.fhir.dstu2.model.FamilyMemberHistory();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setDate(src.getDate());
  tgt.setStatus(convertFamilyHistoryStatus(src.getStatus()));
  tgt.setName(src.getName());
  tgt.setRelationship(convertCodeableConcept(src.getRelationship()));
  tgt.setGender(convertAdministrativeGender(src.getGender()));
  tgt.setBorn(convertType(src.getBorn()));
  tgt.setAge(convertType(src.getAge()));
  tgt.setDeceased(convertType(src.getDeceased()));
  tgt.setNote(convertAnnotation(src.getNote()));
  for (  org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent t : src.getCondition())   tgt.addCondition(convertFamilyMemberHistoryConditionComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.FamilyMemberHistory convertFamilyMemberHistory(org.hl7.fhir.dstu3.model.FamilyMemberHistory src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.FamilyMemberHistory tgt=new org.hl7.fhir.dstu2.model.FamilyMemberHistory();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setDate(src.getDate());
  tgt.setStatus(convertFamilyHistoryStatus(src.getStatus()));
  tgt.setName(src.getName());
  tgt.setRelationship(convertCodeableConcept(src.getRelationship()));
  tgt.setGender(convertAdministrativeGender(src.getGender()));
  tgt.setBorn(convertType(src.getBorn()));
  tgt.setAge(convertType(src.getAge()));
  tgt.setDeceased(convertType(src.getDeceased()));
  tgt.setNote(convertAnnotation(src.getNote()));
  for (  org.hl7.fhir.dstu3.model.FamilyMemberHistory.FamilyMemberHistoryConditionComponent t : src.getCondition())   tgt.addCondition(convertFamilyMemberHistoryConditionComponent(t));
  return tgt;
}
Program: 23483
Project: 23483
Buggy source:
public org.hl7.fhir.dstu2.model.Annotation convertAnnotation(org.hl7.fhir.dstu3.model.Annotation src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Annotation tgt=new org.hl7.fhir.dstu2.model.Annotation();
  copyElement(src,tgt);
  tgt.setAuthor(convertType(src.getAuthor()));
  tgt.setTime(src.getTime());
  tgt.setText(src.getText());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Annotation convertAnnotation(org.hl7.fhir.dstu3.model.Annotation src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Annotation tgt=new org.hl7.fhir.dstu2.model.Annotation();
  copyElement(src,tgt);
  tgt.setAuthor(convertType(src.getAuthor()));
  tgt.setTime(src.getTime());
  tgt.setText(src.getText());
  return tgt;
}
Program: 23484
Project: 23484
Buggy source:
public org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt=new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent();
  copyElement(src,tgt);
  tgt.setStrength(convertBindingStrength(src.getStrength()));
  tgt.setValueSet(convertType(src.getValueSet()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent convertOperationDefinitionParameterBindingComponent(org.hl7.fhir.dstu3.model.OperationDefinition.OperationDefinitionParameterBindingComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent tgt=new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterBindingComponent();
  copyElement(src,tgt);
  tgt.setStrength(convertBindingStrength(src.getStrength()));
  tgt.setValueSet(convertType(src.getValueSet()));
  return tgt;
}
Program: 23485
Project: 23485
Buggy source:
public org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent convertCompositionAttesterComponent(org.hl7.fhir.dstu3.model.Composition.CompositionAttesterComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent tgt=new org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode> t : src.getMode())   tgt.addMode(convertCompositionAttestationMode(t.getValue()));
  tgt.setTime(src.getTime());
  tgt.setParty(convertReference(src.getParty()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent convertCompositionAttesterComponent(org.hl7.fhir.dstu3.model.Composition.CompositionAttesterComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent tgt=new org.hl7.fhir.dstu2.model.Composition.CompositionAttesterComponent();
  copyElement(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Composition.CompositionAttestationMode> t : src.getMode())   tgt.addMode(convertCompositionAttestationMode(t.getValue()));
  tgt.setTime(src.getTime());
  tgt.setParty(convertReference(src.getParty()));
  return tgt;
}
Program: 23486
Project: 23486
Buggy source:
public org.hl7.fhir.dstu2.model.SupplyRequest convertSupplyRequest(org.hl7.fhir.dstu3.model.SupplyRequest src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.SupplyRequest tgt=new org.hl7.fhir.dstu2.model.SupplyRequest();
  copyDomainResource(src,tgt);
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setSource(convertReference(src.getSource()));
  tgt.setDate(src.getDate());
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setStatus(convertSupplyRequestStatus(src.getStatus()));
  tgt.setKind(convertCodeableConcept(src.getKind()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupplier())   tgt.addSupplier(convertReference(t));
  tgt.setReason(convertType(src.getReason()));
  tgt.setWhen(convertSupplyRequestWhenComponent(src.getWhen()));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.SupplyRequest convertSupplyRequest(org.hl7.fhir.dstu3.model.SupplyRequest src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.SupplyRequest tgt=new org.hl7.fhir.dstu2.model.SupplyRequest();
  copyDomainResource(src,tgt);
  tgt.setPatient(convertReference(src.getPatient()));
  tgt.setSource(convertReference(src.getSource()));
  tgt.setDate(src.getDate());
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setStatus(convertSupplyRequestStatus(src.getStatus()));
  tgt.setKind(convertCodeableConcept(src.getKind()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getSupplier())   tgt.addSupplier(convertReference(t));
  tgt.setReason(convertType(src.getReason()));
  tgt.setWhen(convertSupplyRequestWhenComponent(src.getWhen()));
  return tgt;
}
Program: 23487
Project: 23487
Buggy source:
public org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent convertImmunizationRecommendationRecommendationDateCriterionComponent(org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent tgt=new org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setValue(src.getValue());
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent convertImmunizationRecommendationRecommendationDateCriterionComponent(org.hl7.fhir.dstu3.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent tgt=new org.hl7.fhir.dstu2.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent();
  copyElement(src,tgt);
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setValue(src.getValue());
  return tgt;
}