Program: 48030
Project: 48030
Buggy source:
/** 
 * Creates a graph for JaCoCo Coverage results.
 * @param summaries HashMap(key = run date and value = Instrumentation tests results)
 * @param widthParam the chart width
 * @param heightParam the chart height
 * @return Graph (JFreeChart)
 */
private static Graph createTrendChart(final Map<LocalDate,JacocoCoverageResultSummary> summaries,int widthParam,int heightParam){
  return new Graph(-1,widthParam,heightParam){
    @Override protected JFreeChart createGraph(){
      if (summaries == null) {
        JFreeChart chart=ChartFactory.createStackedAreaChart(null,Constants.AXIS_LABEL,Constants.AXIS_LABEL_VALUE,null,PlotOrientation.VERTICAL,true,false,false);
        return chart;
      }
      int lineNumber=0;
      JFreeChart chart=ChartFactory.createLineChart("String_Node_Str",Constants.AXIS_LABEL,Constants.AXIS_LABEL_VALUE,buildDataSet(summaries),PlotOrientation.VERTICAL,true,false,false);
      chart.setBackgroundPaint(Color.white);
      CategoryPlot plot=chart.getCategoryPlot();
      CategoryItemRenderer renderer=plot.getRenderer();
      BasicStroke stroke=new BasicStroke(Constants.LINE_THICKNESS,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND);
      renderer.setSeriesStroke(lineNumber++,stroke);
      renderer.setSeriesStroke(lineNumber++,stroke);
      renderer.setSeriesStroke(lineNumber++,stroke);
      renderer.setSeriesStroke(lineNumber,stroke);
      plot.setBackgroundPaint(Color.WHITE);
      plot.setOutlinePaint(null);
      plot.setForegroundAlpha(Constants.FOREGROUND_ALPHA);
      plot.setRangeGridlinesVisible(true);
      plot.setRangeGridlinePaint(Color.black);
      CategoryAxis domainAxis=new ShiftedCategoryAxis(null);
      plot.setDomainAxis(domainAxis);
      domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
      domainAxis.setLowerMargin(Constants.DEFAULT_MARGIN);
      domainAxis.setUpperMargin(Constants.DEFAULT_MARGIN);
      domainAxis.setCategoryMargin(Constants.DEFAULT_MARGIN);
      NumberAxis rangeAxis=(NumberAxis)plot.getRangeAxis();
      rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
      rangeAxis.setUpperBound(Constants.UPPER_BOUND);
      rangeAxis.setLowerBound(Constants.LOWER_BOUND);
      return chart;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a graph for JaCoCo Coverage results.
 * @param summaries HashMap(key = run date and value = Instrumentation tests results)
 * @param widthParam the chart width
 * @param heightParam the chart height
 * @return Graph (JFreeChart)
 */
private static Graph createTrendChart(final Map<LocalDate,JacocoCoverageResultSummary> summaries,int widthParam,int heightParam){
  return new Graph(-1,widthParam,heightParam){
    @Override protected JFreeChart createGraph(){
      if (summaries == null) {
        JFreeChart chart=ChartFactory.createStackedAreaChart(null,Constants.AXIS_LABEL,Constants.AXIS_LABEL_VALUE,null,PlotOrientation.VERTICAL,true,false,false);
        return chart;
      }
      int lineNumber=0;
      JFreeChart chart=ChartFactory.createLineChart("String_Node_Str",Constants.AXIS_LABEL,Constants.AXIS_LABEL_VALUE,buildDataSet(summaries),PlotOrientation.VERTICAL,true,false,false);
      chart.setBackgroundPaint(Color.white);
      CategoryPlot plot=chart.getCategoryPlot();
      CategoryItemRenderer renderer=plot.getRenderer();
      BasicStroke stroke=new BasicStroke(Constants.LINE_THICKNESS,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND);
      renderer.setSeriesStroke(lineNumber++,stroke);
      renderer.setSeriesStroke(lineNumber++,stroke);
      renderer.setSeriesStroke(lineNumber++,stroke);
      renderer.setSeriesStroke(lineNumber,stroke);
      plot.setBackgroundPaint(Color.WHITE);
      plot.setOutlinePaint(null);
      plot.setForegroundAlpha(Constants.FOREGROUND_ALPHA);
      plot.setRangeGridlinesVisible(true);
      plot.setRangeGridlinePaint(Color.black);
      CategoryAxis domainAxis=new ShiftedCategoryAxis(null);
      plot.setDomainAxis(domainAxis);
      domainAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
      domainAxis.setLowerMargin(Constants.DEFAULT_MARGIN);
      domainAxis.setUpperMargin(Constants.DEFAULT_MARGIN);
      domainAxis.setCategoryMargin(Constants.DEFAULT_MARGIN);
      NumberAxis rangeAxis=(NumberAxis)plot.getRangeAxis();
      rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
      rangeAxis.setLowerBound(Constants.LOWER_BOUND);
      return chart;
    }
  }
;
}