Program: 67093
Project: 67093
Buggy source:
/** 
 * @return
 */
private List getSelectValueList(){
  if (needRefreshList == false) {
    return selValueList;
  }
  CubeHandle cube=null;
  if (designHandle instanceof ExtendedItemHandle) {
    cube=((ExtendedItemHandle)designHandle).getCube();
  }
  if (cube == null || expression.getText().length() == 0) {
    return new ArrayList();
  }
  Iterator iter=null;
  IBaseCubeQueryDefinition cubeQueryDefn=null;
  try {
    DataRequestSession session=getDteSession();
    session=DataRequestSession.newSession(new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION));
    IReportItem item=((ExtendedItemHandle)designHandle).getReportItem();
    Chart cm=getChartModel(item);
    ChartCubeQueryHelper ccqh=new ChartCubeQueryHelper((ExtendedItemHandle)designHandle,cm,session.getModelAdaptor());
    String expr=expButton.getExpression();
    if (expr != null && expr.equals(expButton.getExpression())) {
      cubeQueryDefn=ccqh.createCubeQuery(null,new String[]{expr});
    }
 else {
      cubeQueryDefn=ccqh.createCubeQuery(null);
    }
    String bindingName=exprCodec.getBindingName(expr);
    exprCodec.setBindingName(bindingName,true,ExpressionType.JAVASCRIPT);
    iter=session.getCubeQueryUtil().getMemberValueIterator(cube,exprCodec.getExpression(),(ICubeQueryDefinition)cubeQueryDefn);
  }
 catch (  Exception e) {
    logger.log(Level.SEVERE,e.getMessage(),e);
  }
  selValueList=new ArrayList();
  while (iter != null && iter.hasNext()) {
    Object obj=iter.next();
    if (obj != null) {
      if (selValueList.indexOf(obj) < 0) {
        selValueList.add(obj);
      }
    }
  }
  needRefreshList=false;
  return selValueList;
}

Fixed version (ground truth):
/** 
 * @return
 */
private List getSelectValueList(){
  if (needRefreshList == false) {
    return selValueList;
  }
  CubeHandle cube=null;
  if (designHandle instanceof ExtendedItemHandle) {
    cube=((ExtendedItemHandle)designHandle).getCube();
  }
  if (cube == null || expression.getText().length() == 0) {
    return new ArrayList();
  }
  Iterator iter=null;
  IBaseCubeQueryDefinition cubeQueryDefn=null;
  try {
    ReportDesignHandle copy=(ReportDesignHandle)(designHandle.getModuleHandle().copy().getHandle(null));
    EngineConfig config=new EngineConfig();
    config.setProperty(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,DataSetProvider.getCustomScriptClassLoader(Thread.currentThread().getContextClassLoader(),copy));
    ReportEngine engine=(ReportEngine)new ReportEngineFactory().createReportEngine(config);
    DummyEngineTask engineTask=new DummyEngineTask(engine,new ReportEngineHelper(engine).openReportDesign(copy),copy);
    session=engineTask.getDataSession();
    engineTask.run();
    DataService.getInstance().registerSession(cube,session);
    IReportItem item=((ExtendedItemHandle)designHandle).getReportItem();
    Chart cm=getChartModel(item);
    ChartCubeQueryHelper ccqh=new ChartCubeQueryHelper((ExtendedItemHandle)designHandle,cm,session.getModelAdaptor());
    String expr=expButton.getExpression();
    if (expr != null && expr.equals(expButton.getExpression())) {
      cubeQueryDefn=ccqh.createCubeQuery(null,new String[]{expr});
    }
 else {
      cubeQueryDefn=ccqh.createCubeQuery(null);
    }
    String bindingName=exprCodec.getBindingName(expr);
    exprCodec.setBindingName(bindingName,true,ExpressionType.JAVASCRIPT);
    iter=session.getCubeQueryUtil().getMemberValueIterator(cube,exprCodec.getExpression(),(ICubeQueryDefinition)cubeQueryDefn);
  }
 catch (  Exception e) {
    logger.log(Level.SEVERE,e.getMessage(),e);
  }
  selValueList=new ArrayList();
  while (iter != null && iter.hasNext()) {
    Object obj=iter.next();
    if (obj != null) {
      if (selValueList.indexOf(obj) < 0) {
        selValueList.add(obj);
      }
    }
  }
  needRefreshList=false;
  return selValueList;
}