Program: 77270
Project: 77270
Buggy source:
/** 
 * Gets the display string for the value with the given data type and the locale. The value must be the valid data type.
 * @param dataType the data type of the input value
 * @param value the input value to validate
 * @param locale the locale information
 * @return the formatted string
 */
static private String getDisplayValue(String dataType,Object value,ULocale locale){
  if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equalsIgnoreCase(dataType) || value instanceof Date) {
    DateFormat formatter=DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM,locale);
    return formatter.format((Date)value);
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_FLOAT.equalsIgnoreCase(dataType) || value instanceof Float || value instanceof Double) {
    if (value instanceof Float) {
      NumberFormat formatter=NumberFormat.getNumberInstance(locale);
      return formatter.format(((Number)value).floatValue());
    }
 else {
      NumberFormat formatter=NumberFormat.getNumberInstance(locale);
      return formatter.format(((Number)value).doubleValue());
    }
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equalsIgnoreCase(dataType) || value instanceof BigDecimal) {
    NumberFormat formatter=NumberFormat.getNumberInstance(locale);
    return formatter.format(((BigDecimal)value));
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_INTEGER.equalsIgnoreCase(dataType) || value instanceof Integer || value instanceof Long) {
    NumberFormat formatter=NumberFormat.getNumberInstance(locale);
    return formatter.format(((Number)value).longValue());
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equalsIgnoreCase(dataType) || value instanceof Boolean) {
    if (((Boolean)value).booleanValue()) {
      return getMessage(locale,BooleanPropertyType.BOOLEAN_TRUE_RESOURCE_KEY);
    }
    return getMessage(locale,BooleanPropertyType.BOOLEAN_FALSE_RESOURCE_KEY);
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_STRING.equalsIgnoreCase(dataType) || value instanceof String) {
    return (String)value;
  }
 else {
    return value.toString();
  }
}

Fixed version (ground truth):
/** 
 * Gets the display string for the value with the given data type, format and the default locale defined by the class(Locale.US). The value must be the valid data type. That is: <ul> <li>if data type is <code>PARAM_TYPE_DATETIME</code>, then the value must be <code>java.util.Date<code>.</li> <li>if the data type is <code>PARAM_TYPE_FLOAT</code>, then the value must be <code>java.lang.Double</code>.</li> <li>if the data type is <code>PARAM_TYPE_DECIMAL</code>, then the value must be <code>java.math.BigDecimal</code>.</li> <li>if the data type is <code>PARAM_TYPE_BOOLEAN</code>, then the value must be <code>java.lang.Boolean</code>.</li> <li>if the data type is <code>PARAM_TYPE_STRING</code>, then the value must be <code>java.lang.String</code>.</li> </ul>
 * @param dataType the data type of the input value
 * @param format the format pattern to validate
 * @param value the input value to validate
 * @return the formatted string
 */
static public String getDisplayValue(String dataType,String format,Object value){
  return getDisplayValue(dataType,format,value,DEFAULT_LOCALE);
}