Program: 73412
Project: 73412
Buggy source:
private ChartWithAxes createDefaultChart(String exprMeasure,String[] nameDimensions){
  ChartWithAxes cm=ChartWithAxesImpl.create();
  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 exprCategory=null;
  if (nameDimensions[1] != null) {
    exprCategory=nameDimensions[1];
  }
 else   if (nameDimensions[0] != null) {
    exprCategory=nameDimensions[0];
    cm.setTransposed(true);
  }
  SeriesDefinition sdBase=SeriesDefinitionImpl.create();
  sdBase.getSeriesPalette().shift(0);
  Series series=SeriesImpl.create();
  sdBase.getSeries().add(series);
  cm.getBaseAxes()[0].getSeriesDefinitions().add(sdBase);
  if (exprCategory != null) {
    Query query=QueryImpl.create(ExpressionUtil.createJSDataExpression(exprCategory));
    series.getDataDefinition().add(query);
  }
  SeriesDefinition sdOrth=SeriesDefinitionImpl.create();
  sdOrth.getSeriesPalette().shift(0);
  series=BarSeriesImpl.create();
  sdOrth.getSeries().add(series);
  cm.getOrthogonalAxes(cm.getBaseAxes()[0],true)[0].getSeriesDefinitions().add(sdOrth);
  if (exprMeasure != null) {
    Query query=QueryImpl.create(exprMeasure);
    series.getDataDefinition().add(query);
  }
  SampleData sampleData=DataFactory.eINSTANCE.createSampleData();
  sampleData.getBaseSampleData().clear();
  sampleData.getOrthogonalSampleData().clear();
  BaseSampleData sampleDataBase=DataFactory.eINSTANCE.createBaseSampleData();
  sampleDataBase.setDataSetRepresentation("String_Node_Str");
  sampleData.getBaseSampleData().add(sampleDataBase);
  OrthogonalSampleData sampleDataOrth=DataFactory.eINSTANCE.createOrthogonalSampleData();
  sampleDataOrth.setDataSetRepresentation("String_Node_Str");
  sampleDataOrth.setSeriesDefinitionIndex(0);
  sampleData.getOrthogonalSampleData().add(sampleDataOrth);
  cm.setSampleData(sampleData);
  return cm;
}

Fixed version (ground truth):
private ChartWithAxes createDefaultChart(AggregationCellHandle cell){
  ChartWithAxes cm=ChartWithAxesImpl.create();
  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=ExpressionUtil.createJSDataExpression(ChartXTabUtil.generateComputedColumnName(cell));
  String exprCategory=null;
  if (cell.getAggregationOnColumn() == null || cell.getCrosstab().getGrandTotal(ICrosstabConstants.COLUMN_AXIS_TYPE) != null) {
    cm.setTransposed(true);
    Object content=getFirstContent(ChartXTabUtil.getInnermostLevelCell(cell.getCrosstab(),ICrosstabConstants.ROW_AXIS_TYPE));
    if (content instanceof DataItemHandle) {
      DataItemHandle dataItemHandle=(DataItemHandle)content;
      exprCategory=dataItemHandle.getResultSetColumn();
    }
  }
 else {
    Object content=getFirstContent(ChartXTabUtil.getInnermostLevelCell(cell.getCrosstab(),ICrosstabConstants.COLUMN_AXIS_TYPE));
    if (content instanceof DataItemHandle) {
      DataItemHandle dataItemHandle=(DataItemHandle)content;
      exprCategory=dataItemHandle.getResultSetColumn();
    }
  }
  SeriesDefinition sdBase=SeriesDefinitionImpl.create();
  sdBase.getSeriesPalette().shift(0);
  Series series=SeriesImpl.create();
  sdBase.getSeries().add(series);
  cm.getBaseAxes()[0].getSeriesDefinitions().add(sdBase);
  if (exprCategory != null) {
    Query query=QueryImpl.create(ExpressionUtil.createJSDataExpression(exprCategory));
    series.getDataDefinition().add(query);
  }
  SeriesDefinition sdOrth=SeriesDefinitionImpl.create();
  sdOrth.getSeriesPalette().shift(0);
  series=BarSeriesImpl.create();
  sdOrth.getSeries().add(series);
  cm.getOrthogonalAxes(cm.getBaseAxes()[0],true)[0].getSeriesDefinitions().add(sdOrth);
  if (exprMeasure != null) {
    Query query=QueryImpl.create(exprMeasure);
    series.getDataDefinition().add(query);
  }
  SampleData sampleData=DataFactory.eINSTANCE.createSampleData();
  sampleData.getBaseSampleData().clear();
  sampleData.getOrthogonalSampleData().clear();
  BaseSampleData sampleDataBase=DataFactory.eINSTANCE.createBaseSampleData();
  sampleDataBase.setDataSetRepresentation("String_Node_Str");
  sampleData.getBaseSampleData().add(sampleDataBase);
  OrthogonalSampleData sampleDataOrth=DataFactory.eINSTANCE.createOrthogonalSampleData();
  sampleDataOrth.setDataSetRepresentation("String_Node_Str");
  sampleDataOrth.setSeriesDefinitionIndex(0);
  sampleData.getOrthogonalSampleData().add(sampleDataOrth);
  cm.setSampleData(sampleData);
  return cm;
}