Program: 75810
Project: 75810
Buggy source:
protected void okPressed(){
  try {
    inputParameter.setName(nameEditor.getText());
    inputParameter.setPromptText(UIUtil.convertToModelString(promptTextEditor.getText(),true));
    String newControlType=getSelectedControlType();
    if (PARAM_CONTROL_COMBO.equals(newControlType)) {
      newControlType=DesignChoiceConstants.PARAM_CONTROL_LIST_BOX;
      inputParameter.setMustMatch(false);
    }
 else     if (PARAM_CONTROL_LIST.equals(newControlType)) {
      newControlType=DesignChoiceConstants.PARAM_CONTROL_LIST_BOX;
      inputParameter.setMustMatch(true);
    }
 else {
      inputParameter.setProperty(ScalarParameterHandle.MUCH_MATCH_PROP,null);
    }
    inputParameter.setControlType(newControlType);
    if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(getSelectedDataType())) {
      defaultValue=DEUtil.convertToXMLString(DataTypeUtil.toDate(defaultValue,ULocale.US));
    }
    inputParameter.setDefaultValue(defaultValue);
    inputParameter.setDataType(DATA_TYPE_CHOICE_SET.findChoiceByDisplayName(dataTypeChooser.getText()).getName());
    PropertyHandle selectionChioceList=inputParameter.getPropertyHandle(ScalarParameterHandle.SELECTION_LIST_PROP);
    selectionChioceList.setValue(null);
    if (isStatic()) {
      inputParameter.setValueType(DesignChoiceConstants.PARAM_VALUE_TYPE_STATIC);
      if (!DesignChoiceConstants.PARAM_CONTROL_TEXT_BOX.equals(newControlType) && !DesignChoiceConstants.PARAM_CONTROL_CHECK_BOX.equals(newControlType)) {
        for (Iterator iter=choiceList.iterator(); iter.hasNext(); ) {
          SelectionChoice choice=(SelectionChoice)iter.next();
          if (isValidValue(choice.getValue()) == null) {
            selectionChioceList.addItem(choice);
          }
        }
      }
      inputParameter.setDataSetName(null);
      inputParameter.setValueExpr(null);
      inputParameter.setLabelExpr(null);
    }
 else {
      inputParameter.setValueType(DesignChoiceConstants.PARAM_VALUE_TYPE_DYNAMIC);
      inputParameter.setDataSetName(dataSetChooser.getText());
      inputParameter.setValueExpr(getExpression(columnChooser.getText()));
      if (displayTextChooser.getText().equals(LABEL_NULL)) {
        inputParameter.setLabelExpr("String_Node_Str");
      }
 else {
        inputParameter.setLabelExpr(getExpression(displayTextChooser.getText()));
      }
    }
    inputParameter.setHelpText(UIUtil.convertToModelString(helpTextEditor.getText(),false));
    inputParameter.setCategory(formatCategroy);
    inputParameter.setPattern(formatPattern);
    if (isStatic() && (PARAM_CONTROL_COMBO.equals(getSelectedControlType()) || DesignChoiceConstants.PARAM_CONTROL_RADIO_BUTTON.equals(getSelectedControlType())) && !containValue(null,defaultValue,COLUMN_VALUE)) {
      defaultValue=null;
    }
    if (dirtyProperties.containsKey(CHECKBOX_HIDDEN)) {
      inputParameter.setHidden(getProperty(CHECKBOX_HIDDEN));
    }
    if (dirtyProperties.containsKey(CHECKBOX_ISREQUIRED)) {
      inputParameter.setIsRequired(getProperty(CHECKBOX_ISREQUIRED));
    }
    if (doNotEcho.isEnabled()) {
      if (dirtyProperties.containsKey(CHECKBOX_DO_NOT_ECHO)) {
        inputParameter.setConcealValue(getProperty(CHECKBOX_DO_NOT_ECHO));
      }
    }
 else {
      inputParameter.setProperty(ScalarParameterHandle.CONCEAL_VALUE_PROP,null);
    }
    if (sorttingArea.isVisible()) {
      if (!sortKeyChooser.getText().equals(CHOICE_NONE)) {
        inputParameter.setFixedOrder(false);
        inputParameter.setDistinct(!distinct.getSelection());
        if (sortKeyChooser.getText().equals(CHOICE_DISPLAY_TEXT)) {
          inputParameter.setSortBy(DesignChoiceConstants.PARAM_SORT_VALUES_LABEL);
        }
 else         if (sortKeyChooser.getText().equals(CHOICE_VALUE_COLUMN)) {
          inputParameter.setSortBy(DesignChoiceConstants.PARAM_SORT_VALUES_VALUE);
        }
        if (sortDirectionChooser.getText().equals(CHOICE_ASCENDING)) {
          inputParameter.setSortDirection(DesignChoiceConstants.SORT_DIRECTION_ASC);
        }
 else         if (sortDirectionChooser.getText().equals(CHOICE_DESCENDING)) {
          inputParameter.setSortDirection(DesignChoiceConstants.SORT_DIRECTION_DESC);
        }
      }
 else {
        inputParameter.setFixedOrder(true);
        inputParameter.setSortBy(null);
        inputParameter.setSortDirection(null);
        inputParameter.setDistinct(false);
      }
    }
 else {
      inputParameter.setProperty(ScalarParameterHandle.FIXED_ORDER_PROP,null);
    }
    if (!isStatic() && !StringUtil.isBlank(listLimit.getText())) {
      try {
        inputParameter.setListlimit(Integer.parseInt(listLimit.getText()));
      }
 catch (      NumberFormatException ex) {
        ExceptionHandler.openErrorMessageBox(ERROR_TITLE_INVALID_LIST_LIMIT,MessageFormat.format(ERROR_MSG_INVALID_LIST_LIMIT,new Object[]{Integer.toString(Integer.MAX_VALUE)}));
      }
    }
 else {
      inputParameter.setProperty(ScalarParameterHandle.LIST_LIMIT_PROP,null);
    }
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
    return;
  }
  setResult(inputParameter);
  super.okPressed();
}

