Program: 74629
Project: 74629
Buggy source:
/** 
 * Get the parameter value from .rptconfig file if it does exist
 * @return the parameter value
 */
public static String getParamValue(DataSetHandle dataSetHandle,OdaDataSetParameterHandle paramDefn) throws DesignFileException {
  ModuleHandle moduleHandle=dataSetHandle.getModuleHandle();
  String designFileName=moduleHandle.getFileName();
  String reportConfigName=designFileName.substring(0,designFileName.length() - "String_Node_Str".length()) + "String_Node_Str";
  File file=new File(reportConfigName);
  if (file.exists()) {
    String paraName=paramDefn.getParamName();
    ScalarParameterHandle parameterHandle=(ScalarParameterHandle)moduleHandle.findParameter(paraName);
    paraName=paraName + "String_Node_Str" + parameterHandle.getID();
    SessionHandle sessionHandle=new DesignEngine(null).newSessionHandle(ULocale.US);
    ReportDesignHandle rdHandle=null;
    rdHandle=sessionHandle.openDesign(reportConfigName);
    if (rdHandle != null) {
      Iterator configVars=rdHandle.configVariablesIterator();
      while (configVars != null && configVars.hasNext()) {
        ConfigVariableHandle configVar=(ConfigVariableHandle)configVars.next();
        if (configVar != null) {
          String varName=prepareConfigVarName(configVar.getName());
          Object varValue=configVar.getValue();
          if (varName == null || varValue == null) {
            continue;
          }
          if (varName.equals(paraName)) {
            String value=(String)varValue;
            if (isToBeConverted(parameterHandle.getDataType())) {
              value="String_Node_Str" + JavascriptEvalUtil.transformToJsConstants(value) + "String_Node_Str";
            }
            return value;
          }
          if (isNullValue(varName,(String)varValue,paraName)) {
            return null;
          }
        }
      }
    }
  }
  return paramDefn.getDefaultValue();
}

Fixed version (ground truth):
/** 
 * Get the parameter value from .rptconfig file if it does exist
 * @return the parameter value
 */
public static String getParamValue(DataSetHandle dataSetHandle,OdaDataSetParameterHandle paramDefn) throws DesignFileException {
  ModuleHandle moduleHandle=dataSetHandle.getModuleHandle();
  String designFileName=moduleHandle.getFileName();
  String reportConfigName=designFileName.substring(0,designFileName.length() - "String_Node_Str".length()) + "String_Node_Str";
  File file=new File(reportConfigName);
  if (file.exists()) {
    String paraName=paramDefn.getParamName();
    ScalarParameterHandle parameterHandle=(ScalarParameterHandle)moduleHandle.findParameter(paraName);
    paraName=paraName + "String_Node_Str" + parameterHandle.getID();
    SessionHandle sessionHandle=new DesignEngine(null).newSessionHandle(ULocale.US);
    ReportDesignHandle rdHandle=null;
    rdHandle=sessionHandle.openDesign(reportConfigName);
    if (rdHandle != null) {
      Iterator configVars=rdHandle.configVariablesIterator();
      while (configVars != null && configVars.hasNext()) {
        ConfigVariableHandle configVar=(ConfigVariableHandle)configVars.next();
        if (configVar != null) {
          String varName=prepareConfigVarName(configVar.getName());
          Object varValue=configVar.getValue();
          if (varName == null || varValue == null) {
            continue;
          }
          if (varName.equals(paraName)) {
            String value=(String)varValue;
            if (isToBeConverted(parameterHandle.getDataType())) {
              value="String_Node_Str" + JavascriptEvalUtil.transformToJsConstants(value) + "String_Node_Str";
            }
            return value;
          }
          if (isNullValue(varName,(String)varValue,paraName)) {
            return null;
          }
        }
      }
    }
  }
  return ExpressionUtil.createJSParameterExpression(((OdaDataSetParameterHandle)paramDefn).getParamName());
}