Program: 108013
Project: 108013
Buggy source:
@Override protected void doUpdate(final AnalysisContextClassification context){
  final StatisticsBuilderInterruptible builder=context.handle.getStatistics().getInterruptibleInstance();
  final StatisticsBuilderInterruptible sourcebuilder=context.model.getInputConfig().getInput().getHandle().getStatistics().getInterruptibleInstance();
  final String[] features=context.model.getSelectedFeatures().toArray(new String[0]);
  final String[] classes=context.model.getSelectedClasses().toArray(new String[0]);
  final double fraction=context.handle.getNumRows() > context.model.getClassificationModel().getMaximalNumberOfRecords() ? (double)context.model.getClassificationModel().getMaximalNumberOfRecords() / (double)context.handle.getNumRows() : 1d;
  final Integer seed=context.model.getClassificationModel().getSeed();
  final boolean ignoreSuppressedRecords=context.model.getClassificationModel().isIgnoreSuppressedRecords();
  Analysis analysis=new Analysis(){
    private boolean stopped=false;
    private List<Double> accuracies=new ArrayList<>();
    private List<Double> baselineAccuracies=new ArrayList<>();
    private List<Integer> classNumbers=new ArrayList<>();
    private List<Integer> baselineClassNumbers=new ArrayList<>();
    private int progress=0;
    @Override public int getProgress(){
      return (int)((double)progress / (double)classes.length / 4d * 100d);
    }
    @Override public void onError(){
      setStatusEmpty();
    }
    @Override public void onFinish(){
      if (stopped || !isEnabled()) {
        return;
      }
      for (      final TableItem i : table.getItems()) {
        i.dispose();
      }
      for (int i=0; i < classes.length; i++) {
        TableItem item=new TableItem(table,SWT.NONE);
        item.setText(0,classes[i]);
        item.setText(1,String.valueOf(classNumbers.get(i)));
        item.setData("String_Node_Str",(double)classNumbers.get(i) / (double)baselineClassNumbers.get(i) - 1d);
        item.setData("String_Node_Str",accuracies.get(i));
        item.setData("String_Node_Str",(double)accuracies.get(i) / (double)baselineAccuracies.get(i) - 1d);
      }
      root.layout();
      setStatusDone();
    }
    @Override public void onInterrupt(){
      if (!isEnabled()) {
        setStatusEmpty();
      }
 else {
        setStatusWorking();
      }
    }
    @Override public void run() throws InterruptedException {
      long time=System.currentTimeMillis();
      for (      String clazz : classes) {
        accuracies.add(builder.getClassificationPerformance(features,clazz,seed,ignoreSuppressedRecords,fraction).getFractionCorrect());
        progress++;
        if (stopped) {
          break;
        }
        baselineAccuracies.add(sourcebuilder.getClassificationPerformance(features,clazz,seed,ignoreSuppressedRecords,fraction).getFractionCorrect());
        progress++;
        if (stopped) {
          break;
        }
        baselineClassNumbers.add(sourcebuilder.getDistinctValues(context.handle.getColumnIndexOf(clazz)).length);
        progress++;
        if (stopped) {
          break;
        }
        classNumbers.add(builder.getDistinctValues(context.handle.getColumnIndexOf(clazz)).length);
        progress++;
        if (stopped) {
          break;
        }
      }
      while (System.currentTimeMillis() - time < MINIMAL_WORKING_TIME && !stopped) {
        Thread.sleep(10);
      }
    }
    @Override public void stop(){
      builder.interrupt();
      sourcebuilder.interrupt();
      this.stopped=true;
    }
  }
;
  this.manager.start(analysis);
}

Fixed version (ground truth):
@Override protected void doUpdate(final AnalysisContextClassification context){
  final StatisticsBuilderInterruptible builder=context.handle.getStatistics().getInterruptibleInstance();
  final DataHandle sourceHandle;
  if (context.handle instanceof DataHandleSubset) {
    sourceHandle=context.model.getInputConfig().getInput().getHandle().getView();
  }
 else {
    sourceHandle=context.model.getInputConfig().getInput().getHandle();
  }
  final StatisticsBuilderInterruptible sourcebuilder=sourceHandle.getStatistics().getInterruptibleInstance();
  final String[] features=context.model.getSelectedFeatures().toArray(new String[0]);
  final String[] classes=context.model.getSelectedClasses().toArray(new String[0]);
  final double fraction=context.handle.getNumRows() > context.model.getClassificationModel().getMaximalNumberOfRecords() ? (double)context.model.getClassificationModel().getMaximalNumberOfRecords() / (double)context.handle.getNumRows() : 1d;
  final Integer seed=context.model.getClassificationModel().getSeed();
  final boolean ignoreSuppressedRecords=context.model.getClassificationModel().isIgnoreSuppressedRecords();
  Analysis analysis=new Analysis(){
    private boolean stopped=false;
    private List<Double> accuracies=new ArrayList<>();
    private List<Double> baselineAccuracies=new ArrayList<>();
    private List<Integer> classNumbers=new ArrayList<>();
    private List<Integer> baselineClassNumbers=new ArrayList<>();
    private int progress=0;
    @Override public int getProgress(){
      return (int)((double)progress / (double)classes.length / 4d * 100d);
    }
    @Override public void onError(){
      setStatusEmpty();
    }
    @Override public void onFinish(){
      if (stopped || !isEnabled()) {
        return;
      }
      for (      final TableItem i : table.getItems()) {
        i.dispose();
      }
      for (int i=0; i < classes.length; i++) {
        TableItem item=new TableItem(table,SWT.NONE);
        item.setText(0,classes[i]);
        item.setText(1,String.valueOf(classNumbers.get(i)));
        item.setData("String_Node_Str",(double)classNumbers.get(i) / (double)baselineClassNumbers.get(i) - 1d);
        item.setData("String_Node_Str",accuracies.get(i));
        item.setData("String_Node_Str",(double)accuracies.get(i) / (double)baselineAccuracies.get(i) - 1d);
      }
      root.layout();
      setStatusDone();
    }
    @Override public void onInterrupt(){
      if (!isEnabled()) {
        setStatusEmpty();
      }
 else {
        setStatusWorking();
      }
    }
    @Override public void run() throws InterruptedException {
      long time=System.currentTimeMillis();
      for (      String clazz : classes) {
        accuracies.add(builder.getClassificationPerformance(features,clazz,seed,ignoreSuppressedRecords,fraction).getFractionCorrect());
        progress++;
        if (stopped) {
          break;
        }
        baselineAccuracies.add(sourcebuilder.getClassificationPerformance(features,clazz,seed,ignoreSuppressedRecords,fraction).getFractionCorrect());
        progress++;
        if (stopped) {
          break;
        }
        baselineClassNumbers.add(sourcebuilder.getDistinctValues(context.handle.getColumnIndexOf(clazz)).length);
        progress++;
        if (stopped) {
          break;
        }
        classNumbers.add(builder.getDistinctValues(context.handle.getColumnIndexOf(clazz)).length);
        progress++;
        if (stopped) {
          break;
        }
      }
      while (System.currentTimeMillis() - time < MINIMAL_WORKING_TIME && !stopped) {
        Thread.sleep(10);
      }
    }
    @Override public void stop(){
      builder.interrupt();
      sourcebuilder.interrupt();
      this.stopped=true;
    }
  }
;
  this.manager.start(analysis);
}