Program: 23343
Project: 23343
Buggy source:
public static org.hl7.fhir.dstu2016may.model.StructureDefinition convertStructureDefinition(org.hl7.fhir.dstu3.model.StructureDefinition src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2016may.model.StructureDefinition tgt=new org.hl7.fhir.dstu2016may.model.StructureDefinition();
  copyDomainResource(src,tgt);
  if (src.hasUrl())   tgt.setUrl(src.getUrl());
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  if (src.hasVersion())   tgt.setVersion(src.getVersion());
  tgt.setName(src.getName());
  if (src.hasTitle())   tgt.setDisplay(src.getTitle());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  if (src.hasExperimental())   tgt.setExperimental(src.getExperimental());
  if (src.hasPublisher())   tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact())   tgt.addContact(convertStructureDefinitionContactComponent(t));
  if (src.hasDate())   tgt.setDate(src.getDate());
  if (src.hasDescription())   tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext())   if (t.hasValueCodeableConcept())   tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction())   tgt.addUseContext(convertCodeableConcept(t));
  if (src.hasPurpose())   tgt.setRequirements(src.getPurpose());
  if (src.hasCopyright())   tgt.setCopyright(src.getCopyright());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getKeyword())   tgt.addCode(convertCoding(t));
  if (src.hasFhirVersion())   tgt.setFhirVersion(src.getFhirVersion());
  for (  org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping())   tgt.addMapping(convertStructureDefinitionMappingComponent(t));
  tgt.setKind(convertStructureDefinitionKind(src.getKind()));
  tgt.setAbstract(src.getAbstract());
  tgt.setContextType(convertExtensionContext(src.getContextType()));
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getContext())   tgt.addContext(t.getValue());
  if (src.hasBaseDefinition())   tgt.setBaseDefinition(src.getBaseDefinition());
  tgt.setDerivation(convertTypeDerivationRule(src.getDerivation()));
  tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot()));
  tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential()));
  return tgt;
}

Fixed version (ground truth):
public static org.hl7.fhir.dstu2016may.model.StructureDefinition convertStructureDefinition(org.hl7.fhir.dstu3.model.StructureDefinition src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2016may.model.StructureDefinition tgt=new org.hl7.fhir.dstu2016may.model.StructureDefinition();
  copyDomainResource(src,tgt);
  if (src.hasUrl())   tgt.setUrl(src.getUrl());
  for (  org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())   tgt.addIdentifier(convertIdentifier(t));
  if (src.hasVersion())   tgt.setVersion(src.getVersion());
  tgt.setName(src.getName());
  if (src.hasTitle())   tgt.setDisplay(src.getTitle());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  if (src.hasExperimental())   tgt.setExperimental(src.getExperimental());
  if (src.hasPublisher())   tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.ContactDetail t : src.getContact())   tgt.addContact(convertStructureDefinitionContactComponent(t));
  if (src.hasDate())   tgt.setDate(src.getDate());
  if (src.hasDescription())   tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.UsageContext t : src.getUseContext())   if (t.hasValueCodeableConcept())   tgt.addUseContext(convertCodeableConcept(t.getValueCodeableConcept()));
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getJurisdiction())   tgt.addUseContext(convertCodeableConcept(t));
  if (src.hasPurpose())   tgt.setRequirements(src.getPurpose());
  if (src.hasCopyright())   tgt.setCopyright(src.getCopyright());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getKeyword())   tgt.addCode(convertCoding(t));
  if (src.hasFhirVersion())   tgt.setFhirVersion(src.getFhirVersion());
  for (  org.hl7.fhir.dstu3.model.StructureDefinition.StructureDefinitionMappingComponent t : src.getMapping())   tgt.addMapping(convertStructureDefinitionMappingComponent(t));
  tgt.setKind(convertStructureDefinitionKind(src.getKind()));
  tgt.setAbstract(src.getAbstract());
  tgt.setContextType(convertExtensionContext(src.getContextType()));
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getContext())   tgt.addContext(t.getValue());
  if (src.hasBaseDefinition())   tgt.setBaseDefinition(src.getBaseDefinition());
  tgt.setDerivation(convertTypeDerivationRule(src.getDerivation()));
  if (src.hasSnapshot())   tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot()));
  tgt.setDifferential(convertStructureDefinitionDifferentialComponent(src.getDifferential()));
  return tgt;
}