Program: 108303
Project: 108303
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);
  MetricConfiguration config=model.getMetricConfiguration();
  MetricDescription description=model.getMetricDescription();
  if (config != null && description != null) {
    if (!description.isMonotonicVariantSupported()) {
      this.monotonicVariant.setSelection(false);
      this.monotonicVariant.setEnabled(false);
    }
 else {
      this.monotonicVariant.setEnabled(true);
      this.monotonicVariant.setSelection(config.isMonotonic());
    }
    if (model == null || model.getInputDefinition() == null || model.getInputConfig() == null || model.getInputDefinition().getQuasiIdentifyingAttributes().isEmpty() || !description.isAttributeWeightsSupported()) {
      hideSettingsAttributeWeights();
      hideSettingsCodingModel();
    }
 else {
      showSettingsAttributeWeights();
      if (description.isConfigurableCodingModelSupported()) {
        showSettingsCodingModel();
      }
 else {
        hideSettingsCodingModel();
      }
    }
    comboAggregate.removeAll();
    int index=0;
    int selected=-1;
    for (    AggregateFunction function : description.getSupportedAggregateFunctions()) {
      comboAggregate.add(function.toString());
      if (function.toString().equals(config.getAggregateFunction().toString())) {
        selected=index;
      }
      index++;
    }
    if (selected != -1) {
      comboAggregate.select(selected);
    }
    comboAggregate.setEnabled(!description.getSupportedAggregateFunctions().isEmpty());
  }
 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);
  MetricConfiguration config=model.getMetricConfiguration();
  MetricDescription description=model.getMetricDescription();
  if (config != null && description != null) {
    if (!description.isMonotonicVariantSupported()) {
      this.monotonicVariant.setSelection(false);
      this.monotonicVariant.setEnabled(false);
    }
 else {
      this.monotonicVariant.setEnabled(true);
      this.monotonicVariant.setSelection(config.isMonotonic());
    }
    if (model == null || model.getInputDefinition() == null || model.getInputConfig() == null || model.getInputDefinition().getQuasiIdentifyingAttributes().isEmpty() || !description.isAttributeWeightsSupported()) {
      hideSettingsAttributeWeights();
      hideSettingsCodingModel();
    }
 else {
      showSettingsAttributeWeights();
      if (description.isConfigurableCodingModelSupported()) {
        showSettingsCodingModel();
      }
 else {
        hideSettingsCodingModel();
      }
    }
    comboAggregate.removeAll();
    int index=0;
    int selected=-1;
    for (    AggregateFunction function : description.getSupportedAggregateFunctions()) {
      comboAggregate.add(function.toString());
      if (function.toString().equals(config.getAggregateFunction().toString())) {
        selected=index;
      }
      index++;
    }
    if (selected != -1) {
      comboAggregate.select(selected);
    }
    if (comboAggregate.getItemCount() == 0) {
      comboAggregate.add("String_Node_Str");
      comboAggregate.select(0);
    }
  }
 else {
    reset();
  }
  root.setRedraw(true);
}