Program: 108220
Project: 108220
Buggy source:
@Override protected void doUpdate(final AnalysisContextRisk context){
  if (!this.isEnabled()) {
    if (manager != null) {
      manager.stop();
    }
    this.setStatusEmpty();
    return;
  }
  Analysis analysis=new Analysis(){
    RiskEstimateBuilderInterruptible builder=getBuilder(context);
    private boolean stopped=false;
    private double[] frequencies;
    private String[] labels;
    @Override public int getProgress(){
      return 0;
    }
    @Override public void onError(){
      setStatusEmpty();
    }
    @Override public void onFinish(){
      if (stopped || !isEnabled()) {
        return;
      }
      chart.setRedraw(false);
      ISeriesSet seriesSet=chart.getSeriesSet();
      IBarSeries series=(IBarSeries)seriesSet.createSeries(SeriesType.BAR,Resources.getMessage("String_Node_Str"));
      series.getLabel().setVisible(false);
      series.getLabel().setFont(chart.getFont());
      series.setBarColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
      series.setYSeries(frequencies);
      chart.getLegend().setVisible(false);
      IAxisSet axisSet=chart.getAxisSet();
      IAxis yAxis=axisSet.getYAxis(0);
      yAxis.setRange(new Range(0d,1d));
      yAxis.adjustRange();
      IAxis xAxis=axisSet.getXAxis(0);
      xAxis.setCategorySeries(labels);
      xAxis.adjustRange();
      updateCategories();
      chart.updateLayout();
      chart.update();
      chart.setRedraw(true);
      setStatusDone();
    }
    @Override public void onInterrupt(){
      if (!isEnabled()) {
        setStatusEmpty();
      }
 else {
        setStatusWorking();
      }
    }
    @Override public void run() throws InterruptedException {
      long time=System.currentTimeMillis();
      RiskModelEquivalenceClasses model=builder.getEquivalenceClassModel();
      int[] distribution=model.getEquivalenceClasses();
      frequencies=new double[distribution.length / 2];
      labels=new String[distribution.length / 2];
      for (int i=0; i < distribution.length; i+=2) {
        frequencies[i / 2]=(double)distribution[i + 1] / model.getNumClasses() * 100d;
        labels[i / 2]=String.valueOf(distribution[i]);
      }
      while (System.currentTimeMillis() - time < MINIMAL_WORKING_TIME && !stopped) {
        Thread.sleep(10);
      }
    }
    @Override public void stop(){
      builder.interrupt();
      this.stopped=true;
    }
  }
;
  this.manager.start(analysis);
}

Fixed version (ground truth):
@Override protected void doUpdate(final AnalysisContextRisk context){
  if (!this.isEnabled()) {
    if (manager != null) {
      manager.stop();
    }
    this.setStatusEmpty();
    return;
  }
  Analysis analysis=new Analysis(){
    RiskEstimateBuilderInterruptible builder=getBuilder(context);
    private boolean stopped=false;
    private double[] frequencies;
    private String[] labels;
    @Override public int getProgress(){
      return 0;
    }
    @Override public void onError(){
      setStatusEmpty();
    }
    @Override public void onFinish(){
      if (stopped || !isEnabled()) {
        return;
      }
      chart.setRedraw(false);
      ISeriesSet seriesSet=chart.getSeriesSet();
      IBarSeries series=(IBarSeries)seriesSet.createSeries(SeriesType.BAR,Resources.getMessage("String_Node_Str"));
      series.getLabel().setVisible(false);
      series.getLabel().setFont(chart.getFont());
      series.setBarColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
      series.setYSeries(frequencies);
      chart.getLegend().setVisible(false);
      IAxisSet axisSet=chart.getAxisSet();
      IAxis yAxis=axisSet.getYAxis(0);
      yAxis.setRange(new Range(0d,1d));
      yAxis.adjustRange();
      IAxis xAxis=axisSet.getXAxis(0);
      xAxis.setCategorySeries(labels);
      xAxis.adjustRange();
      updateCategories();
      chart.updateLayout();
      chart.update();
      chart.setRedraw(true);
      setStatusDone();
    }
    @Override public void onInterrupt(){
      if (!isEnabled() || !isValid()) {
        setStatusEmpty();
      }
 else {
        setStatusWorking();
      }
    }
    @Override public void run() throws InterruptedException {
      long time=System.currentTimeMillis();
      RiskModelEquivalenceClasses model=builder.getEquivalenceClassModel();
      int[] distribution=model.getEquivalenceClasses();
      frequencies=new double[distribution.length / 2];
      labels=new String[distribution.length / 2];
      for (int i=0; i < distribution.length; i+=2) {
        frequencies[i / 2]=(double)distribution[i + 1] / model.getNumClasses() * 100d;
        labels[i / 2]=String.valueOf(distribution[i]);
      }
      while (System.currentTimeMillis() - time < MINIMAL_WORKING_TIME && !stopped) {
        Thread.sleep(10);
      }
    }
    @Override public void stop(){
      builder.interrupt();
      this.stopped=true;
    }
  }
;
  this.manager.start(analysis);
}