Program: 75655
Project: 75655
Buggy source:
/** 
 * parse paramenters from config file.
 * @param request HttpServletRequest
 * @param parameterList Collection
 * @return
 */
protected void parseConfigVars(HttpServletRequest request,Collection parameterList){
  this.configMap=new HashMap();
  if (this.displayTexts == null)   this.displayTexts=new HashMap();
  String reportConfigName=ParameterAccessor.getConfigFileName(this.reportDesignName);
  if (reportConfigName == null)   return;
  SessionHandle sessionHandle=new DesignEngine(null).newSessionHandle(ULocale.US);
  ReportDesignHandle handle=null;
  try {
    handle=sessionHandle.openDesign(reportConfigName);
    if (handle != null) {
      String displayTextParam=null;
      Iterator configVars=handle.configVariablesIterator();
      while (configVars != null && configVars.hasNext()) {
        ConfigVariableHandle configVar=(ConfigVariableHandle)configVars.next();
        if (configVar != null && configVar.getName() != null) {
          String paramName=configVar.getName();
          Object paramValue=configVar.getValue();
          if (paramName.toLowerCase().startsWith(ParameterAccessor.PARAM_ISNULL) && paramValue != null) {
            String nullParamName=getParameterName((String)paramValue,parameterList);
            if (nullParamName != null)             this.configMap.put(nullParamName,null);
            continue;
          }
 else           if ((displayTextParam=ParameterAccessor.isDisplayText(paramName)) != null) {
            paramName=getParameterName(displayTextParam,parameterList);
            if (paramName != null) {
              this.displayTexts.put(paramName,paramValue);
            }
            continue;
          }
          paramName=getParameterName(paramName,parameterList);
          ParameterDefinition parameter=BirtUtility.findParameterDefinition(parameterList,paramName);
          if (paramValue != null && parameter != null) {
            String typeVarName=configVar.getName() + "String_Node_Str" + IBirtConstants.PROP_TYPE;
            ConfigVariable typeVar=handle.findConfigVariable(typeVarName);
            String dataType=ParameterDataTypeConverter.ConvertDataType(parameter.getDataType());
            String cachedDateType=null;
            if (typeVar != null)             cachedDateType=typeVar.getValue();
            if (cachedDateType == null || !cachedDateType.equalsIgnoreCase(dataType))             continue;
            String exprVarName=configVar.getName() + "String_Node_Str" + IBirtConstants.PROP_EXPR;
            ConfigVariable exprVar=handle.findConfigVariable(exprVarName);
            String cachedExpr=null;
            if (exprVar != null)             cachedExpr=exprVar.getValue();
            if (cachedExpr == null)             cachedExpr="String_Node_Str";
            String expr=parameter.getValueExpr();
            if (expr == null)             expr="String_Node_Str";
            if (!cachedExpr.equals(expr))             continue;
            this.configMap.put(paramName,paramValue);
          }
        }
      }
      handle.close();
    }
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
/** 
 * parse paramenters from config file.
 * @param request HttpServletRequest
 * @param parameterList Collection
 * @return
 */
protected void parseConfigVars(HttpServletRequest request,Collection parameterList){
  this.configMap=new HashMap();
  if (this.displayTexts == null)   this.displayTexts=new HashMap();
  String reportConfigName=ParameterAccessor.getConfigFileName(this.reportDesignName);
  if (reportConfigName == null)   return;
  SessionHandle sessionHandle=new DesignEngine(null).newSessionHandle(ULocale.US);
  ReportDesignHandle handle=null;
  try {
    handle=sessionHandle.openDesign(reportConfigName);
    if (handle != null) {
      String displayTextParam=null;
      Iterator configVars=handle.configVariablesIterator();
      while (configVars != null && configVars.hasNext()) {
        ConfigVariableHandle configVar=(ConfigVariableHandle)configVars.next();
        if (configVar != null) {
          String varName=configVar.getName();
          Object varValue=configVar.getValue();
          if (varName == null || varValue == null)           continue;
          String tempName=varName;
          String paramName=null;
          if (varName.toLowerCase().startsWith(ParameterAccessor.PARAM_ISNULL)) {
            tempName=(String)varValue;
          }
 else           if ((displayTextParam=ParameterAccessor.isDisplayText(varName)) != null) {
            tempName=displayTextParam;
          }
          paramName=getParameterName(tempName,parameterList);
          ParameterDefinition parameter=BirtUtility.findParameterDefinition(parameterList,paramName);
          if (parameter != null) {
            String typeVarName=tempName + "String_Node_Str" + IBirtConstants.PROP_TYPE;
            ConfigVariable typeVar=handle.findConfigVariable(typeVarName);
            String dataType=ParameterDataTypeConverter.ConvertDataType(parameter.getDataType());
            String cachedDateType=null;
            if (typeVar != null)             cachedDateType=typeVar.getValue();
            if (cachedDateType == null || !cachedDateType.equalsIgnoreCase(dataType))             continue;
            String exprVarName=tempName + "String_Node_Str" + IBirtConstants.PROP_EXPR;
            ConfigVariable exprVar=handle.findConfigVariable(exprVarName);
            String cachedExpr=null;
            if (exprVar != null)             cachedExpr=exprVar.getValue();
            if (cachedExpr == null)             cachedExpr="String_Node_Str";
            String expr=parameter.getValueExpr();
            if (expr == null)             expr="String_Node_Str";
            if (!cachedExpr.equals(expr))             continue;
            if (varName.toLowerCase().startsWith(ParameterAccessor.PARAM_ISNULL)) {
              this.configMap.put(paramName,null);
            }
 else             if ((displayTextParam=ParameterAccessor.isDisplayText(varName)) != null) {
              this.displayTexts.put(paramName,varValue);
            }
 else {
              this.configMap.put(paramName,varValue);
            }
          }
        }
      }
      handle.close();
    }
  }
 catch (  Exception e) {
  }
}