Program: 23895
Project: 23895
Buggy source:
public static org.hl7.fhir.dstu2016may.model.TestScript convertTestScript(org.hl7.fhir.dstu3.model.TestScript src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2016may.model.TestScript tgt=new org.hl7.fhir.dstu2016may.model.TestScript();
  copyDomainResource(src,tgt);
  tgt.setUrl(src.getUrl());
  tgt.setVersion(src.getVersion());
  tgt.setName(src.getName());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setExperimental(src.getExperimental());
  tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptContactComponent t : src.getContact())   tgt.addContact(convertTestScriptContactComponent(t));
  tgt.setDate(src.getDate());
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getUseContext())   tgt.addUseContext(convertCodeableConcept(t));
  tgt.setRequirements(src.getRequirements());
  tgt.setCopyright(src.getCopyright());
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent t : src.getOrigin())   tgt.addOrigin(convertTestScriptOriginComponent(t));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent t : src.getDestination())   tgt.addDestination(convertTestScriptDestinationComponent(t));
  tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata()));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent t : src.getFixture())   tgt.addFixture(convertTestScriptFixtureComponent(t));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getProfile())   tgt.addProfile(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent t : src.getVariable())   tgt.addVariable(convertTestScriptVariableComponent(t));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent t : src.getRule())   tgt.addRule(convertTestScriptRuleComponent(t));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent t : src.getRuleset())   tgt.addRuleset(convertTestScriptRulesetComponent(t));
  tgt.setSetup(convertTestScriptSetupComponent(src.getSetup()));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent t : src.getTest())   tgt.addTest(convertTestScriptTestComponent(t));
  tgt.setTeardown(convertTestScriptTeardownComponent(src.getTeardown()));
  return tgt;
}

Fixed version (ground truth):
public static org.hl7.fhir.dstu2016may.model.TestScript convertTestScript(org.hl7.fhir.dstu3.model.TestScript src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2016may.model.TestScript tgt=new org.hl7.fhir.dstu2016may.model.TestScript();
  copyDomainResource(src,tgt);
  tgt.setUrl(src.getUrl());
  tgt.setVersion(src.getVersion());
  tgt.setName(src.getName());
  tgt.setStatus(convertConformanceResourceStatus(src.getStatus()));
  tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
  tgt.setExperimental(src.getExperimental());
  tgt.setPublisher(src.getPublisher());
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptContactComponent t : src.getContact())   tgt.addContact(convertTestScriptContactComponent(t));
  tgt.setDate(src.getDate());
  tgt.setDescription(src.getDescription());
  for (  org.hl7.fhir.dstu3.model.CodeableConcept t : src.getUseContext())   tgt.addUseContext(convertCodeableConcept(t));
  tgt.setRequirements(src.getRequirements());
  tgt.setCopyright(src.getCopyright());
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptOriginComponent t : src.getOrigin())   tgt.addOrigin(convertTestScriptOriginComponent(t));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptDestinationComponent t : src.getDestination())   tgt.addDestination(convertTestScriptDestinationComponent(t));
  tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata()));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptFixtureComponent t : src.getFixture())   tgt.addFixture(convertTestScriptFixtureComponent(t));
  for (  org.hl7.fhir.dstu3.model.Reference t : src.getProfile())   tgt.addProfile(convertReference(t));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptVariableComponent t : src.getVariable())   tgt.addVariable(convertTestScriptVariableComponent(t));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptRuleComponent t : src.getRule())   tgt.addRule(convertTestScriptRuleComponent(t));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptRulesetComponent t : src.getRuleset())   tgt.addRuleset(convertTestScriptRulesetComponent(t));
  tgt.setSetup(convertTestScriptSetupComponent(src.getSetup()));
  for (  org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent t : src.getTest())   tgt.addTest(convertTestScriptTestComponent(t));
  tgt.setTeardown(convertTestScriptTeardownComponent(src.getTeardown()));
  return tgt;
}