Program: 76281
Project: 76281
Buggy source:
/** 
 * validate whether the parameter value is a valid value for the parameter
 * @param p the parameter to be verified
 * @param paramValue the value for the parameter
 * @return true if the given parameter value is valid; false otherwise
 */
private boolean validateScalarParameter(ScalarParameterHandle paramHandle){
  String paramName=paramHandle.getName();
  Object paramValue=runValues.get(paramName);
  String type=paramHandle.getDataType();
  if (paramValue == null) {
    if (!paramHandle.isRequired())     return true;
    log.log(Level.SEVERE,"String_Node_Str",paramName);
    return false;
  }
  if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(type) || DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(type)) {
    if (paramValue instanceof Number)     return true;
    log.log(Level.SEVERE,"String_Node_Str",new String[]{paramValue.toString(),paramName});
    return false;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(type)) {
    if (paramValue instanceof Date)     return true;
    log.log(Level.SEVERE,"String_Node_Str",new String[]{paramValue.toString(),paramName});
    return false;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type)) {
    String value=paramValue.toString().trim();
    if (paramHandle.isRequired() && value.equals("String_Node_Str")) {
      log.log(Level.SEVERE,"String_Node_Str",paramName);
      return false;
    }
    return true;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(type)) {
    if (paramValue instanceof Boolean)     return true;
    log.log(Level.SEVERE,"String_Node_Str",new String[]{paramValue.toString(),paramName});
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * validate whether the parameter value is a valid value for the parameter
 * @param p the parameter to be verified
 * @param paramValue the value for the parameter
 * @return true if the given parameter value is valid; false otherwise
 */
private boolean validateScalarParameter(ScalarParameterHandle paramHandle){
  String paramName=paramHandle.getName();
  Object paramValue=runValues.get(paramName);
  String type=paramHandle.getDataType();
  if (paramValue == null) {
    if (!paramHandle.isRequired())     return true;
    log.log(Level.SEVERE,"String_Node_Str",paramName);
    return false;
  }
  if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(type) || DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(type)) {
    if (paramValue instanceof Number)     return true;
    log.log(Level.SEVERE,"String_Node_Str",new String[]{paramValue.toString(),paramName});
    return false;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(type)) {
    if (paramValue instanceof Date)     return true;
    log.log(Level.SEVERE,"String_Node_Str",new String[]{paramValue.toString(),paramName});
    return false;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_DATE.equals(type)) {
    if (paramValue instanceof java.sql.Date)     return true;
    log.log(Level.SEVERE,"String_Node_Str",new String[]{paramValue.toString(),paramName});
    return false;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_TIME.equals(type)) {
    if (paramValue instanceof java.sql.Time)     return true;
    log.log(Level.SEVERE,"String_Node_Str",new String[]{paramValue.toString(),paramName});
    return false;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type)) {
    String value=paramValue.toString().trim();
    if (paramHandle.isRequired() && value.equals("String_Node_Str")) {
      log.log(Level.SEVERE,"String_Node_Str",paramName);
      return false;
    }
    return true;
  }
 else   if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(type)) {
    if (paramValue instanceof Boolean)     return true;
    log.log(Level.SEVERE,"String_Node_Str",new String[]{paramValue.toString(),paramName});
    return false;
  }
  return true;
}