Program: 67810
Project: 67810
Buggy source:
/** 
 * Creates a stock chart instance
 * @return An instance of the simulated runtime chart model (containingfilled datasets)
 */
public final static Chart createStockChart(){
  ChartWithAxes cwaStock=ChartWithAxesImpl.create();
  cwaStock.getTitle().getLabel().getCaption().setValue("String_Node_Str");
  TitleBlock tb=cwaStock.getTitle();
  tb.setBackground(GradientImpl.create(ColorDefinitionImpl.create(0,128,0),ColorDefinitionImpl.create(128,0,0),0,false));
  tb.getLabel().getCaption().setColor(ColorDefinitionImpl.WHITE());
  cwaStock.getBlock().setBackground(GradientImpl.create(ColorDefinitionImpl.create(196,196,196),ColorDefinitionImpl.WHITE(),90,false));
  cwaStock.getPlot().getClientArea().getInsets().set(10,10,10,10);
  cwaStock.getLegend().setBackground(ColorDefinitionImpl.ORANGE());
  Axis xAxisPrimary=((ChartWithAxesImpl)cwaStock).getPrimaryBaseAxes()[0];
  xAxisPrimary.getTitle().getCaption().setValue("String_Node_Str");
  xAxisPrimary.getTitle().getCaption().setColor(ColorDefinitionImpl.RED());
  xAxisPrimary.getTitle().getCaption().setValue("String_Node_Str");
  xAxisPrimary.setTitlePosition(Position.ABOVE_LITERAL);
  xAxisPrimary.getLabel().getCaption().setColor(ColorDefinitionImpl.RED());
  xAxisPrimary.getLabel().getCaption().getFont().setRotation(65);
  xAxisPrimary.setLabelPosition(Position.ABOVE_LITERAL);
  xAxisPrimary.setType(AxisType.DATE_TIME_LITERAL);
  xAxisPrimary.getOrigin().setType(IntersectionType.MAX_LITERAL);
  xAxisPrimary.getMajorGrid().setTickStyle(TickStyle.ABOVE_LITERAL);
  xAxisPrimary.getMajorGrid().getLineAttributes().setColor(ColorDefinitionImpl.create(255,196,196));
  xAxisPrimary.getMajorGrid().getLineAttributes().setStyle(LineStyle.DOTTED_LITERAL);
  xAxisPrimary.getMajorGrid().getLineAttributes().setVisible(true);
  xAxisPrimary.setCategoryAxis(true);
  Axis yAxisPrimary=((ChartWithAxesImpl)cwaStock).getPrimaryOrthogonalAxis(xAxisPrimary);
  yAxisPrimary.getLabel().getCaption().setValue("String_Node_Str");
  yAxisPrimary.getLabel().getCaption().setColor(ColorDefinitionImpl.BLUE());
  yAxisPrimary.setLabelPosition(Position.LEFT_LITERAL);
  yAxisPrimary.getTitle().getCaption().setValue("String_Node_Str");
  yAxisPrimary.getTitle().getCaption().setColor(ColorDefinitionImpl.BLUE());
  yAxisPrimary.setTitlePosition(Position.LEFT_LITERAL);
  yAxisPrimary.getScale().setMin(NumberDataElementImpl.create(24.5));
  yAxisPrimary.getScale().setMax(NumberDataElementImpl.create(27.5));
  yAxisPrimary.getScale().setStep(0.5);
  yAxisPrimary.getMajorGrid().getLineAttributes().setColor(ColorDefinitionImpl.create(196,196,255));
  yAxisPrimary.getMajorGrid().getLineAttributes().setStyle(LineStyle.DOTTED_LITERAL);
  yAxisPrimary.getMajorGrid().getLineAttributes().setVisible(true);
  yAxisPrimary.getMajorGrid().setTickStyle(TickStyle.LEFT_LITERAL);
  yAxisPrimary.setType(AxisType.LINEAR_LITERAL);
  yAxisPrimary.getOrigin().setType(IntersectionType.MIN_LITERAL);
  Axis yAxisOverlay=AxisImpl.create(Axis.ORTHOGONAL);
  yAxisOverlay.getLabel().getCaption().setColor(ColorDefinitionImpl.create(0,128,0));
  yAxisOverlay.getLabel().getCaption().getFont().setRotation(-25);
  yAxisOverlay.setLabelPosition(Position.RIGHT_LITERAL);
  yAxisOverlay.getTitle().getCaption().setValue("String_Node_Str");
  yAxisOverlay.getTitle().getCaption().setColor(ColorDefinitionImpl.GREEN().darker());
  yAxisOverlay.getTitle().getCaption().getFont().setRotation(90);
  yAxisOverlay.getTitle().getCaption().getFont().setSize(16);
  yAxisOverlay.getTitle().getCaption().getFont().setBold(true);
  yAxisOverlay.getTitle().setVisible(true);
  yAxisOverlay.setTitlePosition(Position.RIGHT_LITERAL);
  yAxisOverlay.getLineAttributes().setColor(ColorDefinitionImpl.create(0,128,0));
  yAxisOverlay.setType(AxisType.LINEAR_LITERAL);
  yAxisOverlay.setOrientation(Orientation.VERTICAL_LITERAL);
  yAxisOverlay.getMajorGrid().getLineAttributes().setColor(ColorDefinitionImpl.create(64,196,64));
  yAxisOverlay.getMajorGrid().getLineAttributes().setStyle(LineStyle.DOTTED_LITERAL);
  yAxisOverlay.getMajorGrid().getLineAttributes().setVisible(true);
  yAxisOverlay.getMajorGrid().setTickStyle(TickStyle.RIGHT_LITERAL);
  yAxisOverlay.getOrigin().setType(IntersectionType.MAX_LITERAL);
  yAxisOverlay.getScale().setMax(NumberDataElementImpl.create(180000000));
  yAxisOverlay.getScale().setMin(NumberDataElementImpl.create(20000000));
  xAxisPrimary.getAssociatedAxes().add(yAxisOverlay);
  DateTimeDataSet dsDateValues=DateTimeDataSetImpl.create(new Calendar[]{new CDateTime(2004,12,27),new CDateTime(2004,12,23),new CDateTime(2004,12,22),new CDateTime(2004,12,21),new CDateTime(2004,12,20),new CDateTime(2004,12,17),new CDateTime(2004,12,16),new CDateTime(2004,12,15)});
  StockDataSet dsStockValues=StockDataSetImpl.create(new StockEntry[]{new StockEntry(27.01,27.10,26.82,26.85),new StockEntry(26.87,27.15,26.83,27.01),new StockEntry(26.84,27.15,26.78,26.97),new StockEntry(27.00,27.17,26.94,27.07),new StockEntry(27.01,27.15,26.89,26.95),new StockEntry(27.00,27.32,26.80,26.96),new StockEntry(27.15,27.28,27.01,27.16),new StockEntry(27.22,27.40,27.07,27.11)});
  NumberDataSet dsStockVolume=NumberDataSetImpl.create(new double[]{55958500,65801900,63651900,94646096,85552800,126184400,88997504,106303904});
  Series seBase=SeriesImpl.create();
  seBase.setDataSet(dsDateValues);
  SeriesDefinition sdX=SeriesDefinitionImpl.create();
  sdX.getSeriesPalette().shift(-1);
  xAxisPrimary.getSeriesDefinitions().add(sdX);
  sdX.getSeries().add(seBase);
  BarSeries bs=(BarSeries)BarSeriesImpl.create();
  bs.setRiserOutline(null);
  bs.setDataSet(dsStockVolume);
  StockSeries ss=(StockSeries)StockSeriesImpl.create();
  ss.setSeriesIdentifier("String_Node_Str");
  ss.getLineAttributes().setColor(ColorDefinitionImpl.BLUE());
  ss.setDataSet(dsStockValues);
  SeriesDefinition sdY1=SeriesDefinitionImpl.create();
  sdY1.getSeriesPalette().update(ColorDefinitionImpl.CYAN());
  yAxisPrimary.getSeriesDefinitions().add(sdY1);
  sdY1.getSeries().add(ss);
  SeriesDefinition sdY2=SeriesDefinitionImpl.create();
  sdY2.getSeriesPalette().update(ColorDefinitionImpl.GREEN());
  yAxisOverlay.getSeriesDefinitions().add(sdY2);
  sdY2.getSeries().add(bs);
  return cwaStock;
}

