Program: 107866
Project: 107866
Buggy source:
/** 
 * Updates the chart with a new matrix
 * @param matrix
 */
private void setChartSeries(PrecisionRecallMatrix matrix){
  String[] xAxisLabels=new String[matrix.getConfidenceThresholds().length];
  double[] ySeriesPrecision=new double[matrix.getConfidenceThresholds().length];
  double[] ySeriesRecall=new double[matrix.getConfidenceThresholds().length];
  double[] ySeriesFscore=new double[matrix.getConfidenceThresholds().length];
  for (int i=0; i < xAxisLabels.length; i++) {
    xAxisLabels[i]=SWTUtil.getPrettyString(matrix.getConfidenceThresholds()[i] * 100d);
    ySeriesPrecision[i]=matrix.getPrecision()[i] * 100d;
    ySeriesRecall[i]=matrix.getRecall()[i] * 100d;
    ySeriesFscore[i]=matrix.getFscore()[i] * 100d;
  }
  chart.setRedraw(false);
  ISeriesSet seriesSet=chart.getSeriesSet();
  ILineSeries series1=(ILineSeries)seriesSet.createSeries(SeriesType.LINE,Resources.getMessage("String_Node_Str"));
  series1.getLabel().setVisible(false);
  series1.getLabel().setFont(chart.getFont());
  series1.setLineColor(Display.getDefault().getSystemColor(SWT.COLOR_RED));
  series1.setYSeries(ySeriesPrecision);
  series1.setAntialias(SWT.ON);
  series1.setSymbolType(PlotSymbolType.NONE);
  series1.enableArea(true);
  ILineSeries series2=(ILineSeries)seriesSet.createSeries(SeriesType.LINE,Resources.getMessage("String_Node_Str"));
  series2.getLabel().setVisible(false);
  series2.getLabel().setFont(chart.getFont());
  series2.setLineColor(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
  series2.setYSeries(ySeriesRecall);
  series2.setSymbolType(PlotSymbolType.NONE);
  series2.enableArea(true);
  ILineSeries series3=(ILineSeries)seriesSet.createSeries(SeriesType.LINE,Resources.getMessage("String_Node_Str"));
  series3.getLabel().setVisible(false);
  series3.getLabel().setFont(chart.getFont());
  series3.setLineColor(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GREEN));
  series3.setYSeries(ySeriesFscore);
  series3.setSymbolType(PlotSymbolType.NONE);
  series3.enableArea(true);
  seriesSet.bringToFront(Resources.getMessage("String_Node_Str"));
  chart.getLegend().setVisible(true);
  chart.getLegend().setPosition(SWT.TOP);
  IAxisSet axisSet=chart.getAxisSet();
  IAxis yAxis=axisSet.getYAxis(0);
  yAxis.setRange(new Range(0d,100d));
  IAxis xAxis=axisSet.getXAxis(0);
  xAxis.setCategorySeries(xAxisLabels);
  xAxis.adjustRange();
  updateCategories();
  chart.setRedraw(true);
  chart.updateLayout();
  chart.update();
  chart.redraw();
}

Fixed version (ground truth):
/** 
 * Updates the chart with a new matrix
 * @param matrix
 */
private void setChartSeries(PrecisionRecallMatrix matrix){
  String[] xAxisLabels=new String[matrix.getConfidenceThresholds().length];
  double[] ySeriesPrecision=new double[matrix.getConfidenceThresholds().length];
  double[] ySeriesRecall=new double[matrix.getConfidenceThresholds().length];
  double[] ySeriesFscore=new double[matrix.getConfidenceThresholds().length];
  for (int i=0; i < xAxisLabels.length; i++) {
    xAxisLabels[i]=SWTUtil.getPrettyString(matrix.getConfidenceThresholds()[i] * 100d);
    ySeriesPrecision[i]=matrix.getPrecision()[i] * 100d;
    ySeriesRecall[i]=matrix.getRecall()[i] * 100d;
    ySeriesFscore[i]=matrix.getFscore()[i] * 100d;
  }
  chart.setRedraw(false);
  ISeriesSet seriesSet=chart.getSeriesSet();
  ILineSeries series1=(ILineSeries)seriesSet.createSeries(SeriesType.LINE,precision);
  series1.getLabel().setVisible(false);
  series1.getLabel().setFont(chart.getFont());
  series1.setLineColor(Display.getDefault().getSystemColor(SWT.COLOR_RED));
  series1.setYSeries(ySeriesPrecision);
  series1.setAntialias(SWT.ON);
  series1.setSymbolType(PlotSymbolType.NONE);
  series1.enableArea(true);
  ILineSeries series2=(ILineSeries)seriesSet.createSeries(SeriesType.LINE,recall);
  series2.getLabel().setVisible(false);
  series2.getLabel().setFont(chart.getFont());
  series2.setLineColor(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
  series2.setYSeries(ySeriesRecall);
  series2.setSymbolType(PlotSymbolType.NONE);
  series2.enableArea(true);
  ILineSeries series3=(ILineSeries)seriesSet.createSeries(SeriesType.LINE,fscore);
  series3.getLabel().setVisible(false);
  series3.getLabel().setFont(chart.getFont());
  series3.setLineColor(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GREEN));
  series3.setYSeries(ySeriesFscore);
  series3.setSymbolType(PlotSymbolType.NONE);
  series3.enableArea(true);
  seriesSet.bringToFront(recall);
  chart.getLegend().setVisible(true);
  chart.getLegend().setPosition(SWT.TOP);
  IAxisSet axisSet=chart.getAxisSet();
  IAxis yAxis=axisSet.getYAxis(0);
  yAxis.setRange(new Range(0d,100d));
  IAxis xAxis=axisSet.getXAxis(0);
  xAxis.setCategorySeries(xAxisLabels);
  xAxis.adjustRange();
  updateCategories();
  chart.setRedraw(true);
  chart.updateLayout();
  chart.update();
  chart.redraw();
}