Program: 23209
Project: 23209
Buggy source:
public static org.hl7.fhir.dstu3.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.r4.model.DiagnosticReport src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu3.model.DiagnosticReport tgt=new org.hl7.fhir.dstu3.model.DiagnosticReport();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  for (  org.hl7.fhir.r4.model.Reference t : src.getBasedOn())   tgt.addBasedOn(convertReference(t));
  if (src.hasStatus())   tgt.setStatus(convertDiagnosticReportStatus(src.getStatus()));
  if (src.hasCategory())   tgt.setCategory(convertCodeableConcept(src.getCategory()));
  if (src.hasCode())   tgt.setCode(convertCodeableConcept(src.getCode()));
  if (src.hasSubject())   tgt.setSubject(convertReference(src.getSubject()));
  if (src.hasContext())   tgt.setContext(convertReference(src.getContext()));
  if (src.hasEffective())   tgt.setEffective(convertType(src.getEffective()));
  if (src.hasIssued())   tgt.setIssued(src.getIssued());
  for (  org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportPerformerComponent t : src.getPerformer())   tgt.addPerformer(convertDiagnosticReportPerformerComponent(t));
  for (  org.hl7.fhir.r4.model.Reference t : src.getSpecimen())   tgt.addSpecimen(convertReference(t));
  for (  org.hl7.fhir.r4.model.Reference t : src.getResult())   tgt.addResult(convertReference(t));
  for (  org.hl7.fhir.r4.model.Reference t : src.getImagingStudy())   tgt.addImagingStudy(convertReference(t));
  for (  org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage())   tgt.addImage(convertDiagnosticReportImageComponent(t));
  if (src.hasConclusion())   tgt.setConclusion(src.getConclusion());
  for (  org.hl7.fhir.r4.model.CodeableConcept t : src.getCodedDiagnosis())   tgt.addCodedDiagnosis(convertCodeableConcept(t));
  for (  org.hl7.fhir.r4.model.Attachment t : src.getPresentedForm())   tgt.addPresentedForm(convertAttachment(t));
  return tgt;
}

Fixed version (ground truth):
public static org.hl7.fhir.dstu3.model.DiagnosticReport convertDiagnosticReport(org.hl7.fhir.r4.model.DiagnosticReport src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu3.model.DiagnosticReport tgt=new org.hl7.fhir.dstu3.model.DiagnosticReport();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  for (  org.hl7.fhir.r4.model.Reference t : src.getBasedOn())   tgt.addBasedOn(convertReference(t));
  if (src.hasStatus())   tgt.setStatus(convertDiagnosticReportStatus(src.getStatus()));
  if (src.hasCategory())   tgt.setCategory(convertCodeableConcept(src.getCategory()));
  if (src.hasCode())   tgt.setCode(convertCodeableConcept(src.getCode()));
  if (src.hasSubject())   tgt.setSubject(convertReference(src.getSubject()));
  if (src.hasContext())   tgt.setContext(convertReference(src.getContext()));
  if (src.hasEffective())   tgt.setEffective(convertType(src.getEffective()));
  if (src.hasIssued())   tgt.setIssued(src.getIssued());
  for (  org.hl7.fhir.r4.model.Reference t : src.getSpecimen())   tgt.addSpecimen(convertReference(t));
  for (  org.hl7.fhir.r4.model.Reference t : src.getResult())   tgt.addResult(convertReference(t));
  for (  org.hl7.fhir.r4.model.Reference t : src.getImagingStudy())   tgt.addImagingStudy(convertReference(t));
  for (  org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage())   tgt.addImage(convertDiagnosticReportImageComponent(t));
  if (src.hasConclusion())   tgt.setConclusion(src.getConclusion());
  for (  org.hl7.fhir.r4.model.CodeableConcept t : src.getCodedDiagnosis())   tgt.addCodedDiagnosis(convertCodeableConcept(t));
  for (  org.hl7.fhir.r4.model.Attachment t : src.getPresentedForm())   tgt.addPresentedForm(convertAttachment(t));
  return tgt;
}