Program: 76568
Project: 76568
Buggy source:
/** 
 * Get parameter values from config file.
 * @return Map
 */
private Map getConfigVars(){
  HashMap configVars=new HashMap();
  String configFileName=getConfigFileName(this.getFileUri());
  if (configFileName == null)   return configVars;
  ReportDesignHandle handle=null;
  try {
    SessionHandle sessionHandle=SessionHandleAdapter.getInstance().getSessionHandle();
    File configFile=new File(configFileName);
    if (configFile != null && configFile.exists() && configFile.isFile()) {
      handle=sessionHandle.openDesign(configFileName);
      if (handle != null) {
        Iterator it=handle.configVariablesIterator();
        while (it != null && it.hasNext()) {
          ConfigVariableHandle configVar=(ConfigVariableHandle)it.next();
          if (configVar != null && configVar.getName() != null) {
            String paramName=getParameterName(configVar.getName());
            ScalarParameterHandle parameter=findParameter(paramName);
            if (parameter != null) {
              String typeVarName=configVar.getName() + "String_Node_Str" + PROP_TYPE;
              ConfigVariable typeVar=handle.findConfigVariable(typeVarName);
              String dataType=null;
              if (typeVar != null)               dataType=typeVar.getValue();
              if (dataType == null || !dataType.equalsIgnoreCase(parameter.getDataType())) {
                continue;
              }
            }
            if (paramName != null && paramName.length() > 0) {
              configVars.put(paramName,configVar.getValue());
            }
          }
        }
        handle.close();
      }
    }
  }
 catch (  DesignFileException e) {
    e.printStackTrace();
    try {
      if (handle != null) {
        handle.close();
      }
    }
 catch (    Exception e1) {
      e1.printStackTrace();
    }
  }
  return configVars;
}

Fixed version (ground truth):
/** 
 * Get parameter values from config file.
 * @return Map
 */
private Map getConfigVars(){
  HashMap configVars=new HashMap();
  String configFileName=getConfigFileName(this.getFileUri());
  if (configFileName == null)   return configVars;
  ReportDesignHandle handle=null;
  try {
    SessionHandle sessionHandle=SessionHandleAdapter.getInstance().getSessionHandle();
    File configFile=new File(configFileName);
    if (configFile != null && configFile.exists() && configFile.isFile()) {
      handle=sessionHandle.openDesign(configFileName);
      if (handle != null) {
        Iterator it=handle.configVariablesIterator();
        while (it != null && it.hasNext()) {
          ConfigVariableHandle configVar=(ConfigVariableHandle)it.next();
          if (configVar != null && configVar.getName() != null) {
            String paramName=getParameterName(configVar.getName());
            ScalarParameterHandle parameter=findParameter(paramName);
            if (parameter != null) {
              String typeVarName=configVar.getName() + "String_Node_Str" + PROP_TYPE;
              ConfigVariable typeVar=handle.findConfigVariable(typeVarName);
              String dataType=null;
              if (typeVar != null)               dataType=typeVar.getValue();
              if (dataType == null || !dataType.equalsIgnoreCase(parameter.getDataType()))               continue;
              String exprVarName=configVar.getName() + "String_Node_Str" + PROP_EXPR;
              ConfigVariable exprVar=handle.findConfigVariable(exprVarName);
              String expr=parameter.getValueExpr();
              String cachedExpr=null;
              if (exprVar != null)               cachedExpr=exprVar.getValue();
              if (cachedExpr == null)               cachedExpr="String_Node_Str";
              if (expr == null)               expr="String_Node_Str";
              if (!cachedExpr.equals(expr))               continue;
            }
            if (paramName != null && paramName.length() > 0) {
              configVars.put(paramName,configVar.getValue());
            }
          }
        }
        handle.close();
      }
    }
  }
 catch (  DesignFileException e) {
    e.printStackTrace();
    try {
      if (handle != null) {
        handle.close();
      }
    }
 catch (    Exception e1) {
      e1.printStackTrace();
    }
  }
  return configVars;
}