Program: 68301
Project: 68301
Buggy source:
/** 
 * Create base evaluator for chart using data set.
 * @param handle
 * @param cm
 * @param columnExpression
 * @return
 * @throws ChartException
 */
private IDataRowExpressionEvaluator createBaseEvaluator(ExtendedItemHandle handle,Chart cm,List<String> columnExpression) throws ChartException {
  IQueryResults actualResultSet;
  BaseQueryHelper cbqh=new BaseQueryHelper(handle,cm);
  QueryDefinition queryDefn=(QueryDefinition)cbqh.createBaseQuery(columnExpression);
  resetParametersForDataPreview(getDataSetFromHandle(),queryDefn);
  handleGroup(queryDefn,handle,session.getModelAdaptor());
  processQueryDefinition(queryDefn);
  try {
    Iterator<?> bindingIt=ChartReportItemUtil.getColumnDataBindings(handle,true);
    while (bindingIt != null && bindingIt.hasNext()) {
      Object computedBinding=bindingIt.next();
      IBinding binding=session.getModelAdaptor().adaptBinding((ComputedColumnHandle)computedBinding);
      if (binding == null || queryDefn.getBindings().containsKey(binding.getBindingName())) {
        continue;
      }
      queryDefn.addBinding(binding);
    }
    Iterator<FilterConditionHandle> filtersIterator=getFiltersIterator();
    if (filtersIterator != null) {
      while (filtersIterator.hasNext()) {
        IFilterDefinition filter=session.getModelAdaptor().adaptFilter(filtersIterator.next());
        queryDefn.addFilter(filter);
      }
    }
    IPreparedQuery pq=session.prepare(queryDefn,getAppContext(getMaxRow(),false));
    actualResultSet=(IQueryResults)session.execute(pq,null,new ScriptContext());
    if (actualResultSet != null) {
      if (ChartReportItemUtil.isOldChartUsingInternalGroup(itemHandle,cm)) {
        return createSimpleExpressionEvaluator(actualResultSet);
      }
 else {
        return new BaseGroupedQueryResultSetEvaluator(actualResultSet.getResultIterator(),ChartReportItemUtil.isSetSummaryAggregation(cm),cm);
      }
    }
  }
 catch (  BirtException e) {
    throw new ChartException(ChartReportItemUIActivator.ID,ChartException.DATA_BINDING,e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Create base evaluator for chart using data set.
 * @param handle
 * @param cm
 * @param columnExpression
 * @return
 * @throws ChartException
 */
private IDataRowExpressionEvaluator createBaseEvaluator(ExtendedItemHandle handle,Chart cm,List<String> columnExpression) throws ChartException {
  IQueryResults actualResultSet;
  BaseQueryHelper cbqh=new BaseQueryHelper(handle,cm);
  QueryDefinition queryDefn=(QueryDefinition)cbqh.createBaseQuery(columnExpression);
  resetParametersForDataPreview(getDataSetFromHandle(),queryDefn);
  handleGroup(queryDefn,handle,session.getModelAdaptor());
  processQueryDefinition(queryDefn);
  try {
    Iterator<?> bindingIt=ChartReportItemUtil.getColumnDataBindings(handle,true);
    while (bindingIt != null && bindingIt.hasNext()) {
      Object computedBinding=bindingIt.next();
      IBinding binding=session.getModelAdaptor().adaptBinding((ComputedColumnHandle)computedBinding);
      if (binding == null || queryDefn.getBindings().containsKey(binding.getBindingName())) {
        continue;
      }
      queryDefn.addBinding(binding);
    }
    Iterator<FilterConditionHandle> filtersIterator=getFiltersIterator();
    if (filtersIterator != null) {
      while (filtersIterator.hasNext()) {
        IFilterDefinition filter=session.getModelAdaptor().adaptFilter(filtersIterator.next());
        queryDefn.addFilter(filter);
      }
    }
    if (needDefineDataSet(itemHandle.getDataSet())) {
      defineDataSet(itemHandle.getDataSet(),session,true,false);
    }
    IPreparedQuery pq=session.prepare(queryDefn,getAppContext(getMaxRow(),false));
    actualResultSet=(IQueryResults)session.execute(pq,null,new ScriptContext());
    if (actualResultSet != null) {
      if (ChartReportItemUtil.isOldChartUsingInternalGroup(itemHandle,cm)) {
        return createSimpleExpressionEvaluator(actualResultSet);
      }
 else {
        return new BaseGroupedQueryResultSetEvaluator(actualResultSet.getResultIterator(),ChartReportItemUtil.isSetSummaryAggregation(cm),cm);
      }
    }
  }
 catch (  BirtException e) {
    throw new ChartException(ChartReportItemUIActivator.ID,ChartException.DATA_BINDING,e);
  }
  return null;
}