Program: 67094
Project: 67094
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,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,columnExpression.toArray(new String[columnExpression.size()]));
  }
  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,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,columnExpression.toArray(new String[columnExpression.size()]));
  }
  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);
}