Program: 118812
Project: 118812
Buggy source:
private void createSpecificParametersFromType(final List<ElementParameter> listParam,final PARAMETERType xmlParam,final INode node,final EParameterFieldType type,ElementParameter parentParam){
  if (type == EParameterFieldType.PROPERTY_TYPE) {
    ElementParameter newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.PROPERTY_TYPE.getName());
    String displayName=getTranslatedValue(xmlParam.getNAME() + "String_Node_Str" + PROP_NAME);
    if (displayName.startsWith("String_Node_Str")) {
      displayName=EParameterName.PROPERTY_TYPE.getDisplayName();
    }
    newParam.setDisplayName(displayName);
    if (node.getComponent() != null && node.getComponent().getName().equals("String_Node_Str")) {
      newParam.setListItemsDisplayName(new String[]{TEXT_BUILTIN,TEXT_REPOSITORY,TEXT_TNS_FILE});
      newParam.setListItemsDisplayCodeName(new String[]{BUILTIN,REPOSITORY,TNS_FILE});
      newParam.setListItemsValue(new String[]{BUILTIN,REPOSITORY,TNS_FILE});
    }
 else {
      newParam.setListItemsDisplayName(new String[]{TEXT_BUILTIN,TEXT_REPOSITORY});
      newParam.setListItemsDisplayCodeName(new String[]{BUILTIN,REPOSITORY});
      newParam.setListItemsValue(new String[]{BUILTIN,REPOSITORY});
    }
    newParam.setValue(BUILTIN);
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setRepositoryValue(xmlParam.getREPOSITORYVALUE());
    if (xmlParam.isSetSHOW()) {
      newParam.setShow(xmlParam.isSHOW());
    }
    newParam.setShowIf(xmlParam.getSHOWIF());
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setParentParameter(parentParam);
    newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());
    newParam.setDisplayName(EParameterName.REPOSITORY_PROPERTY_TYPE.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{});
    newParam.setListItemsValue(new String[]{});
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setValue("String_Node_Str");
    newParam.setShow(false);
    newParam.setRequired(true);
    newParam.setParentParameter(parentParam);
  }
  if (type == EParameterFieldType.SCHEMA_TYPE) {
    String context=xmlParam.getCONTEXT();
    if (context == null) {
      context=EConnectionType.FLOW_MAIN.getName();
      if (getOriginalFamilyName().startsWith("String_Node_Str")) {
        context=EConnectionType.TABLE.getName();
      }
    }
    boolean useInputLinkSelection=connectorUseInputLinkSelection(context);
    String displayName=getTranslatedValue(xmlParam.getNAME() + "String_Node_Str" + PROP_NAME);
    if (displayName.startsWith("String_Node_Str")) {
      displayName=EParameterName.SCHEMA_TYPE.getDisplayName();
    }
    ElementParameter newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.SCHEMA_TYPE.getName());
    newParam.setDisplayName(displayName);
    newParam.setListItemsDisplayName(new String[]{TEXT_BUILTIN,TEXT_REPOSITORY});
    newParam.setListItemsDisplayCodeName(new String[]{BUILTIN,REPOSITORY});
    newParam.setListItemsValue(new String[]{BUILTIN,REPOSITORY});
    newParam.setValue(BUILTIN);
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setShow(xmlParam.isSHOW());
    newParam.setShowIf(parentParam.getName() + "String_Node_Str" + REPOSITORY+ "String_Node_Str");
    newParam.setReadOnly(xmlParam.isREADONLY() || useInputLinkSelection);
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setContext(context);
    newParam.setParentParameter(parentParam);
    newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.REPOSITORY_SCHEMA_TYPE.getName());
    newParam.setDisplayName(EParameterName.REPOSITORY_SCHEMA_TYPE.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{});
    newParam.setListItemsValue(new String[]{});
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setValue("String_Node_Str");
    newParam.setShow(false);
    newParam.setRequired(true);
    newParam.setReadOnly(xmlParam.isREADONLY() || useInputLinkSelection);
    newParam.setShowIf(xmlParam.getSHOWIF());
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setContext(context);
    newParam.setParentParameter(parentParam);
    if (useInputLinkSelection) {
      newParam=new ElementParameter(node);
      newParam.setCategory(EComponentCategory.BASIC);
      newParam.setName(EParameterName.CONNECTION.getName());
      newParam.setDisplayName(Messages.getString("String_Node_Str"));
      newParam.setListItemsDisplayName(new String[]{});
      newParam.setListItemsValue(new String[]{});
      newParam.setNumRow(xmlParam.getNUMROW());
      newParam.setFieldType(EParameterFieldType.CONNECTION_LIST);
      newParam.setValue("String_Node_Str");
      newParam.setShow(true);
      newParam.setRequired(true);
      newParam.setFilter("String_Node_Str");
      newParam.setReadOnly(xmlParam.isREADONLY());
      newParam.setShowIf(xmlParam.getSHOWIF());
      newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
      newParam.setContext(context);
      newParam.setParentParameter(parentParam);
      parentParam.setReadOnly(true);
    }
  }
  if (type == EParameterFieldType.ENCODING_TYPE) {
    ElementParameter newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.ENCODING_TYPE.getName());
    newParam.setDisplayName(EParameterName.ENCODING_TYPE.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{ENCODING_TYPE_ISO_8859_15,ENCODING_TYPE_UTF_8,ENCODING_TYPE_CUSTOM});
    newParam.setListItemsDisplayCodeName(new String[]{ENCODING_TYPE_ISO_8859_15,ENCODING_TYPE_UTF_8,ENCODING_TYPE_CUSTOM});
    newParam.setListItemsValue(new String[]{ENCODING_TYPE_ISO_8859_15,ENCODING_TYPE_UTF_8,ENCODING_TYPE_CUSTOM});
    newParam.setValue(ENCODING_TYPE_ISO_8859_15);
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setShow(true);
    newParam.setShowIf(xmlParam.getSHOWIF());
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setParentParameter(parentParam);
  }
  if (type == EParameterFieldType.QUERYSTORE_TYPE) {
    ElementParameter newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.QUERYSTORE_TYPE.getName());
    newParam.setDisplayName(EParameterName.QUERYSTORE_TYPE.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{TEXT_BUILTIN,TEXT_REPOSITORY});
    newParam.setListItemsDisplayCodeName(new String[]{BUILTIN,REPOSITORY});
    newParam.setListItemsValue(new String[]{BUILTIN,REPOSITORY});
    newParam.setValue(BUILTIN);
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    if (xmlParam.isSetSHOW()) {
      newParam.setShow(xmlParam.isSHOW());
    }
    newParam.setShowIf(xmlParam.getSHOWIF());
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setParentParameter(parentParam);
    newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.REPOSITORY_QUERYSTORE_TYPE.getName());
    newParam.setDisplayName(EParameterName.REPOSITORY_QUERYSTORE_TYPE.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{});
    newParam.setListItemsValue(new String[]{});
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setValue("String_Node_Str");
    newParam.setShow(false);
    newParam.setRequired(true);
    newParam.setShowIf(xmlParam.getSHOWIF());
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setParentParameter(parentParam);
  }
  if (type == EParameterFieldType.PROCESS_TYPE || type == EParameterFieldType.ROUTE_INPUT_PROCESS_TYPE) {
    ElementParameter newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.PROCESS_TYPE_PROCESS.getName());
    if (getTranslatedValue(xmlParam.getNAME() + "String_Node_Str" + PROP_NAME).startsWith("String_Node_Str")) {
      newParam.setDisplayName(EParameterName.PROCESS_TYPE_PROCESS.getDisplayName());
    }
 else {
      newParam.setDisplayName(getTranslatedValue(xmlParam.getNAME() + "String_Node_Str" + PROP_NAME));
    }
    newParam.setListItemsDisplayName(new String[]{});
    newParam.setListItemsValue(new String[]{});
    newParam.setValue("String_Node_Str");
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    if (xmlParam.isSetSHOW()) {
      newParam.setShow(xmlParam.isSHOW());
    }
    newParam.setRequired(true);
    newParam.setParentParameter(parentParam);
    newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.PROCESS_TYPE_VERSION.getName());
    newParam.setDisplayName(EParameterName.PROCESS_TYPE_VERSION.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{ItemCacheManager.LATEST_VERSION});
    newParam.setListItemsValue(new String[]{ItemCacheManager.LATEST_VERSION});
    newParam.setValue(ItemCacheManager.LATEST_VERSION);
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    if (xmlParam.isSetSHOW()) {
      newParam.setShow(xmlParam.isSHOW());
    }
    newParam.setRequired(true);
    newParam.setParentParameter(parentParam);
    newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.PROCESS_TYPE_CONTEXT.getName());
    newParam.setDisplayName(EParameterName.PROCESS_TYPE_CONTEXT.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{});
    newParam.setListItemsValue(new String[]{});
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setValue("String_Node_Str");
    if (xmlParam.isSetSHOW()) {
      newParam.setShow(xmlParam.isSHOW());
    }
    newParam.setRequired(true);
    newParam.setParentParameter(parentParam);
  }
}

