Program: 108185
Project: 108185
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,context.context.getModel().getSelectedQuasiIdentifiers());
    private boolean stopped=false;
    private RiskModelAttributes risks;
    @Override public int getProgress(){
      return builder.getProgress();
    }
    @Override public void onError(){
      setStatusEmpty();
    }
    @Override public void onFinish(){
      if (stopped || !isEnabled()) {
        return;
      }
      for (      final TableItem i : items) {
        i.dispose();
      }
      items.clear();
      for (      QuasiIdentifierRisks item : risks.getAttributeRisks()) {
        createItem(item);
      }
      for (      final TableColumn col : columns) {
        col.pack();
      }
      if (risks.getAttributeRisks().length == 0) {
        setStatusEmpty();
      }
 else {
        setStatusDone();
      }
      table.layout();
      table.redraw();
    }
    @Override public void onInterrupt(){
      if (!isEnabled() || !isValid()) {
        setStatusEmpty();
      }
 else {
        setStatusWorking();
      }
    }
    @Override public void run() throws InterruptedException {
      long time=System.currentTimeMillis();
switch (getModel().getRiskModel().getRiskModelForAttributes()) {
case SAMPLE_UNIQUENESS:
        risks=builder.getPopulationBasedAttributeRisks();
      break;
case POPULATION_UNIQUENESS_PITMAN:
    risks=builder.getPopulationBasedAttributeRisks(StatisticalPopulationModel.PITMAN);
  break;
case POPULATION_UNIQUENESS_ZAYATZ:
risks=builder.getPopulationBasedAttributeRisks(StatisticalPopulationModel.ZAYATZ);
break;
case POPULATION_UNIQUENESS_SNB:
risks=builder.getPopulationBasedAttributeRisks(StatisticalPopulationModel.SNB);
break;
case POPULATION_UNIQUENESS_DANKAR:
risks=builder.getPopulationBasedAttributeRisks(StatisticalPopulationModel.DANKAR);
break;
default :
throw new RuntimeException("String_Node_Str");
}
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,context.context.getModel().getSelectedQuasiIdentifiers());
    private boolean stopped=false;
    private RiskModelAttributes risks;
    @Override public int getProgress(){
      return builder.getProgress();
    }
    @Override public void onError(){
      setStatusEmpty();
    }
    @Override public void onFinish(){
      if (stopped || !isEnabled()) {
        return;
      }
      for (      final TableItem i : items) {
        i.dispose();
      }
      items.clear();
      for (      QuasiIdentifierRisks item : risks.getAttributeRisks()) {
        createItem(item);
      }
      for (      final TableColumn col : columns) {
        col.pack();
      }
      if (risks.getAttributeRisks().length == 0) {
        setStatusEmpty();
      }
 else {
        setStatusDone();
      }
      table.layout();
      table.redraw();
    }
    @Override public void onInterrupt(){
      if (!isEnabled() || !isValid()) {
        setStatusEmpty();
      }
 else {
        setStatusWorking();
      }
    }
    @Override public void run() throws InterruptedException {
      long time=System.currentTimeMillis();
switch (getModel().getRiskModel().getRiskModelForAttributes()) {
case SAMPLE_UNIQUENESS:
        risks=builder.getSampleBasedAttributeRisks();
      break;
case POPULATION_UNIQUENESS_PITMAN:
    risks=builder.getPopulationBasedAttributeRisks(StatisticalPopulationModel.PITMAN);
  break;
case POPULATION_UNIQUENESS_ZAYATZ:
risks=builder.getPopulationBasedAttributeRisks(StatisticalPopulationModel.ZAYATZ);
break;
case POPULATION_UNIQUENESS_SNB:
risks=builder.getPopulationBasedAttributeRisks(StatisticalPopulationModel.SNB);
break;
case POPULATION_UNIQUENESS_DANKAR:
risks=builder.getPopulationBasedAttributeRisks(StatisticalPopulationModel.DANKAR);
break;
default :
throw new RuntimeException("String_Node_Str");
}
while (System.currentTimeMillis() - time < MINIMAL_WORKING_TIME && !stopped) {
Thread.sleep(10);
}
}
@Override public void stop(){
builder.interrupt();
this.stopped=true;
}
}
;
this.manager.start(analysis);
}