Program: 23823
Project: 23823
Buggy source:
public static org.hl7.fhir.dstu2016may.model.ElementDefinition convertElementDefinition(org.hl7.fhir.dstu3.model.ElementDefinition src) throws FHIRException {
  if (src == null)   return null;
  org.hl7.fhir.dstu2016may.model.ElementDefinition tgt=new org.hl7.fhir.dstu2016may.model.ElementDefinition();
  copyElement(src,tgt);
  tgt.setPath(src.getPath());
  for (  org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation> t : src.getRepresentation())   tgt.addRepresentation(convertPropertyRepresentation(t.getValue()));
  tgt.setName(src.getName());
  tgt.setLabel(src.getLabel());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getCode())   tgt.addCode(convertCoding(t));
  tgt.setSlicing(convertElementDefinitionSlicingComponent(src.getSlicing()));
  tgt.setShort(src.getShort());
  tgt.setDefinition(src.getDefinition());
  tgt.setComments(src.getComments());
  tgt.setRequirements(src.getRequirements());
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getAlias())   tgt.addAlias(t.getValue());
  tgt.setMin(src.getMin());
  tgt.setMax(src.getMax());
  tgt.setBase(convertElementDefinitionBaseComponent(src.getBase()));
  tgt.setContentReference(src.getContentReference());
  for (  org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent t : src.getType())   tgt.addType(convertTypeRefComponent(t));
  tgt.setDefaultValue(convertType(src.getDefaultValue()));
  tgt.setMeaningWhenMissing(src.getMeaningWhenMissing());
  tgt.setFixed(convertType(src.getFixed()));
  tgt.setPattern(convertType(src.getPattern()));
  tgt.setExample(convertType(src.getExample()));
  tgt.setMinValue(convertType(src.getMinValue()));
  tgt.setMaxValue(convertType(src.getMaxValue()));
  tgt.setMaxLength(src.getMaxLength());
  for (  org.hl7.fhir.dstu3.model.IdType t : src.getCondition())   tgt.addCondition(t.getValue());
  for (  org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent t : src.getConstraint())   tgt.addConstraint(convertElementDefinitionConstraintComponent(t));
  tgt.setMustSupport(src.getMustSupport());
  tgt.setIsModifier(src.getIsModifier());
  tgt.setIsSummary(src.getIsSummary());
  tgt.setBinding(convertElementDefinitionBindingComponent(src.getBinding()));
  for (  org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent t : src.getMapping())   tgt.addMapping(convertElementDefinitionMappingComponent(t));
  return tgt;
}

Fixed version (ground truth):
public static org.hl7.fhir.dstu2016may.model.ElementDefinition convertElementDefinition(org.hl7.fhir.dstu3.model.ElementDefinition src) throws FHIRException {
  if (src == null || src.isEmpty())   return null;
  org.hl7.fhir.dstu2016may.model.ElementDefinition tgt=new org.hl7.fhir.dstu2016may.model.ElementDefinition();
  copyElement(src,tgt);
  tgt.setPath(src.getPath());
  for (  org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.ElementDefinition.PropertyRepresentation> t : src.getRepresentation())   tgt.addRepresentation(convertPropertyRepresentation(t.getValue()));
  tgt.setName(src.getName());
  tgt.setLabel(src.getLabel());
  for (  org.hl7.fhir.dstu3.model.Coding t : src.getCode())   tgt.addCode(convertCoding(t));
  tgt.setSlicing(convertElementDefinitionSlicingComponent(src.getSlicing()));
  tgt.setShort(src.getShort());
  tgt.setDefinition(src.getDefinition());
  tgt.setComments(src.getComments());
  tgt.setRequirements(src.getRequirements());
  for (  org.hl7.fhir.dstu3.model.StringType t : src.getAlias())   tgt.addAlias(t.getValue());
  tgt.setMin(src.getMin());
  tgt.setMax(src.getMax());
  tgt.setBase(convertElementDefinitionBaseComponent(src.getBase()));
  tgt.setContentReference(src.getContentReference());
  for (  org.hl7.fhir.dstu3.model.ElementDefinition.TypeRefComponent t : src.getType())   tgt.addType(convertTypeRefComponent(t));
  tgt.setDefaultValue(convertType(src.getDefaultValue()));
  tgt.setMeaningWhenMissing(src.getMeaningWhenMissing());
  tgt.setFixed(convertType(src.getFixed()));
  tgt.setPattern(convertType(src.getPattern()));
  tgt.setExample(convertType(src.getExample()));
  tgt.setMinValue(convertType(src.getMinValue()));
  tgt.setMaxValue(convertType(src.getMaxValue()));
  tgt.setMaxLength(src.getMaxLength());
  for (  org.hl7.fhir.dstu3.model.IdType t : src.getCondition())   tgt.addCondition(t.getValue());
  for (  org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent t : src.getConstraint())   tgt.addConstraint(convertElementDefinitionConstraintComponent(t));
  tgt.setMustSupport(src.getMustSupport());
  tgt.setIsModifier(src.getIsModifier());
  tgt.setIsSummary(src.getIsSummary());
  tgt.setBinding(convertElementDefinitionBindingComponent(src.getBinding()));
  for (  org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionMappingComponent t : src.getMapping())   tgt.addMapping(convertElementDefinitionMappingComponent(t));
  return tgt;
}