Fixed version (ground truth):
private void createSpecificParametersFromType(final List<ElementParameter> listParam,final PARAMETERType xmlParam,final INode node,final EParameterFieldType type,ElementParameter parentParam){
  if (type == EParameterFieldType.PROPERTY_TYPE) {
    ElementParameter newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.PROPERTY_TYPE.getName());
    String displayName=getTranslatedValue(xmlParam.getNAME() + "String_Node_Str" + PROP_NAME);
    if (displayName.startsWith("String_Node_Str")) {
      displayName=EParameterName.PROPERTY_TYPE.getDisplayName();
    }
    newParam.setDisplayName(displayName);
    newParam.setListItemsDisplayName(new String[]{TEXT_BUILTIN,TEXT_REPOSITORY});
    newParam.setListItemsDisplayCodeName(new String[]{BUILTIN,REPOSITORY});
    newParam.setListItemsValue(new String[]{BUILTIN,REPOSITORY});
    newParam.setValue(BUILTIN);
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setRepositoryValue(xmlParam.getREPOSITORYVALUE());
    if (xmlParam.isSetSHOW()) {
      newParam.setShow(xmlParam.isSHOW());
    }
    newParam.setShowIf(xmlParam.getSHOWIF());
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setParentParameter(parentParam);
    newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());
    newParam.setDisplayName(EParameterName.REPOSITORY_PROPERTY_TYPE.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{});
    newParam.setListItemsValue(new String[]{});
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setValue("String_Node_Str");
    newParam.setShow(false);
    newParam.setRequired(true);
    newParam.setParentParameter(parentParam);
  }
  if (type == EParameterFieldType.SCHEMA_TYPE) {
    String context=xmlParam.getCONTEXT();
    if (context == null) {
      context=EConnectionType.FLOW_MAIN.getName();
      if (getOriginalFamilyName().startsWith("String_Node_Str")) {
        context=EConnectionType.TABLE.getName();
      }
    }
    boolean useInputLinkSelection=connectorUseInputLinkSelection(context);
    String displayName=getTranslatedValue(xmlParam.getNAME() + "String_Node_Str" + PROP_NAME);
    if (displayName.startsWith("String_Node_Str")) {
      displayName=EParameterName.SCHEMA_TYPE.getDisplayName();
    }
    ElementParameter newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.SCHEMA_TYPE.getName());
    newParam.setDisplayName(displayName);
    newParam.setListItemsDisplayName(new String[]{TEXT_BUILTIN,TEXT_REPOSITORY});
    newParam.setListItemsDisplayCodeName(new String[]{BUILTIN,REPOSITORY});
    newParam.setListItemsValue(new String[]{BUILTIN,REPOSITORY});
    newParam.setValue(BUILTIN);
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setShow(xmlParam.isSHOW());
    newParam.setShowIf(parentParam.getName() + "String_Node_Str" + REPOSITORY+ "String_Node_Str");
    newParam.setReadOnly(xmlParam.isREADONLY() || useInputLinkSelection);
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setContext(context);
    newParam.setParentParameter(parentParam);
    newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.REPOSITORY_SCHEMA_TYPE.getName());
    newParam.setDisplayName(EParameterName.REPOSITORY_SCHEMA_TYPE.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{});
    newParam.setListItemsValue(new String[]{});
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setValue("String_Node_Str");
    newParam.setShow(false);
    newParam.setRequired(true);
    newParam.setReadOnly(xmlParam.isREADONLY() || useInputLinkSelection);
    newParam.setShowIf(xmlParam.getSHOWIF());
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setContext(context);
    newParam.setParentParameter(parentParam);
    if (useInputLinkSelection) {
      newParam=new ElementParameter(node);
      newParam.setCategory(EComponentCategory.BASIC);
      newParam.setName(EParameterName.CONNECTION.getName());
      newParam.setDisplayName(Messages.getString("String_Node_Str"));
      newParam.setListItemsDisplayName(new String[]{});
      newParam.setListItemsValue(new String[]{});
      newParam.setNumRow(xmlParam.getNUMROW());
      newParam.setFieldType(EParameterFieldType.CONNECTION_LIST);
      newParam.setValue("String_Node_Str");
      newParam.setShow(true);
      newParam.setRequired(true);
      newParam.setFilter("String_Node_Str");
      newParam.setReadOnly(xmlParam.isREADONLY());
      newParam.setShowIf(xmlParam.getSHOWIF());
      newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
      newParam.setContext(context);
      newParam.setParentParameter(parentParam);
      parentParam.setReadOnly(true);
    }
  }
  if (type == EParameterFieldType.ENCODING_TYPE) {
    ElementParameter newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.ENCODING_TYPE.getName());
    newParam.setDisplayName(EParameterName.ENCODING_TYPE.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{ENCODING_TYPE_ISO_8859_15,ENCODING_TYPE_UTF_8,ENCODING_TYPE_CUSTOM});
    newParam.setListItemsDisplayCodeName(new String[]{ENCODING_TYPE_ISO_8859_15,ENCODING_TYPE_UTF_8,ENCODING_TYPE_CUSTOM});
    newParam.setListItemsValue(new String[]{ENCODING_TYPE_ISO_8859_15,ENCODING_TYPE_UTF_8,ENCODING_TYPE_CUSTOM});
    newParam.setValue(ENCODING_TYPE_ISO_8859_15);
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setShow(true);
    newParam.setShowIf(xmlParam.getSHOWIF());
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setParentParameter(parentParam);
  }
  if (type == EParameterFieldType.QUERYSTORE_TYPE) {
    ElementParameter newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.QUERYSTORE_TYPE.getName());
    newParam.setDisplayName(EParameterName.QUERYSTORE_TYPE.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{TEXT_BUILTIN,TEXT_REPOSITORY});
    newParam.setListItemsDisplayCodeName(new String[]{BUILTIN,REPOSITORY});
    newParam.setListItemsValue(new String[]{BUILTIN,REPOSITORY});
    newParam.setValue(BUILTIN);
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    if (xmlParam.isSetSHOW()) {
      newParam.setShow(xmlParam.isSHOW());
    }
    newParam.setShowIf(xmlParam.getSHOWIF());
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setParentParameter(parentParam);
    newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.REPOSITORY_QUERYSTORE_TYPE.getName());
    newParam.setDisplayName(EParameterName.REPOSITORY_QUERYSTORE_TYPE.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{});
    newParam.setListItemsValue(new String[]{});
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setValue("String_Node_Str");
    newParam.setShow(false);
    newParam.setRequired(true);
    newParam.setShowIf(xmlParam.getSHOWIF());
    newParam.setNotShowIf(xmlParam.getNOTSHOWIF());
    newParam.setParentParameter(parentParam);
  }
  if (type == EParameterFieldType.PROCESS_TYPE || type == EParameterFieldType.ROUTE_INPUT_PROCESS_TYPE) {
    ElementParameter newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.PROCESS_TYPE_PROCESS.getName());
    if (getTranslatedValue(xmlParam.getNAME() + "String_Node_Str" + PROP_NAME).startsWith("String_Node_Str")) {
      newParam.setDisplayName(EParameterName.PROCESS_TYPE_PROCESS.getDisplayName());
    }
 else {
      newParam.setDisplayName(getTranslatedValue(xmlParam.getNAME() + "String_Node_Str" + PROP_NAME));
    }
    newParam.setListItemsDisplayName(new String[]{});
    newParam.setListItemsValue(new String[]{});
    newParam.setValue("String_Node_Str");
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    if (xmlParam.isSetSHOW()) {
      newParam.setShow(xmlParam.isSHOW());
    }
    newParam.setRequired(true);
    newParam.setParentParameter(parentParam);
    newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.PROCESS_TYPE_VERSION.getName());
    newParam.setDisplayName(EParameterName.PROCESS_TYPE_VERSION.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{ItemCacheManager.LATEST_VERSION});
    newParam.setListItemsValue(new String[]{ItemCacheManager.LATEST_VERSION});
    newParam.setValue(ItemCacheManager.LATEST_VERSION);
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    if (xmlParam.isSetSHOW()) {
      newParam.setShow(xmlParam.isSHOW());
    }
    newParam.setRequired(true);
    newParam.setParentParameter(parentParam);
    newParam=new ElementParameter(node);
    newParam.setCategory(EComponentCategory.BASIC);
    newParam.setName(EParameterName.PROCESS_TYPE_CONTEXT.getName());
    newParam.setDisplayName(EParameterName.PROCESS_TYPE_CONTEXT.getDisplayName());
    newParam.setListItemsDisplayName(new String[]{});
    newParam.setListItemsValue(new String[]{});
    newParam.setNumRow(xmlParam.getNUMROW());
    newParam.setFieldType(EParameterFieldType.TECHNICAL);
    newParam.setValue("String_Node_Str");
    if (xmlParam.isSetSHOW()) {
      newParam.setShow(xmlParam.isSHOW());
    }
    newParam.setRequired(true);
    newParam.setParentParameter(parentParam);
  }
}