Program: 23775
Project: 23775
Buggy source:
public org.hl7.fhir.dstu2.model.Procedure convertProcedure(org.hl7.fhir.dstu3.model.Procedure src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.Procedure tgt=new org.hl7.fhir.dstu2.model.Procedure();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setStatus(convertProcedureStatus(src.getStatus()));
  tgt.setCategory(convertCodeableConcept(src.getCategory()));
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setNotPerformed(src.getNotPerformed());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotPerformed())   tgt.addReasonNotPerformed(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getBodySite())   tgt.addBodySite(convertCodeableConcept(t));
  tgt.setReason(convertType(src.getReasonCodeFirstRep()));
  for (  org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent t : src.getPerformer())   tgt.addPerformer(convertProcedurePerformerComponent(t));
  tgt.setPerformed(convertType(src.getPerformed()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setLocation(convertReference(src.getLocation()));
  tgt.setOutcome(convertCodeableConcept(src.getOutcome()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getReport())   tgt.addReport(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getComplication())   tgt.addComplication(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getFollowUp())   tgt.addFollowUp(convertCodeableConcept(t));
  tgt.setRequest(convertReference(src.getRequest()));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNotes())   tgt.addNotes(convertAnnotation(t));
  for (  org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent t : src.getFocalDevice())   tgt.addFocalDevice(convertProcedureFocalDeviceComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Procedure convertProcedure(org.hl7.fhir.dstu3.model.Procedure src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Procedure tgt=new org.hl7.fhir.dstu2.model.Procedure();
  copyDomainResource(src,tgt);
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  tgt.setSubject(convertReference(src.getSubject()));
  tgt.setStatus(convertProcedureStatus(src.getStatus()));
  tgt.setCategory(convertCodeableConcept(src.getCategory()));
  tgt.setCode(convertCodeableConcept(src.getCode()));
  tgt.setNotPerformed(src.getNotPerformed());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonNotPerformed())   tgt.addReasonNotPerformed(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getBodySite())   tgt.addBodySite(convertCodeableConcept(t));
  tgt.setReason(convertType(src.getReasonCodeFirstRep()));
  for (  org.hl7.fhir.dstu3.model.Procedure.ProcedurePerformerComponent t : src.getPerformer())   tgt.addPerformer(convertProcedurePerformerComponent(t));
  tgt.setPerformed(convertType(src.getPerformed()));
  tgt.setEncounter(convertReference(src.getEncounter()));
  tgt.setLocation(convertReference(src.getLocation()));
  tgt.setOutcome(convertCodeableConcept(src.getOutcome()));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getReport())   tgt.addReport(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getComplication())   tgt.addComplication(convertCodeableConcept(t));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getFollowUp())   tgt.addFollowUp(convertCodeableConcept(t));
  tgt.setRequest(convertReference(src.getRequest()));
  for (  org.hl7.fhir.dstu3.model.Annotation t : src.getNotes())   tgt.addNotes(convertAnnotation(t));
  for (  org.hl7.fhir.dstu3.model.Procedure.ProcedureFocalDeviceComponent t : src.getFocalDevice())   tgt.addFocalDevice(convertProcedureFocalDeviceComponent(t));
  return tgt;
}