Program: 72793
Project: 72793
Buggy source:
private boolean validateParameterValueType(String paramName,Object paramValue,String type,ScalarParameterHandle paramHandle) throws ParameterValidationException {
  if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(type) || DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(type)) {
    if (paramValue instanceof Number)     return true;
    throw new ParameterValidationException(MessageConstants.INVALID_PARAMETER_TYPE_EXCEPTION,new String[]{paramName,type,paramValue.getClass().getName()});
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(type)) {
    if (paramValue instanceof Date)     return true;
    throw new ParameterValidationException(MessageConstants.INVALID_PARAMETER_TYPE_EXCEPTION,new String[]{paramName,type,paramValue.getClass().getName()});
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATE.equals(type)) {
    if (paramValue instanceof java.sql.Date)     return true;
    throw new ParameterValidationException(MessageConstants.INVALID_PARAMETER_TYPE_EXCEPTION,new String[]{paramName,type,paramValue.getClass().getName()});
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_TIME.equals(type)) {
    if (paramValue instanceof java.sql.Time)     return true;
    throw new ParameterValidationException(MessageConstants.INVALID_PARAMETER_TYPE_EXCEPTION,new String[]{paramName,type,paramValue.getClass().getName()});
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type)) {
    if (paramHandle.isRequired()) {
      String value=paramValue.toString().trim();
      if (value.length() == 0) {
        throw new ParameterValidationException(MessageConstants.BLANK_PARAMETER_EXCEPTION,new String[]{paramName});
      }
    }
    return true;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(type)) {
    if (paramValue instanceof Boolean)     return true;
    throw new ParameterValidationException(MessageConstants.INVALID_PARAMETER_TYPE_EXCEPTION,new String[]{paramName,type,paramValue.getClass().getName()});
  }
  return true;
}

Fixed version (ground truth):
private boolean validateParameterValueType(String paramName,Object paramValue,String type,ScalarParameterHandle paramHandle) throws ParameterValidationException {
  if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(type) || DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(type)) {
    if (paramValue instanceof Number)     return true;
    throw new ParameterValidationException(MessageConstants.PARAMETER_TYPE_IS_INVALID_EXCEPTION,new String[]{paramName,type,paramValue.getClass().getName()});
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(type)) {
    if (paramValue instanceof Date)     return true;
    throw new ParameterValidationException(MessageConstants.PARAMETER_TYPE_IS_INVALID_EXCEPTION,new String[]{paramName,type,paramValue.getClass().getName()});
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATE.equals(type)) {
    if (paramValue instanceof java.sql.Date)     return true;
    throw new ParameterValidationException(MessageConstants.PARAMETER_TYPE_IS_INVALID_EXCEPTION,new String[]{paramName,type,paramValue.getClass().getName()});
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_TIME.equals(type)) {
    if (paramValue instanceof java.sql.Time)     return true;
    throw new ParameterValidationException(MessageConstants.PARAMETER_TYPE_IS_INVALID_EXCEPTION,new String[]{paramName,type,paramValue.getClass().getName()});
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type)) {
    if (paramHandle.isRequired()) {
      String value=paramValue.toString().trim();
      if (value.length() == 0) {
        throw new ParameterValidationException(MessageConstants.PARAMETER_IS_BLANK_EXCEPTION,new String[]{paramName});
      }
    }
    return true;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(type)) {
    if (paramValue instanceof Boolean)     return true;
    throw new ParameterValidationException(MessageConstants.PARAMETER_TYPE_IS_INVALID_EXCEPTION,new String[]{paramName,type,paramValue.getClass().getName()});
  }
  return true;
}