Program: 78109
Project: 78109
Buggy source:
private void updateFormatField(){
  String displayFormat;
  String previewString;
  String type=getSelectedDataType();
  IChoiceSet choiceSet=getFormatChoiceSet(getSelectedDataType());
  if (choiceSet == null) {
    displayFormat=DesignEngine.getMetaDataDictionary().getChoiceSet(DesignChoiceConstants.CHOICE_STRING_FORMAT_TYPE).findChoice(DesignChoiceConstants.STRING_FORMAT_TYPE_UNFORMATTED).getDisplayName();
    previewString="String_Node_Str";
  }
 else {
    displayFormat=choiceSet.findChoice(formatCategroy).getDisplayName();
    if (defaultValue != null) {
      previewString=format(defaultValue);
    }
 else {
      if (formatPattern != null) {
        displayFormat+="String_Node_Str" + formatPattern;
      }
      if (type.equals(DesignChoiceConstants.PARAM_TYPE_DATETIME)) {
        previewString=new DateFormatter(formatPattern == null ? formatCategroy : formatPattern,ULocale.getDefault()).format(new Date());
      }
 else       if (type.equals(DesignChoiceConstants.PARAM_TYPE_STRING)) {
        previewString=new StringFormatter(formatPattern == null ? formatCategroy : formatPattern,ULocale.getDefault()).format(Messages.getString("String_Node_Str"));
      }
 else {
        previewString=new NumberFormatter(formatPattern == null ? formatCategroy : formatPattern,ULocale.getDefault()).format(123456789.01234);
      }
    }
  }
  formatField.setText(displayFormat);
  previewLabel.setText(previewString);
  changeFormat.setEnabled(choiceSet != null);
}

Fixed version (ground truth):
private void updateFormatField(){
  String displayFormat;
  String previewString;
  String type=getSelectedDataType();
  IChoiceSet choiceSet=getFormatChoiceSet(getSelectedDataType());
  if (choiceSet == null) {
    displayFormat=DesignEngine.getMetaDataDictionary().getChoiceSet(DesignChoiceConstants.CHOICE_STRING_FORMAT_TYPE).findChoice(DesignChoiceConstants.STRING_FORMAT_TYPE_UNFORMATTED).getDisplayName();
    previewString="String_Node_Str";
  }
 else {
    displayFormat=choiceSet.findChoice(formatCategroy).getDisplayName();
    if (defaultValue != null) {
      previewString=format(defaultValue);
    }
 else {
      if (formatCategroy == DesignChoiceConstants.STRING_FORMAT_TYPE_CUSTOM || formatCategroy == DesignChoiceConstants.NUMBER_FORMAT_TYPE_CUSTOM || formatCategroy == DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM) {
        displayFormat+="String_Node_Str" + formatPattern;
      }
      if (type.equals(DesignChoiceConstants.PARAM_TYPE_DATETIME)) {
        previewString=new DateFormatter(formatCategroy != DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM ? formatCategroy : formatPattern,ULocale.getDefault()).format(new Date());
      }
 else       if (type.equals(DesignChoiceConstants.PARAM_TYPE_STRING)) {
        previewString=new StringFormatter(formatCategroy != DesignChoiceConstants.STRING_FORMAT_TYPE_CUSTOM ? formatCategroy : formatPattern,ULocale.getDefault()).format(Messages.getString("String_Node_Str"));
      }
 else {
        previewString=new NumberFormatter(formatCategroy != DesignChoiceConstants.NUMBER_FORMAT_TYPE_CUSTOM ? formatCategroy : formatPattern,ULocale.getDefault()).format(123456789.01234);
      }
    }
  }
  formatField.setText(displayFormat);
  previewLabel.setText(previewString);
  changeFormat.setEnabled(choiceSet != null);
}