Fixed version (ground truth):
protected void okPressed(){
  try {
    inputParameter.setName(nameEditor.getText());
    inputParameter.setPromptText(UIUtil.convertToModelString(promptTextEditor.getText(),true));
    String newControlType=getSelectedControlType();
    if (PARAM_CONTROL_COMBO.equals(newControlType)) {
      newControlType=DesignChoiceConstants.PARAM_CONTROL_LIST_BOX;
      inputParameter.setMustMatch(false);
    }
 else     if (PARAM_CONTROL_LIST.equals(newControlType)) {
      newControlType=DesignChoiceConstants.PARAM_CONTROL_LIST_BOX;
      inputParameter.setMustMatch(true);
    }
 else {
      inputParameter.setProperty(ScalarParameterHandle.MUCH_MATCH_PROP,null);
    }
    inputParameter.setControlType(newControlType);
    if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(getSelectedDataType())) {
      defaultValue=DEUtil.convertToXMLString(DataTypeUtil.toDate(defaultValue,ULocale.US));
    }
    inputParameter.setDefaultValue(defaultValue);
    inputParameter.setDataType(DATA_TYPE_CHOICE_SET.findChoiceByDisplayName(dataTypeChooser.getText()).getName());
    PropertyHandle selectionChioceList=inputParameter.getPropertyHandle(ScalarParameterHandle.SELECTION_LIST_PROP);
    selectionChioceList.setValue(null);
    if (isStatic()) {
      inputParameter.setValueType(DesignChoiceConstants.PARAM_VALUE_TYPE_STATIC);
      if (!DesignChoiceConstants.PARAM_CONTROL_TEXT_BOX.equals(newControlType) && !DesignChoiceConstants.PARAM_CONTROL_CHECK_BOX.equals(newControlType)) {
        for (Iterator iter=choiceList.iterator(); iter.hasNext(); ) {
          SelectionChoice choice=(SelectionChoice)iter.next();
          if (isValidValue(choice.getValue()) == null) {
            selectionChioceList.addItem(choice);
          }
        }
      }
      inputParameter.setDataSetName(null);
      inputParameter.setValueExpr(null);
      inputParameter.setLabelExpr(null);
    }
 else {
      inputParameter.setValueType(DesignChoiceConstants.PARAM_VALUE_TYPE_DYNAMIC);
      inputParameter.setDataSetName(dataSetChooser.getText());
      inputParameter.setValueExpr(getExpression(columnChooser.getText()));
      if (displayTextChooser.getText().equals(LABEL_NULL)) {
        inputParameter.setLabelExpr("String_Node_Str");
      }
 else {
        inputParameter.setLabelExpr(getExpression(displayTextChooser.getText()));
      }
    }
    inputParameter.setHelpText(UIUtil.convertToModelString(helpTextEditor.getText(),false));
    inputParameter.setCategory(formatCategroy);
    inputParameter.setPattern(formatPattern);
    if (isStatic() && (PARAM_CONTROL_COMBO.equals(getSelectedControlType()) || DesignChoiceConstants.PARAM_CONTROL_RADIO_BUTTON.equals(getSelectedControlType())) && !containValue(null,defaultValue,COLUMN_VALUE)) {
      defaultValue=null;
    }
    if (dirtyProperties.containsKey(CHECKBOX_HIDDEN)) {
      inputParameter.setHidden(getProperty(CHECKBOX_HIDDEN));
    }
    if (dirtyProperties.containsKey(CHECKBOX_ISREQUIRED)) {
      inputParameter.setIsRequired(getProperty(CHECKBOX_ISREQUIRED));
    }
    if (doNotEcho.isEnabled()) {
      if (dirtyProperties.containsKey(CHECKBOX_DO_NOT_ECHO)) {
        inputParameter.setConcealValue(getProperty(CHECKBOX_DO_NOT_ECHO));
      }
    }
 else {
      inputParameter.setProperty(ScalarParameterHandle.CONCEAL_VALUE_PROP,null);
    }
    if (sorttingArea != null && sorttingArea.isVisible()) {
      if (!sortKeyChooser.getText().equals(CHOICE_NONE)) {
        inputParameter.setFixedOrder(false);
        inputParameter.setDistinct(!distinct.getSelection());
        if (sortKeyChooser.getText().equals(CHOICE_DISPLAY_TEXT)) {
          inputParameter.setSortBy(DesignChoiceConstants.PARAM_SORT_VALUES_LABEL);
        }
 else         if (sortKeyChooser.getText().equals(CHOICE_VALUE_COLUMN)) {
          inputParameter.setSortBy(DesignChoiceConstants.PARAM_SORT_VALUES_VALUE);
        }
        if (sortDirectionChooser.getText().equals(CHOICE_ASCENDING)) {
          inputParameter.setSortDirection(DesignChoiceConstants.SORT_DIRECTION_ASC);
        }
 else         if (sortDirectionChooser.getText().equals(CHOICE_DESCENDING)) {
          inputParameter.setSortDirection(DesignChoiceConstants.SORT_DIRECTION_DESC);
        }
      }
 else {
        inputParameter.setFixedOrder(true);
        inputParameter.setSortBy(null);
        inputParameter.setSortDirection(null);
        inputParameter.setDistinct(false);
      }
    }
 else {
      inputParameter.setProperty(ScalarParameterHandle.FIXED_ORDER_PROP,null);
    }
    if (!isStatic() && !StringUtil.isBlank(listLimit.getText())) {
      try {
        inputParameter.setListlimit(Integer.parseInt(listLimit.getText()));
      }
 catch (      NumberFormatException ex) {
        ExceptionHandler.openErrorMessageBox(ERROR_TITLE_INVALID_LIST_LIMIT,MessageFormat.format(ERROR_MSG_INVALID_LIST_LIMIT,new Object[]{Integer.toString(Integer.MAX_VALUE)}));
      }
    }
 else {
      inputParameter.setProperty(ScalarParameterHandle.LIST_LIMIT_PROP,null);
    }
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
    return;
  }
  setResult(inputParameter);
  super.okPressed();
}