Program: 23334
Project: 23334
Buggy source:
public org.hl7.fhir.dstu2.model.Conformance convertConformance(org.hl7.fhir.dstu3.model.CapabilityStatement src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Conformance tgt=new org.hl7.fhir.dstu2.model.Conformance();
  copyDomainResource(src,tgt);
  tgt.setUrl(src.getUrl());
  tgt.setVersion(src.getVersion());
  tgt.setName(src.getName());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  if (src.hasExperimental())   tgt.setExperimental(src.getExperimental());
  if (src.hasDate())   tgt.setDate(src.getDate());
  tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact())   tgt.addContact(convertConformanceContactComponent(t));
  tgt.setDescription(src.getDescription());
  tgt.setRequirements(src.getPurpose());
  tgt.setCopyright(src.getCopyright());
  tgt.setKind(convertConformanceStatementKind(src.getKind()));
  tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
  tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
  tgt.setFhirVersion(src.getFhirVersion());
  tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
  for (  org.hl7.fhir.dstu3.model.CodeType t : src.getFormat())   tgt.addFormat(t.getValue());
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getProfile())   tgt.addProfile(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent t : src.getRest())   tgt.addRest(convertConformanceRestComponent(t));
  for (  org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent t : src.getMessaging())   tgt.addMessaging(convertConformanceMessagingComponent(t));
  for (  org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent t : src.getDocument())   tgt.addDocument(convertConformanceDocumentComponent(t));
  return tgt;
}

Fixed version (ground truth):
public org.hl7.fhir.dstu2.model.Conformance convertConformance(org.hl7.fhir.dstu3.model.CapabilityStatement src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2.model.Conformance tgt=new org.hl7.fhir.dstu2.model.Conformance();
  copyDomainResource(src,tgt);
  tgt.setUrl(src.getUrl());
  tgt.setVersion(src.getVersion());
  tgt.setName(src.getName());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  if (src.hasExperimental())   tgt.setExperimental(src.getExperimental());
  if (src.hasDate())   tgt.setDate(src.getDate());
  tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact())   tgt.addContact(convertConformanceContactComponent(t));
  tgt.setDescription(src.getDescription());
  tgt.setRequirements(src.getPurpose());
  tgt.setCopyright(src.getCopyright());
  tgt.setKind(convertConformanceStatementKind(src.getKind()));
  tgt.setSoftware(convertConformanceSoftwareComponent(src.getSoftware()));
  if (src.hasImplementation())   tgt.setImplementation(convertConformanceImplementationComponent(src.getImplementation()));
  tgt.setFhirVersion(src.getFhirVersion());
  tgt.setAcceptUnknown(convertUnknownContentCode(src.getAcceptUnknown()));
  for (  org.hl7.fhir.dstu3.model.CodeType t : src.getFormat())   tgt.addFormat(t.getValue());
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getProfile())   tgt.addProfile(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent t : src.getRest())   tgt.addRest(convertConformanceRestComponent(t));
  for (  org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementMessagingComponent t : src.getMessaging())   tgt.addMessaging(convertConformanceMessagingComponent(t));
  for (  org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementDocumentComponent t : src.getDocument())   tgt.addDocument(convertConformanceDocumentComponent(t));
  return tgt;
}