Program: 65016
Project: 65016
Buggy source:
private ChartWithAxes createDefaultChart(SwitchCellInfo info){
  AggregationCellHandle cell=info.getAggregationCell();
  boolean bDateTypeMeasure=false;
  if (info.getMeasureInfo() != null) {
    String dataType=info.getCrosstab().getCube().getMeasure(info.getMeasureInfo().getMeasureName()).getDataType();
    bDateTypeMeasure=DesignChoiceConstants.COLUMN_DATA_TYPE_DATE.equals(dataType) || DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME.equals(dataType);
  }
  ChartWithAxes cm=ChartWithAxesImpl.createDefault();
  cm.setType("String_Node_Str");
  cm.setSubType("String_Node_Str");
  cm.setUnits("String_Node_Str");
  cm.setUnitSpacing(50);
  cm.getLegend().setVisible(false);
  cm.getTitle().setVisible(false);
  String exprMeasure=ChartCubeUtil.generateComputedColumnName(cell,ChartReportItemHelper.instance().getMeasureExprIndicator(cell.getCrosstab().getCube()));
  String exprCategory=null;
  if (checkTransposed(cell)) {
    cm.setTransposed(true);
    cm.setReverseCategory(true);
    Object content=ChartCubeUtil.getFirstContent(ChartCubeUtil.getInnermostLevelCell(cell.getCrosstab(),ICrosstabConstants.ROW_AXIS_TYPE));
    if (content instanceof DataItemHandle) {
      DataItemHandle dataItemHandle=(DataItemHandle)content;
      exprCategory=dataItemHandle.getResultSetColumn();
    }
  }
 else {
    Object content=ChartCubeUtil.getFirstContent(ChartCubeUtil.getInnermostLevelCell(cell.getCrosstab(),ICrosstabConstants.COLUMN_AXIS_TYPE));
    if (content instanceof DataItemHandle) {
      DataItemHandle dataItemHandle=(DataItemHandle)content;
      exprCategory=dataItemHandle.getResultSetColumn();
    }
  }
  Axis xAxis=cm.getBaseAxes()[0];
  SeriesDefinition sdBase=SeriesDefinitionImpl.createDefault();
  Series series=SeriesImpl.createDefault();
  sdBase.getSeries().add(series);
  xAxis.setCategoryAxis(true);
  xAxis.getSeriesDefinitions().add(sdBase);
  if (exprCategory != null) {
    Query query=QueryImpl.create(ExpressionUtil.createJSDataExpression(exprCategory));
    series.getDataDefinition().add(query);
  }
  Axis yAxis=cm.getOrthogonalAxes(xAxis,true)[0];
  SeriesDefinition sdOrth=SeriesDefinitionImpl.createDefault();
  series=BarSeriesImpl.createDefault();
  sdOrth.getSeries().add(series);
  yAxis.getSeriesDefinitions().add(sdOrth);
  if (bDateTypeMeasure) {
    yAxis.setType(AxisType.DATE_TIME_LITERAL);
  }
  if (exprMeasure != null) {
    Query query=QueryImpl.create(ExpressionUtil.createJSDataExpression(exprMeasure));
    series.getDataDefinition().add(query);
  }
  SampleData sampleData=DataFactory.eINSTANCE.createSampleData();
  sampleData.getBaseSampleData().clear();
  sampleData.getOrthogonalSampleData().clear();
  BaseSampleData sampleDataBase=DataFactory.eINSTANCE.createBaseSampleData();
  sampleDataBase.setDataSetRepresentation(ChartUtil.getNewSampleData(xAxis.getType(),0));
  sampleData.getBaseSampleData().add(sampleDataBase);
  OrthogonalSampleData sampleDataOrth=DataFactory.eINSTANCE.createOrthogonalSampleData();
  sampleDataOrth.setDataSetRepresentation(ChartUtil.getNewSampleData(yAxis.getType(),0));
  sampleDataOrth.setSeriesDefinitionIndex(0);
  sampleData.getOrthogonalSampleData().add(sampleDataOrth);
  cm.setSampleData(sampleData);
  return cm;
}

