Program: 65917
Project: 65917
Buggy source:
public Chart getModel(String sSubType,Orientation orientation,String sDimension,Chart currentChart){
  ChartWithAxes newChart=null;
  if (currentChart != null) {
    newChart=(ChartWithAxes)getConvertedChart(currentChart,sSubType,orientation,sDimension);
    if (newChart != null) {
      return newChart;
    }
  }
  newChart=ChartWithAxesImpl.createDefault();
  newChart.setType(TYPE_LITERAL);
  newChart.setSubType(sSubType);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",orientation,orientation == null);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",ChartUIUtil.getDimensionType(sDimension),sDimension == null);
  Axis xAxis=newChart.getAxes().get(0);
  Axis yAxis=xAxis.getAssociatedAxes().get(0);
  SeriesDefinition sdX=SeriesDefinitionImpl.createDefault();
  Series categorySeries=SeriesImpl.createDefault();
  sdX.getSeries().add(categorySeries);
  xAxis.getSeriesDefinitions().add(sdX);
  if (sSubType.equalsIgnoreCase(STACKED_SUBTYPE_LITERAL)) {
    SeriesDefinition sdY=SeriesDefinitionImpl.createDefault();
    Series valueSeries=getSeries(false);
    ((AreaSeries)valueSeries).setStacked(true);
    sdY.getSeries().add(valueSeries);
    yAxis.getSeriesDefinitions().add(sdY);
  }
 else   if (sSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL)) {
    SeriesDefinition sdY=SeriesDefinitionImpl.createDefault();
    Series valueSeries=getSeries(false);
    ((AreaSeries)valueSeries).setStacked(true);
    sdY.getSeries().add(valueSeries);
    yAxis.getSeriesDefinitions().add(sdY);
  }
 else   if (sSubType.equalsIgnoreCase(OVERLAY_SUBTYPE_LITERAL)) {
    SeriesDefinition sdY=SeriesDefinitionImpl.create();
    Series valueSeries=getSeries(false);
    sdY.getSeries().add(valueSeries);
    yAxis.getSeriesDefinitions().add(sdY);
  }
  if (sDimension != null && sDimension.equals(THREE_DIMENSION_TYPE)) {
    newChart.setRotation(Rotation3DImpl.createDefault(new Angle3D[]{Angle3DImpl.createDefault(-20,45,0)}));
    newChart.getPrimaryBaseAxes()[0].getAncillaryAxes().clear();
    Axis zAxisAncillary=AxisImpl.createDefault(Axis.ANCILLARY_BASE);
    zAxisAncillary.getOrigin().setValue(NumberDataElementImpl.create(0));
    newChart.getPrimaryBaseAxes()[0].getAncillaryAxes().add(zAxisAncillary);
    SeriesDefinition sdZ=SeriesDefinitionImpl.createDefault();
    sdZ.getSeries().add(SeriesImpl.createDefault());
    zAxisAncillary.getSeriesDefinitions().add(sdZ);
  }
  addSampleData(newChart);
  return newChart;
}

Fixed version (ground truth):
public Chart getModel(String sSubType,Orientation orientation,String sDimension,Chart currentChart){
  ChartWithAxes newChart=null;
  if (currentChart != null) {
    newChart=(ChartWithAxes)getConvertedChart(currentChart,sSubType,orientation,sDimension);
    if (newChart != null) {
      return newChart;
    }
  }
  newChart=ChartWithAxesImpl.createDefault();
  newChart.setType(TYPE_LITERAL);
  newChart.setSubType(sSubType);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",orientation,orientation == null);
  ChartElementUtil.setEObjectAttribute(newChart,"String_Node_Str",ChartUIUtil.getDimensionType(sDimension),sDimension == null);
  try {
    ChartElementUtil.setDefaultValue(newChart.getAxes().get(0),"String_Node_Str",true);
  }
 catch (  ChartException e) {
  }
  Axis xAxis=newChart.getAxes().get(0);
  Axis yAxis=xAxis.getAssociatedAxes().get(0);
  SeriesDefinition sdX=SeriesDefinitionImpl.createDefault();
  Series categorySeries=SeriesImpl.createDefault();
  sdX.getSeries().add(categorySeries);
  xAxis.getSeriesDefinitions().add(sdX);
  if (sSubType.equalsIgnoreCase(STACKED_SUBTYPE_LITERAL)) {
    SeriesDefinition sdY=SeriesDefinitionImpl.createDefault();
    Series valueSeries=getSeries(false);
    ((AreaSeries)valueSeries).setStacked(true);
    sdY.getSeries().add(valueSeries);
    yAxis.getSeriesDefinitions().add(sdY);
  }
 else   if (sSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL)) {
    SeriesDefinition sdY=SeriesDefinitionImpl.createDefault();
    Series valueSeries=getSeries(false);
    ((AreaSeries)valueSeries).setStacked(true);
    sdY.getSeries().add(valueSeries);
    yAxis.getSeriesDefinitions().add(sdY);
  }
 else   if (sSubType.equalsIgnoreCase(OVERLAY_SUBTYPE_LITERAL)) {
    SeriesDefinition sdY=SeriesDefinitionImpl.create();
    Series valueSeries=getSeries(false);
    sdY.getSeries().add(valueSeries);
    yAxis.getSeriesDefinitions().add(sdY);
  }
  if (sDimension != null && sDimension.equals(THREE_DIMENSION_TYPE)) {
    newChart.setRotation(Rotation3DImpl.createDefault(new Angle3D[]{Angle3DImpl.createDefault(-20,45,0)}));
    newChart.getPrimaryBaseAxes()[0].getAncillaryAxes().clear();
    Axis zAxisAncillary=AxisImpl.createDefault(Axis.ANCILLARY_BASE);
    zAxisAncillary.getOrigin().setValue(NumberDataElementImpl.create(0));
    newChart.getPrimaryBaseAxes()[0].getAncillaryAxes().add(zAxisAncillary);
    SeriesDefinition sdZ=SeriesDefinitionImpl.createDefault();
    sdZ.getSeries().add(SeriesImpl.createDefault());
    zAxisAncillary.getSeriesDefinitions().add(sdZ);
  }
  addSampleData(newChart);
  return newChart;
}