Program: 118612
Project: 118612
Buggy source:
private void combineElementParameters(INode sourceElement,INode targetElement){
  IElementParameter combinedParameters=targetElement.getElementParameter(COMBINED_PARAMETERS);
  if (combinedParameters == null) {
    combinedParameters=new ElementParameter(targetElement);
    combinedParameters.setName(COMBINED_PARAMETERS);
    combinedParameters.setDisplayName(COMBINED_PARAMETERS);
    combinedParameters.setFieldType(EParameterFieldType.TECHNICAL);
    combinedParameters.setCategory(EComponentCategory.SQL_PATTERN);
    combinedParameters.setReadOnly(false);
    combinedParameters.setRequired(false);
    combinedParameters.setShow(false);
    combinedParameters.setValue(new ArrayList<IElementParameter>());
    ((List<IElementParameter>)targetElement.getElementParameters()).add(combinedParameters);
  }
  IElementParameter combinedComponent=new ElementParameter(targetElement);
  combinedComponent.setName(COMBINED_COMPONENT);
  combinedComponent.setDisplayName(COMBINED_PARAMETERS);
  combinedComponent.setFieldType(EParameterFieldType.TECHNICAL);
  combinedComponent.setCategory(EComponentCategory.SQL_PATTERN);
  combinedComponent.setReadOnly(false);
  combinedComponent.setRequired(false);
  combinedComponent.setShow(false);
  combinedComponent.setValue(((AbstractNode)sourceElement).getComponent().getName());
  ((List<IElementParameter>)combinedParameters.getValue()).add(combinedComponent);
  for (  IElementParameter sourceParam : sourceElement.getElementParameters()) {
    if (sourceParam.getFieldType() == EParameterFieldType.SCHEMA_TYPE) {
      if ("String_Node_Str".equals(sourceParam.getContext()) || sourceParam.getContext() == null) {
        sourceParam.setValue(sourceElement.getMetadataList().get(0));
      }
 else {
        sourceParam.setValue(sourceElement.getMetadataFromConnector(sourceParam.getContext()));
      }
    }
    combinedComponent.getChildParameters().put(sourceParam.getName(),sourceParam);
  }
}

Fixed version (ground truth):
private void combineElementParameters(INode sourceElement,INode targetElement){
  IElementParameter combinedParameters=targetElement.getElementParameter(COMBINED_PARAMETERS);
  if (combinedParameters == null) {
    combinedParameters=new ElementParameter(targetElement);
    combinedParameters.setName(COMBINED_PARAMETERS);
    combinedParameters.setDisplayName(COMBINED_PARAMETERS);
    combinedParameters.setFieldType(EParameterFieldType.TECHNICAL);
    combinedParameters.setCategory(EComponentCategory.SQL_PATTERN);
    combinedParameters.setReadOnly(false);
    combinedParameters.setRequired(false);
    combinedParameters.setShow(false);
    combinedParameters.setValue(new ArrayList<IElementParameter>());
    ((List<IElementParameter>)targetElement.getElementParameters()).add(combinedParameters);
  }
  IElementParameter combinedComponent=new ElementParameter(targetElement);
  combinedComponent.setName(COMBINED_COMPONENT);
  combinedComponent.setDisplayName(COMBINED_PARAMETERS);
  combinedComponent.setFieldType(EParameterFieldType.TECHNICAL);
  combinedComponent.setCategory(EComponentCategory.SQL_PATTERN);
  combinedComponent.setReadOnly(false);
  combinedComponent.setRequired(false);
  combinedComponent.setShow(false);
  combinedComponent.setValue(((AbstractNode)sourceElement).getComponent().getName());
  ((List<IElementParameter>)combinedParameters.getValue()).add(combinedComponent);
  for (  IElementParameter sourceParam : sourceElement.getElementParameters()) {
    if (sourceParam.getFieldType() == EParameterFieldType.SCHEMA_TYPE || sourceParam.getFieldType() == EParameterFieldType.SCHEMA_REFERENCE) {
      if ("String_Node_Str".equals(sourceParam.getContext()) || sourceParam.getContext() == null) {
        sourceParam.setValue(sourceElement.getMetadataList().get(0));
      }
 else {
        sourceParam.setValue(sourceElement.getMetadataFromConnector(sourceParam.getContext()));
      }
    }
    combinedComponent.getChildParameters().put(sourceParam.getName(),sourceParam);
  }
}