Program: 66253
Project: 66253
Buggy source:
/** 
 * Creates the evaluator for Cube Live preview.
 * @param cube
 * @param cm
 * @param columnExpression
 * @return
 * @throws BirtException
 */
protected IDataRowExpressionEvaluator createCubeEvaluator(CubeHandle cube,final Chart cm,List<String> columnExpression) throws BirtException {
  IBaseCubeQueryDefinition qd=null;
  ReportItemHandle referredHandle=ChartReportItemUtil.getReportItemReference(itemHandle);
  boolean isCrosstabReference=referredHandle != null && ICrosstabConstants.CROSSTAB_EXTENSION_NAME.equals(((ExtendedItemHandle)referredHandle).getExtensionName());
  if (referredHandle != null && isCrosstabReference) {
    ExtendedItemHandle bindingHandle=(ExtendedItemHandle)referredHandle;
    qd=CrosstabQueryUtil.createCubeQuery((CrosstabReportItemHandle)bindingHandle.getReportItem(),null,session.getModelAdaptor(),true,true,true,true,true,true);
    ICubeQueryDefinition queryDef=(ICubeQueryDefinition)qd;
    if (columnExpression != null) {
      ExpressionSet exprSet=new ExpressionSet();
      exprSet.addAll(columnExpression);
      for (      String expr : exprSet) {
        exprCodec.decode(expr);
        String bindingName=exprCodec.getExpression();
        Binding colBinding=new Binding(bindingName);
        colBinding.setDataType(org.eclipse.birt.core.data.DataType.ANY_TYPE);
        colBinding.setExpression(ChartReportItemUtil.adaptExpression(exprCodec,session.getModelAdaptor(),true));
        queryDef.addBinding(colBinding);
      }
    }
  }
 else {
    qd=new ChartCubeQueryHelper(itemHandle,cm,session.getModelAdaptor()).createCubeQuery(null);
  }
  resetCubeQuery(qd);
  if (needDefineCube(cube)) {
    DataService.getInstance().registerSession(cube,session);
    session.defineCube(cube);
  }
  setRowLimit(session,getMaxRow(),true);
  ICubeQueryResults cqr=dteAdapter.executeQuery(session,(ICubeQueryDefinition)qd);
  if (referredHandle != null && isCrosstabReference) {
    return new SharedCubeResultSetEvaluator(cqr,qd,cm);
  }
  return new BIRTCubeResultSetEvaluator(cqr);
}

Fixed version (ground truth):
/** 
 * Creates the evaluator for Cube Live preview.
 * @param cube
 * @param cm
 * @param columnExpression
 * @return
 * @throws BirtException
 */
protected IDataRowExpressionEvaluator createCubeEvaluator(CubeHandle cube,final Chart cm,List<String> columnExpression) throws BirtException {
  IBaseCubeQueryDefinition qd=null;
  ReportItemHandle referredHandle=ChartReportItemUtil.getReportItemReference(itemHandle);
  boolean isCrosstabReference=referredHandle != null && ICrosstabConstants.CROSSTAB_EXTENSION_NAME.equals(((ExtendedItemHandle)referredHandle).getExtensionName());
  if (referredHandle != null && isCrosstabReference) {
    ExtendedItemHandle bindingHandle=(ExtendedItemHandle)referredHandle;
    qd=CrosstabQueryUtil.createCubeQuery((CrosstabReportItemHandle)bindingHandle.getReportItem(),null,session.getModelAdaptor(),true,true,true,true,true,true);
    ICubeQueryDefinition queryDef=(ICubeQueryDefinition)qd;
    if (columnExpression != null) {
      ExpressionSet exprSet=new ExpressionSet();
      exprSet.addAll(columnExpression);
      for (      String expr : exprSet) {
        exprCodec.decode(expr);
        String bindingName=exprCodec.getExpression();
        Binding colBinding=new Binding(bindingName);
        colBinding.setDataType(org.eclipse.birt.core.data.DataType.ANY_TYPE);
        colBinding.setExpression(ChartReportItemUtil.adaptExpression(exprCodec,session.getModelAdaptor(),true));
        queryDef.addBinding(colBinding);
      }
    }
  }
 else {
    qd=new ChartCubeQueryHelper(itemHandle,cm,session.getModelAdaptor()).createCubeQuery(null);
  }
  resetCubeQuery(qd);
  if (needDefineCube(cube)) {
    DataService.getInstance().registerSession(cube,session);
    session.defineCube(cube);
  }
  ICubeQueryResults cqr=dteAdapter.executeQuery(session,(ICubeQueryDefinition)qd);
  BIRTCubeResultSetEvaluator bcrse=null;
  if (referredHandle != null && isCrosstabReference) {
    bcrse=new SharedCubeResultSetEvaluator(cqr,qd,cm);
  }
 else {
    bcrse=new BIRTCubeResultSetEvaluator(cqr);
  }
  bcrse.setSizeLimit(getMaxRow());
  return bcrse;
}