Program: 73892
Project: 73892
Buggy source:
public IDataQueryDefinition[] createReportQueries(IDataQueryDefinition parent) throws BirtException {
  if (crosstabItem == null) {
    throw new CrosstabException(modelHandle == null ? null : modelHandle.getElement(),Messages.getString("String_Node_Str"));
  }
  IDataQueryDefinition cubeQuery=CrosstabQueryUtil.createCubeQuery(crosstabItem,parent,true,true,true,true,true,true);
  String emptyValue=crosstabItem.getEmptyCellValue();
  if (context != null) {
    for (int i=0; i < crosstabItem.getMeasureCount(); i++) {
      MeasureViewHandle mv=crosstabItem.getMeasure(i);
      processChildQuery(cubeQuery,mv.getCell(),emptyValue);
      processChildQuery(cubeQuery,mv.getHeader(),emptyValue);
      for (int j=0; j < mv.getAggregationCount(); j++) {
        processChildQuery(cubeQuery,mv.getAggregationCell(j),emptyValue);
      }
    }
    if (crosstabItem.getDimensionCount(ROW_AXIS_TYPE) > 0) {
      for (int i=0; i < crosstabItem.getDimensionCount(ROW_AXIS_TYPE); i++) {
        DimensionViewHandle dv=crosstabItem.getDimension(ROW_AXIS_TYPE,i);
        for (int j=0; j < dv.getLevelCount(); j++) {
          LevelViewHandle lv=dv.getLevel(j);
          processChildQuery(cubeQuery,lv.getCell(),emptyValue);
          processChildQuery(cubeQuery,lv.getAggregationHeader(),emptyValue);
        }
      }
    }
    if (crosstabItem.getDimensionCount(COLUMN_AXIS_TYPE) > 0) {
      for (int i=0; i < crosstabItem.getDimensionCount(COLUMN_AXIS_TYPE); i++) {
        DimensionViewHandle dv=crosstabItem.getDimension(COLUMN_AXIS_TYPE,i);
        for (int j=0; j < dv.getLevelCount(); j++) {
          LevelViewHandle lv=dv.getLevel(j);
          processChildQuery(cubeQuery,lv.getCell(),emptyValue);
          processChildQuery(cubeQuery,lv.getAggregationHeader(),emptyValue);
        }
      }
    }
    processChildQuery(cubeQuery,crosstabItem.getGrandTotal(ROW_AXIS_TYPE),emptyValue);
    processChildQuery(cubeQuery,crosstabItem.getGrandTotal(COLUMN_AXIS_TYPE),emptyValue);
  }
  return new IDataQueryDefinition[]{cubeQuery};
}

Fixed version (ground truth):
public IDataQueryDefinition[] createReportQueries(IDataQueryDefinition parent) throws BirtException {
  if (crosstabItem == null) {
    throw new CrosstabException(modelHandle == null ? null : modelHandle.getElement(),Messages.getString("String_Node_Str"));
  }
  IDataQueryDefinition cubeQuery=CrosstabQueryUtil.createCubeQuery(crosstabItem,parent,true,true,true,true,true,true);
  String emptyValue=crosstabItem.getEmptyCellValue();
  if (context != null) {
    processChildQuery(cubeQuery,crosstabItem.getHeader(),emptyValue);
    for (int i=0; i < crosstabItem.getMeasureCount(); i++) {
      MeasureViewHandle mv=crosstabItem.getMeasure(i);
      processChildQuery(cubeQuery,mv.getCell(),emptyValue);
      processChildQuery(cubeQuery,mv.getHeader(),emptyValue);
      for (int j=0; j < mv.getAggregationCount(); j++) {
        processChildQuery(cubeQuery,mv.getAggregationCell(j),emptyValue);
      }
    }
    if (crosstabItem.getDimensionCount(ROW_AXIS_TYPE) > 0) {
      for (int i=0; i < crosstabItem.getDimensionCount(ROW_AXIS_TYPE); i++) {
        DimensionViewHandle dv=crosstabItem.getDimension(ROW_AXIS_TYPE,i);
        for (int j=0; j < dv.getLevelCount(); j++) {
          LevelViewHandle lv=dv.getLevel(j);
          processChildQuery(cubeQuery,lv.getCell(),emptyValue);
          processChildQuery(cubeQuery,lv.getAggregationHeader(),emptyValue);
        }
      }
    }
    if (crosstabItem.getDimensionCount(COLUMN_AXIS_TYPE) > 0) {
      for (int i=0; i < crosstabItem.getDimensionCount(COLUMN_AXIS_TYPE); i++) {
        DimensionViewHandle dv=crosstabItem.getDimension(COLUMN_AXIS_TYPE,i);
        for (int j=0; j < dv.getLevelCount(); j++) {
          LevelViewHandle lv=dv.getLevel(j);
          processChildQuery(cubeQuery,lv.getCell(),emptyValue);
          processChildQuery(cubeQuery,lv.getAggregationHeader(),emptyValue);
        }
      }
    }
    processChildQuery(cubeQuery,crosstabItem.getGrandTotal(ROW_AXIS_TYPE),emptyValue);
    processChildQuery(cubeQuery,crosstabItem.getGrandTotal(COLUMN_AXIS_TYPE),emptyValue);
  }
  return new IDataQueryDefinition[]{cubeQuery};
}