Fixed version (ground truth):
private ChartWithAxes createDefaultChart(SwitchCellInfo info){
  AggregationCellHandle cell=info.getAggregationCell();
  boolean bDateTypeMeasure=false;
  if (info.getMeasureInfo() != null) {
    MeasureHandle measure=info.getCrosstab().getCube().getMeasure(info.getMeasureInfo().getMeasureName());
    String dataType=measure.getDataType();
    String function=measure.getFunction();
    bDateTypeMeasure=!(DesignChoiceConstants.AGGREGATION_FUNCTION_COUNT.equals(function) || DesignChoiceConstants.AGGREGATION_FUNCTION_COUNTDISTINCT.equals(function)) && (DesignChoiceConstants.COLUMN_DATA_TYPE_DATE.equals(dataType) || DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME.equals(dataType));
  }
  ChartWithAxes cm=ChartWithAxesImpl.createDefault();
  cm.setType("String_Node_Str");
  cm.setSubType("String_Node_Str");
  cm.setUnits("String_Node_Str");
  cm.setUnitSpacing(50);
  cm.getLegend().setVisible(false);
  cm.getTitle().setVisible(false);
  String exprMeasure=ChartCubeUtil.generateComputedColumnName(cell,ChartReportItemHelper.instance().getMeasureExprIndicator(cell.getCrosstab().getCube()));
  String exprCategory=null;
  if (checkTransposed(cell)) {
    cm.setTransposed(true);
    cm.setReverseCategory(true);
    Object content=ChartCubeUtil.getFirstContent(ChartCubeUtil.getInnermostLevelCell(cell.getCrosstab(),ICrosstabConstants.ROW_AXIS_TYPE));
    if (content instanceof DataItemHandle) {
      DataItemHandle dataItemHandle=(DataItemHandle)content;
      exprCategory=dataItemHandle.getResultSetColumn();
    }
  }
 else {
    Object content=ChartCubeUtil.getFirstContent(ChartCubeUtil.getInnermostLevelCell(cell.getCrosstab(),ICrosstabConstants.COLUMN_AXIS_TYPE));
    if (content instanceof DataItemHandle) {
      DataItemHandle dataItemHandle=(DataItemHandle)content;
      exprCategory=dataItemHandle.getResultSetColumn();
    }
  }
  Axis xAxis=cm.getBaseAxes()[0];
  SeriesDefinition sdBase=SeriesDefinitionImpl.createDefault();
  Series series=SeriesImpl.createDefault();
  sdBase.getSeries().add(series);
  xAxis.setCategoryAxis(true);
  xAxis.getSeriesDefinitions().add(sdBase);
  if (exprCategory != null) {
    Query query=QueryImpl.create(ExpressionUtil.createJSDataExpression(exprCategory));
    series.getDataDefinition().add(query);
  }
  Axis yAxis=cm.getOrthogonalAxes(xAxis,true)[0];
  SeriesDefinition sdOrth=SeriesDefinitionImpl.createDefault();
  series=BarSeriesImpl.createDefault();
  sdOrth.getSeries().add(series);
  yAxis.getSeriesDefinitions().add(sdOrth);
  if (bDateTypeMeasure) {
    yAxis.setType(AxisType.DATE_TIME_LITERAL);
  }
  if (exprMeasure != null) {
    Query query=QueryImpl.create(ExpressionUtil.createJSDataExpression(exprMeasure));
    series.getDataDefinition().add(query);
  }
  SampleData sampleData=DataFactory.eINSTANCE.createSampleData();
  sampleData.getBaseSampleData().clear();
  sampleData.getOrthogonalSampleData().clear();
  BaseSampleData sampleDataBase=DataFactory.eINSTANCE.createBaseSampleData();
  sampleDataBase.setDataSetRepresentation(ChartUtil.getNewSampleData(xAxis.getType(),0));
  sampleData.getBaseSampleData().add(sampleDataBase);
  OrthogonalSampleData sampleDataOrth=DataFactory.eINSTANCE.createOrthogonalSampleData();
  sampleDataOrth.setDataSetRepresentation(ChartUtil.getNewSampleData(yAxis.getType(),0));
  sampleDataOrth.setSeriesDefinitionIndex(0);
  sampleData.getOrthogonalSampleData().add(sampleDataOrth);
  cm.setSampleData(sampleData);
  return cm;
}