Program: 77436
Project: 77436
Buggy source:
private void updateFormatField(){
  String displayFormat;
  String previewString;
  String type=getSelectedDataType();
  IChoiceSet choiceSet=getFormatChoiceSet(type);
  if (choiceSet == null) {
    displayFormat=DEUtil.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(DesignChoiceConstants.DATETIEM_FORMAT_TYPE_CUSTOM.equals(formatCategroy) ? formatPattern : formatCategroy,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       if (type.equals(DesignChoiceConstants.PARAM_TYPE_INTEGER)) {
        previewString=new NumberFormatter(formatCategroy != DesignChoiceConstants.NUMBER_FORMAT_TYPE_CUSTOM ? formatCategroy : formatPattern,ULocale.getDefault()).format(1234567890);
      }
 else {
        previewString=new NumberFormatter(formatCategroy != DesignChoiceConstants.NUMBER_FORMAT_TYPE_CUSTOM ? formatCategroy : formatPattern,ULocale.getDefault()).format(123456789.01234);
      }
    }
  }
  formatField.setText(displayFormat);
  previewLabel.setText(convertNullString(previewString));
  changeFormat.setEnabled(choiceSet != null);
}

Fixed version (ground truth):
private void updateFormatField(){
  String displayFormat;
  String previewString;
  String type=getSelectedDataType();
  IChoiceSet choiceSet=getFormatChoiceSet(type);
  if (choiceSet == null) {
    displayFormat=DEUtil.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 (isCustom()) {
        displayFormat+="String_Node_Str" + formatPattern;
      }
      if (type.equals(DesignChoiceConstants.PARAM_TYPE_DATETIME)) {
        previewString=new DateFormatter(isCustom() ? formatPattern : formatCategroy,ULocale.getDefault()).format(new Date());
      }
 else       if (type.equals(DesignChoiceConstants.PARAM_TYPE_STRING)) {
        previewString=new StringFormatter(isCustom() ? formatPattern : formatCategroy,ULocale.getDefault()).format(Messages.getString("String_Node_Str"));
      }
 else       if (type.equals(DesignChoiceConstants.PARAM_TYPE_INTEGER)) {
        previewString=new NumberFormatter(isCustom() ? formatPattern : formatCategroy,ULocale.getDefault()).format(1234567890);
      }
 else {
        previewString=new NumberFormatter(isCustom() ? formatPattern : formatCategroy,ULocale.getDefault()).format(123456789.01234);
      }
    }
  }
  formatField.setText(displayFormat);
  previewLabel.setText(convertNullString(previewString));
  changeFormat.setEnabled(choiceSet != null);
}