Program: 72925
Project: 72925
Buggy source:
public void updateView(AggregationCellHandle cell){
  Object contentItem=ChartXTabUtil.getFirstContent(cell);
  if (ChartReportItemUtil.isChartHandle(contentItem)) {
    ExtendedItemHandle handle=(ExtendedItemHandle)contentItem;
    try {
      if (ChartXTabUtil.isPlotChart(handle)) {
        ChartReportItemImpl reportItem=(ChartReportItemImpl)handle.getReportItem();
        ChartWithAxes cm=(ChartWithAxes)reportItem.getProperty(ChartReportItemConstants.PROPERTY_CHART);
        if (cm == null) {
          cm=createDefaultChart(cell);
        }
 else {
          updateChartQueries(cm,cell);
        }
        reportItem.setProperty(ChartReportItemConstants.PROPERTY_CHART,cm);
        if (cm.isTransposed()) {
          cell.setSpanOverOnRow(cell.getAggregationOnRow());
          cell.setSpanOverOnColumn(null);
        }
 else {
          cell.setSpanOverOnColumn(cell.getAggregationOnColumn());
          cell.setSpanOverOnRow(null);
        }
        ChartXTabUIUtil.updateAxisChart(cell,cm,handle);
        ChartXTabUIUtil.updateXTabDirection(cell.getCrosstab(),cm.isTransposed());
      }
 else       if (ChartXTabUtil.isAxisChart(handle)) {
        ChartReportItemImpl reportItem=(ChartReportItemImpl)handle.getReportItem();
        ChartWithAxes cm=(ChartWithAxes)reportItem.getProperty(ChartReportItemConstants.PROPERTY_CHART);
        ChartXTabUIUtil.updateXTabDirection(cell.getCrosstab(),cm.isTransposed());
      }
    }
 catch (    BirtException e) {
      ExceptionHandler.handle(e);
    }
  }
}

Fixed version (ground truth):
@Override public void updateView(AggregationCellHandle cell,int type){
  Object contentItem=ChartXTabUtil.getFirstContent(cell);
  if (contentItem instanceof ExtendedItemHandle) {
    ExtendedItemHandle handle=(ExtendedItemHandle)contentItem;
    try {
      if (ChartXTabUtil.isPlotChart(handle)) {
        ChartReportItemImpl reportItem=(ChartReportItemImpl)handle.getReportItem();
        ChartWithAxes cm=(ChartWithAxes)reportItem.getProperty(ChartReportItemConstants.PROPERTY_CHART);
        ChartWithAxes cmNew=cm;
        if (cm == null) {
          return;
        }
        cmNew=(ChartWithAxes)EcoreUtil.copy(cm);
        if (type == CHANGE_ORIENTATION_TYPE) {
          cmNew.setTransposed(cell.getCrosstab().getMeasureDirection().equals(ICrosstabConstants.MEASURE_DIRECTION_HORIZONTAL));
        }
        updateChartQueries(cmNew,cell);
        reportItem.executeSetModelCommand(handle,cm,cmNew);
        if (cmNew.isTransposed()) {
          cell.setSpanOverOnRow(cell.getAggregationOnRow());
          cell.setSpanOverOnColumn(null);
        }
 else {
          cell.setSpanOverOnColumn(cell.getAggregationOnColumn());
          cell.setSpanOverOnRow(null);
        }
        if (type == CHANGE_ORIENTATION_TYPE) {
          ChartXTabUIUtil.updateXTabForAxis(cell,handle,cm.isTransposed(),cmNew);
        }
 else {
          ChartXTabUIUtil.updateAxisChart(cell,cmNew,handle);
          ChartXTabUIUtil.updateXTabDirection(cell.getCrosstab(),cmNew.isTransposed());
        }
      }
 else       if (ChartXTabUtil.isAxisChart(handle)) {
        if (type != CHANGE_ORIENTATION_TYPE) {
          ChartReportItemImpl reportItem=(ChartReportItemImpl)handle.getReportItem();
          ChartWithAxes cm=(ChartWithAxes)reportItem.getProperty(ChartReportItemConstants.PROPERTY_CHART);
          ChartXTabUIUtil.updateXTabDirection(cell.getCrosstab(),cm.isTransposed());
        }
      }
    }
 catch (    BirtException e) {
      ExceptionHandler.handle(e);
    }
  }
}