Program: 76159
Project: 76159
Buggy source:
/** 
 * Convert parameter to Object
 * @param dataType
 * @param format
 * @param value
 * @param locale
 * @param isLocale indicate whether it is a locale string
 * @return Object
 * @throws ValidationValueException
 */
public static Object validate(String dataType,String format,String value,Locale locale,boolean isLocale) throws ValidationValueException {
  Object obj=null;
  if (value == null)   return obj;
  String defFormat=null;
  if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equalsIgnoreCase(dataType)) {
    defFormat=ParameterValidationUtil.DEFAULT_DATETIME_FORMAT;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATE.equalsIgnoreCase(dataType)) {
    defFormat=ParameterValidationUtil.DEFAULT_DATE_FORMAT;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_TIME.equalsIgnoreCase(dataType)) {
    defFormat=ParameterValidationUtil.DEFAULT_TIME_FORMAT;
  }
  if (isLocale) {
    try {
      if (format == null) {
        if (DesignChoiceConstants.PARAM_TYPE_DATE.equalsIgnoreCase(dataType)) {
          format=ParameterValidationUtil.DISPLAY_DATE_FORMAT;
        }
 else         if (DesignChoiceConstants.PARAM_TYPE_TIME.equalsIgnoreCase(dataType)) {
          format=ParameterValidationUtil.DISPLAY_TIME_FORMAT;
        }
 else         if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equalsIgnoreCase(dataType)) {
          format=DesignChoiceConstants.DATETIEM_FORMAT_TYPE_UNFORMATTED;
        }
      }
      obj=ParameterValidationUtil.validate(dataType,format,value,locale);
    }
 catch (    Exception e) {
      obj=ParameterValidationUtil.validate(dataType,defFormat,value);
    }
  }
 else {
    obj=ParameterValidationUtil.validate(dataType,defFormat,value);
  }
  return obj;
}

Fixed version (ground truth):
/** 
 * Convert parameter to Object
 * @param dataType
 * @param format
 * @param value
 * @param locale
 * @param isLocale indicate whether it is a locale string
 * @return Object
 * @throws ValidationValueException
 */
public static Object validate(String dataType,String format,String value,Locale locale,boolean isLocale) throws ValidationValueException {
  Object obj=null;
  if (value == null)   return obj;
  String defFormat=null;
  if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equalsIgnoreCase(dataType)) {
    defFormat=ParameterValidationUtil.DEFAULT_DATETIME_FORMAT;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATE.equalsIgnoreCase(dataType)) {
    defFormat=ParameterValidationUtil.DEFAULT_DATE_FORMAT;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_TIME.equalsIgnoreCase(dataType)) {
    defFormat=ParameterValidationUtil.DEFAULT_TIME_FORMAT;
  }
  if (isLocale) {
    try {
      if (format == null) {
        if (DesignChoiceConstants.PARAM_TYPE_DATE.equalsIgnoreCase(dataType)) {
          format=ParameterValidationUtil.DISPLAY_DATE_FORMAT;
        }
 else         if (DesignChoiceConstants.PARAM_TYPE_TIME.equalsIgnoreCase(dataType)) {
          format=ParameterValidationUtil.DISPLAY_TIME_FORMAT;
        }
 else         if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equalsIgnoreCase(dataType)) {
          format=DesignChoiceConstants.DATETIEM_FORMAT_TYPE_UNFORMATTED;
        }
      }
      obj=ParameterValidationUtil.validate(dataType,format,value,locale);
    }
 catch (    Exception e) {
      obj=ParameterValidationUtil.validate(dataType,defFormat,value);
    }
  }
 else {
    if (format == null)     format=defFormat;
    obj=ParameterValidationUtil.validate(dataType,format,value);
  }
  return obj;
}