Program: 108342
Project: 108342
Buggy source:
/** 
 * This method adjusts the toolbar attached to the folder with criteria according to the current state of the model
 */
private void updateControlls(){
  root.setRedraw(false);
  if (model.getMetricConfiguration() != null && model.getMetricDescription() != null) {
    if (!model.getMetricDescription().isMonotonicVariantSupported()) {
      this.monotonicVariant.setSelection(false);
      this.monotonicVariant.setEnabled(false);
    }
 else {
      this.monotonicVariant.setEnabled(true);
      this.monotonicVariant.setSelection(model.getMetricConfiguration().isMonotonic());
    }
    if (!model.getMetricDescription().isPrecomputationSupported()) {
      this.precomputedVariant.setSelection(false);
      this.precomputedVariant.setEnabled(false);
      this.precomputationThreshold.setSelection(0);
      this.precomputationThreshold.setEnabled(false);
      this.labelThreshold.setText(String.valueOf(0d));
    }
 else {
      this.precomputedVariant.setEnabled(true);
      this.precomputedVariant.setSelection(model.getMetricConfiguration().isPrecomputed());
      if (model.getMetricConfiguration().isPrecomputed()) {
        this.precomputationThreshold.setSelection(SWTUtil.doubleToSlider(0d,1d,model.getMetricConfiguration().getGsFactor()));
        this.precomputationThreshold.setEnabled(true);
        this.labelThreshold.setText(String.valueOf(model.getMetricConfiguration().getGsFactor()));
      }
 else {
        this.precomputationThreshold.setSelection(0);
        this.precomputationThreshold.setEnabled(false);
        this.labelThreshold.setText(String.valueOf(0d));
      }
    }
    if (model == null || model.getInputDefinition() == null || model.getInputConfig() == null || model.getInputDefinition().getQuasiIdentifyingAttributes().isEmpty() || model.getMetricDescription() == null || !(model.getMetricDescription().isAttributeWeightsSupported())) {
      hideSettingsAttributeWeights();
      hideSettingsCodingModel();
    }
 else {
      showSettingsAttributeWeights();
      if (model.getMetricDescription().isConfigurableCodingModelSupported()) {
        showSettingsCodingModel();
      }
 else {
        hideSettingsCodingModel();
      }
    }
  }
 else {
    reset();
  }
  root.setRedraw(true);
}

Fixed version (ground truth):
/** 
 * This method adjusts the toolbar attached to the folder with criteria according to the current state of the model
 */
private void updateControlls(){
  root.setRedraw(false);
  if (model.getMetricConfiguration() != null && model.getMetricDescription() != null) {
    if (!model.getMetricDescription().isMonotonicVariantSupported()) {
      this.monotonicVariant.setSelection(false);
      this.monotonicVariant.setEnabled(false);
    }
 else {
      this.monotonicVariant.setEnabled(true);
      this.monotonicVariant.setSelection(model.getMetricConfiguration().isMonotonic());
    }
    if (!model.getMetricDescription().isPrecomputationSupported()) {
      this.precomputedVariant.setSelection(false);
      this.precomputedVariant.setEnabled(false);
      this.precomputationThreshold.setSelection(SWTUtil.doubleToSlider(0d,1d,0.5d));
      this.precomputationThreshold.setEnabled(false);
      this.labelThreshold.setText(String.valueOf(0.5d));
    }
 else {
      this.precomputedVariant.setEnabled(true);
      this.precomputedVariant.setSelection(model.getMetricConfiguration().isPrecomputed());
      if (model.getMetricConfiguration().isPrecomputed()) {
        this.precomputationThreshold.setSelection(SWTUtil.doubleToSlider(0d,1d,model.getMetricConfiguration().getPrecomputationThreshold()));
        this.precomputationThreshold.setEnabled(true);
        this.labelThreshold.setText(String.valueOf(model.getMetricConfiguration().getPrecomputationThreshold()));
      }
 else {
        this.precomputationThreshold.setSelection(SWTUtil.doubleToSlider(0d,1d,0.5d));
        this.precomputationThreshold.setEnabled(false);
        this.labelThreshold.setText(String.valueOf(0.5d));
      }
    }
    if (model == null || model.getInputDefinition() == null || model.getInputConfig() == null || model.getInputDefinition().getQuasiIdentifyingAttributes().isEmpty() || model.getMetricDescription() == null || !(model.getMetricDescription().isAttributeWeightsSupported())) {
      hideSettingsAttributeWeights();
      hideSettingsCodingModel();
    }
 else {
      showSettingsAttributeWeights();
      if (model.getMetricDescription().isConfigurableCodingModelSupported()) {
        showSettingsCodingModel();
      }
 else {
        hideSettingsCodingModel();
      }
    }
  }
 else {
    reset();
  }
  root.setRedraw(true);
}