Fixed version (ground truth):
/** 
 * Creates a stock chart instance
 * @return An instance of the simulated runtime chart model (containingfilled datasets)
 */
public final static Chart createStockChart(){
  ChartWithAxes cwaStock=ChartWithAxesImpl.create();
  cwaStock.getTitle().getLabel().getCaption().setValue("String_Node_Str");
  TitleBlock tb=cwaStock.getTitle();
  tb.setBackground(GradientImpl.create(ColorDefinitionImpl.create(0,128,0),ColorDefinitionImpl.create(128,0,0),0,false));
  tb.getLabel().getCaption().setColor(ColorDefinitionImpl.WHITE());
  cwaStock.getBlock().setBackground(GradientImpl.create(ColorDefinitionImpl.create(196,196,196),ColorDefinitionImpl.WHITE(),90,false));
  cwaStock.getPlot().getClientArea().getInsets().set(10,10,10,10);
  cwaStock.getLegend().setBackground(ColorDefinitionImpl.ORANGE());
  Axis xAxisPrimary=((ChartWithAxesImpl)cwaStock).getPrimaryBaseAxes()[0];
  xAxisPrimary.getTitle().getCaption().setValue("String_Node_Str");
  xAxisPrimary.getTitle().getCaption().setColor(ColorDefinitionImpl.RED());
  xAxisPrimary.getTitle().getCaption().setValue("String_Node_Str");
  xAxisPrimary.setTitlePosition(Position.ABOVE_LITERAL);
  xAxisPrimary.getLabel().getCaption().setColor(ColorDefinitionImpl.RED());
  xAxisPrimary.getLabel().getCaption().getFont().setRotation(65);
  xAxisPrimary.setLabelPosition(Position.ABOVE_LITERAL);
  xAxisPrimary.setType(AxisType.DATE_TIME_LITERAL);
  xAxisPrimary.getOrigin().setType(IntersectionType.MAX_LITERAL);
  xAxisPrimary.getMajorGrid().setTickStyle(TickStyle.ABOVE_LITERAL);
  xAxisPrimary.getMajorGrid().getLineAttributes().setColor(ColorDefinitionImpl.create(255,196,196));
  xAxisPrimary.getMajorGrid().getLineAttributes().setStyle(LineStyle.DOTTED_LITERAL);
  xAxisPrimary.getMajorGrid().getLineAttributes().setVisible(true);
  xAxisPrimary.setCategoryAxis(true);
  Axis yAxisPrimary=((ChartWithAxesImpl)cwaStock).getPrimaryOrthogonalAxis(xAxisPrimary);
  yAxisPrimary.getLabel().getCaption().setValue("String_Node_Str");
  yAxisPrimary.getLabel().getCaption().setColor(ColorDefinitionImpl.BLUE());
  yAxisPrimary.setLabelPosition(Position.LEFT_LITERAL);
  yAxisPrimary.getTitle().getCaption().setValue("String_Node_Str");
  yAxisPrimary.getTitle().getCaption().setColor(ColorDefinitionImpl.BLUE());
  yAxisPrimary.setTitlePosition(Position.LEFT_LITERAL);
  yAxisPrimary.getScale().setMin(NumberDataElementImpl.create(24.5));
  yAxisPrimary.getScale().setMax(NumberDataElementImpl.create(27.5));
  yAxisPrimary.getScale().setStep(0.5);
  yAxisPrimary.getMajorGrid().getLineAttributes().setColor(ColorDefinitionImpl.create(196,196,255));
  yAxisPrimary.getMajorGrid().getLineAttributes().setStyle(LineStyle.DOTTED_LITERAL);
  yAxisPrimary.getMajorGrid().getLineAttributes().setVisible(true);
  yAxisPrimary.getMajorGrid().setTickStyle(TickStyle.LEFT_LITERAL);
  yAxisPrimary.setType(AxisType.LINEAR_LITERAL);
  yAxisPrimary.getOrigin().setType(IntersectionType.MIN_LITERAL);
  Axis yAxisOverlay=AxisImpl.create(Axis.ORTHOGONAL);
  yAxisOverlay.getLabel().getCaption().setColor(ColorDefinitionImpl.create(0,128,0));
  yAxisOverlay.getLabel().getCaption().getFont().setRotation(-25);
  yAxisOverlay.setLabelPosition(Position.RIGHT_LITERAL);
  yAxisOverlay.getTitle().getCaption().setValue("String_Node_Str");
  yAxisOverlay.getTitle().getCaption().setColor(ColorDefinitionImpl.GREEN().darker());
  yAxisOverlay.getTitle().getCaption().getFont().setRotation(90);
  yAxisOverlay.getTitle().getCaption().getFont().setSize(16);
  yAxisOverlay.getTitle().getCaption().getFont().setBold(true);
  yAxisOverlay.getTitle().setVisible(true);
  yAxisOverlay.setTitlePosition(Position.RIGHT_LITERAL);
  yAxisOverlay.getLineAttributes().setColor(ColorDefinitionImpl.create(0,128,0));
  yAxisOverlay.setType(AxisType.LINEAR_LITERAL);
  yAxisOverlay.setOrientation(Orientation.VERTICAL_LITERAL);
  yAxisOverlay.getMajorGrid().getLineAttributes().setColor(ColorDefinitionImpl.create(64,196,64));
  yAxisOverlay.getMajorGrid().getLineAttributes().setStyle(LineStyle.DOTTED_LITERAL);
  yAxisOverlay.getMajorGrid().getLineAttributes().setVisible(true);
  yAxisOverlay.getMajorGrid().setTickStyle(TickStyle.RIGHT_LITERAL);
  yAxisOverlay.getOrigin().setType(IntersectionType.MAX_LITERAL);
  yAxisOverlay.getScale().setMax(NumberDataElementImpl.create(180000000));
  yAxisOverlay.getScale().setMin(NumberDataElementImpl.create(20000000));
  xAxisPrimary.getAssociatedAxes().add(yAxisOverlay);
  DateTimeDataSet dsDateValues=DateTimeDataSetImpl.create(new Calendar[]{new CDateTime(2004,12,27),new CDateTime(2004,12,23),new CDateTime(2004,12,22),new CDateTime(2004,12,21),new CDateTime(2004,12,20),new CDateTime(2004,12,17),new CDateTime(2004,12,16),new CDateTime(2004,12,15)});
  StockDataSet dsStockValues=StockDataSetImpl.create(new StockEntry[]{new StockEntry(27.01,26.82,27.10,26.85),new StockEntry(26.87,26.83,27.15,27.01),new StockEntry(26.84,26.78,27.15,26.97),new StockEntry(27.00,26.94,27.17,27.07),new StockEntry(27.01,26.89,27.15,26.95),new StockEntry(27.00,26.80,27.32,26.96),new StockEntry(27.15,27.01,27.28,27.16),new StockEntry(27.22,27.07,27.40,27.11)});
  NumberDataSet dsStockVolume=NumberDataSetImpl.create(new double[]{55958500,65801900,63651900,94646096,85552800,126184400,88997504,106303904});
  Series seBase=SeriesImpl.create();
  seBase.setDataSet(dsDateValues);
  SeriesDefinition sdX=SeriesDefinitionImpl.create();
  sdX.getSeriesPalette().shift(-1);
  xAxisPrimary.getSeriesDefinitions().add(sdX);
  sdX.getSeries().add(seBase);
  BarSeries bs=(BarSeries)BarSeriesImpl.create();
  bs.setRiserOutline(null);
  bs.setDataSet(dsStockVolume);
  StockSeries ss=(StockSeries)StockSeriesImpl.create();
  ss.setSeriesIdentifier("String_Node_Str");
  ss.getLineAttributes().setColor(ColorDefinitionImpl.BLUE());
  ss.setDataSet(dsStockValues);
  SeriesDefinition sdY1=SeriesDefinitionImpl.create();
  sdY1.getSeriesPalette().update(ColorDefinitionImpl.CYAN());
  yAxisPrimary.getSeriesDefinitions().add(sdY1);
  sdY1.getSeries().add(ss);
  SeriesDefinition sdY2=SeriesDefinitionImpl.create();
  sdY2.getSeriesPalette().update(ColorDefinitionImpl.GREEN());
  yAxisOverlay.getSeriesDefinitions().add(sdY2);
  sdY2.getSeries().add(bs);
  return cwaStock;
}