Program: 108222
Project: 108222
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 int[] distribution;
    private double numClasses;
    @Override public int getProgress(){
      return 0;
    }
    @Override public void onError(){
      setStatusEmpty();
    }
    @Override public void onFinish(){
      if (stopped || !isEnabled()) {
        return;
      }
      for (      final TableItem i : items) {
        i.dispose();
      }
      items.clear();
      for (int i=0; i < distribution.length; i+=2) {
        TableItem item=new TableItem(table,SWT.NONE);
        item.setText(0,String.valueOf(distribution[i]));
        item.setText(1,String.valueOf(distribution[i + 1]));
        item.setText(2,format.format((double)distribution[i + 1] / numClasses * 100d));
        items.add(item);
      }
      root.layout();
      setStatusDone();
    }
    @Override public void onInterrupt(){
      if (!isEnabled()) {
        setStatusEmpty();
      }
 else {
        setStatusWorking();
      }
    }
    @Override public void run() throws InterruptedException {
      long time=System.currentTimeMillis();
      RiskModelEquivalenceClasses model=builder.getEquivalenceClassModel();
      distribution=model.getEquivalenceClasses();
      numClasses=model.getNumClasses();
      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 int[] distribution;
    private double numClasses;
    @Override public int getProgress(){
      return 0;
    }
    @Override public void onError(){
      setStatusEmpty();
    }
    @Override public void onFinish(){
      if (stopped || !isEnabled()) {
        return;
      }
      for (      final TableItem i : items) {
        i.dispose();
      }
      items.clear();
      for (int i=0; i < distribution.length; i+=2) {
        TableItem item=new TableItem(table,SWT.NONE);
        item.setText(0,String.valueOf(distribution[i]));
        item.setText(1,String.valueOf(distribution[i + 1]));
        item.setText(2,format.format((double)distribution[i + 1] / numClasses * 100d));
        items.add(item);
      }
      root.layout();
      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();
      distribution=model.getEquivalenceClasses();
      numClasses=model.getNumClasses();
      while (System.currentTimeMillis() - time < MINIMAL_WORKING_TIME && !stopped) {
        Thread.sleep(10);
      }
    }
    @Override public void stop(){
      builder.interrupt();
      this.stopped=true;
    }
  }
;
  this.manager.start(analysis);
}