Program: 79014
Project: 79014
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.create();
  newChart.setType(TYPE_LITERAL);
  newChart.setSubType(sSubType);
  newChart.setOrientation(orientation);
  newChart.setDimension(getDimensionFor(sDimension));
  newChart.setUnits("String_Node_Str");
  ((Axis)newChart.getAxes().get(0)).setOrientation(Orientation.HORIZONTAL_LITERAL);
  ((Axis)newChart.getAxes().get(0)).setType(AxisType.DATE_TIME_LITERAL);
  ((Axis)newChart.getAxes().get(0)).setCategoryAxis(true);
  SeriesDefinition sdX=SeriesDefinitionImpl.create();
  Series categorySeries=SeriesImpl.create();
  sdX.getSeries().add(categorySeries);
  sdX.getSeriesPalette().update(0);
  ((Axis)newChart.getAxes().get(0)).getSeriesDefinitions().add(sdX);
  ((Axis)((Axis)newChart.getAxes().get(0)).getAssociatedAxes().get(0)).setOrientation(Orientation.VERTICAL_LITERAL);
  ((Axis)((Axis)newChart.getAxes().get(0)).getAssociatedAxes().get(0)).setType(AxisType.LINEAR_LITERAL);
  SeriesDefinition sdY=SeriesDefinitionImpl.create();
  sdY.getSeriesPalette().update(0);
  Series valueSeries=StockSeriesImpl.create();
  valueSeries.getLabel().setVisible(true);
  sdY.getSeries().add(valueSeries);
  ((Axis)((Axis)newChart.getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().add(sdY);
  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.create();
  newChart.setType(TYPE_LITERAL);
  newChart.setSubType(sSubType);
  newChart.setOrientation(orientation);
  newChart.setDimension(getDimensionFor(sDimension));
  newChart.setUnits("String_Node_Str");
  newChart.getTitle().getLabel().getCaption().setValue(CHART_TITLE);
  ((Axis)newChart.getAxes().get(0)).setOrientation(Orientation.HORIZONTAL_LITERAL);
  ((Axis)newChart.getAxes().get(0)).setType(AxisType.DATE_TIME_LITERAL);
  ((Axis)newChart.getAxes().get(0)).setCategoryAxis(true);
  SeriesDefinition sdX=SeriesDefinitionImpl.create();
  Series categorySeries=SeriesImpl.create();
  sdX.getSeries().add(categorySeries);
  sdX.getSeriesPalette().update(0);
  ((Axis)newChart.getAxes().get(0)).getSeriesDefinitions().add(sdX);
  ((Axis)((Axis)newChart.getAxes().get(0)).getAssociatedAxes().get(0)).setOrientation(Orientation.VERTICAL_LITERAL);
  ((Axis)((Axis)newChart.getAxes().get(0)).getAssociatedAxes().get(0)).setType(AxisType.LINEAR_LITERAL);
  SeriesDefinition sdY=SeriesDefinitionImpl.create();
  sdY.getSeriesPalette().update(0);
  Series valueSeries=StockSeriesImpl.create();
  valueSeries.getLabel().setVisible(true);
  sdY.getSeries().add(valueSeries);
  ((Axis)((Axis)newChart.getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().add(sdY);
  addSampleData(newChart);
  return newChart;
}