Program: 23698
Project: 23698
Buggy source:
public org.hl7.fhir.dstu2.model.PaymentReconciliation convertPaymentReconciliation(org.hl7.fhir.dstu3.model.PaymentReconciliation src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2.model.PaymentReconciliation tgt=new org.hl7.fhir.dstu2.model.PaymentReconciliation();
  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());
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  if (src.hasOrganizationReference())   tgt.setOrganization((org.hl7.fhir.dstu2.model.Reference)convertType(src.getOrganization()));
  if (src.hasRequestProviderReference())   tgt.setRequestProvider((org.hl7.fhir.dstu2.model.Reference)convertType(src.getRequestProvider()));
  if (src.hasRequestOrganizationReference())   tgt.setRequestOrganization((org.hl7.fhir.dstu2.model.Reference)convertType(src.getRequestOrganization()));
  for (  org.hl7.fhir.dstu3.model.PaymentReconciliation.DetailsComponent t : src.getDetail())   tgt.addDetail(convertDetailsComponent(t));
  tgt.setForm(convertCoding(src.getForm()));
  tgt.setTotal(convertMoney(src.getTotal()));
  for (  org.hl7.fhir.dstu3.model.PaymentReconciliation.NotesComponent t : src.getNote())   tgt.addNote(convertNotesComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.PaymentReconciliation convertPaymentReconciliation(org.hl7.fhir.dstu3.model.PaymentReconciliation src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.PaymentReconciliation tgt=new org.hl7.fhir.dstu2.model.PaymentReconciliation();
  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());
  tgt.setPeriod(convertPeriod(src.getPeriod()));
  if (src.hasOrganizationReference())   tgt.setOrganization((org.hl7.fhir.dstu2.model.Reference)convertType(src.getOrganization()));
  if (src.hasRequestProviderReference())   tgt.setRequestProvider((org.hl7.fhir.dstu2.model.Reference)convertType(src.getRequestProvider()));
  if (src.hasRequestOrganizationReference())   tgt.setRequestOrganization((org.hl7.fhir.dstu2.model.Reference)convertType(src.getRequestOrganization()));
  for (  org.hl7.fhir.dstu3.model.PaymentReconciliation.DetailsComponent t : src.getDetail())   tgt.addDetail(convertDetailsComponent(t));
  tgt.setForm(convertCoding(src.getForm()));
  tgt.setTotal(convertMoney(src.getTotal()));
  for (  org.hl7.fhir.dstu3.model.PaymentReconciliation.NotesComponent t : src.getNote())   tgt.addNote(convertNotesComponent(t));
  return tgt;
}