Program: 108000
Project: 108000
Buggy source:
/** 
 * Creates an ARXConfiguration.
 */
public void createConfig(){
  ModelConfiguration config=getInputConfig();
  DataDefinition definition=getInputDefinition();
  config.removeAllCriteria();
  if (definition == null)   return;
  config.setMetric(this.getMetricDescription().createInstance(this.getMetricConfiguration()));
  for (  String attr : definition.getQuasiIdentifyingAttributes()) {
    definition.resetAttributeType(attr);
    definition.resetHierarchy(attr);
    definition.resetHierarchyBuilder(attr);
    definition.resetMaximumGeneralization(attr);
    definition.resetMicroAggregationFunction(attr);
    definition.resetMinimumGeneralization(attr);
    if (this.getUseFunctionalHierarchies() && config.getHierarchyBuilder(attr) != null) {
      definition.setHierarchy(attr,config.getHierarchyBuilder(attr));
    }
 else {
      definition.setHierarchy(attr,(HierarchyBuilder<?>)null);
    }
    Hierarchy hierarchy=config.getHierarchy(attr);
    if (hierarchy != null && hierarchy.getHierarchy() != null) {
      definition.setHierarchy(attr,hierarchy);
    }
    definition.setAttributeType(attr,AttributeType.QUASI_IDENTIFYING_ATTRIBUTE);
    if (config.getTransformationMode(attr) == ModelTransformationMode.MICRO_AGGREGATION) {
      MicroAggregationFunction function=config.getMicroAggregationFunction(attr).createInstance(config.getMicroAggregationIgnoreMissingData(attr));
      definition.setMicroAggregationFunction(attr,function);
    }
 else {
      definition.setMicroAggregationFunction(attr,null);
      Integer min=config.getMinimumGeneralization(attr);
      Integer max=config.getMaximumGeneralization(attr);
      if (min != null) {
        definition.setMinimumGeneralization(attr,min);
      }
      if (max != null) {
        definition.setMaximumGeneralization(attr,max);
      }
    }
  }
  if (this.differentialPrivacyModel != null && this.differentialPrivacyModel.isEnabled()) {
    config.addCriterion(this.differentialPrivacyModel.getCriterion(this));
  }
  if (this.kAnonymityModel != null && this.kAnonymityModel.isEnabled()) {
    config.addCriterion(this.kAnonymityModel.getCriterion(this));
  }
  if (this.kMapModel != null && this.kMapModel.isEnabled()) {
    config.addCriterion(this.kMapModel.getCriterion(this));
  }
  if (this.dPresenceModel != null && this.dPresenceModel.isEnabled()) {
    config.addCriterion(this.dPresenceModel.getCriterion(this));
  }
  for (  Entry<String,ModelLDiversityCriterion> entry : this.lDiversityModel.entrySet()) {
    if (entry.getValue() != null && entry.getValue().isEnabled()) {
      config.addCriterion(entry.getValue().getCriterion(this));
    }
  }
  for (  Entry<String,ModelTClosenessCriterion> entry : this.tClosenessModel.entrySet()) {
    if (entry.getValue() != null && entry.getValue().isEnabled()) {
      if (entry.getValue().getVariant() == 1) {
        if (config.getHierarchy(entry.getValue().getAttribute()) == null) {
          config.setHierarchy(entry.getValue().getAttribute(),Hierarchy.create());
        }
      }
      PrivacyCriterion criterion=entry.getValue().getCriterion(this);
      config.addCriterion(criterion);
    }
  }
  for (  Entry<String,ModelDDisclosurePrivacyCriterion> entry : this.dDisclosurePrivacyModel.entrySet()) {
    if (entry.getValue() != null && entry.getValue().isEnabled()) {
      config.addCriterion(entry.getValue().getCriterion(this));
    }
  }
  for (  ModelRiskBasedCriterion entry : this.riskBasedModel) {
    if (entry != null && entry.isEnabled()) {
      PrivacyCriterion criterion=entry.getCriterion(this);
      config.addCriterion(criterion);
    }
  }
  if (!config.containsCriterion(DPresence.class) || !config.containsCriterion(KMap.class)) {
    if (config.getInput() != null && config.getResearchSubset() != null && config.getResearchSubset().size() != config.getInput().getHandle().getNumRows()) {
      DataSubset subset=DataSubset.create(config.getInput(),config.getResearchSubset());
      config.addCriterion(new Inclusion(subset));
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates an ARXConfiguration.
 */
public void createConfig(){
  ModelConfiguration config=getInputConfig();
  DataDefinition definition=getInputDefinition();
  config.removeAllCriteria();
  if (definition == null)   return;
  config.setMetric(this.getMetricDescription().createInstance(this.getMetricConfiguration()));
  for (  String attr : definition.getQuasiIdentifyingAttributes()) {
    definition.resetAttributeType(attr);
    definition.resetHierarchy(attr);
    definition.resetHierarchyBuilder(attr);
    definition.resetMaximumGeneralization(attr);
    definition.resetMicroAggregationFunction(attr);
    definition.resetMinimumGeneralization(attr);
    if (this.getUseFunctionalHierarchies() && config.getHierarchyBuilder(attr) != null) {
      definition.setHierarchy(attr,config.getHierarchyBuilder(attr));
    }
 else {
      definition.setHierarchy(attr,(HierarchyBuilder<?>)null);
    }
    Hierarchy hierarchy=config.getHierarchy(attr);
    if (hierarchy != null && hierarchy.getHierarchy() != null) {
      definition.setHierarchy(attr,hierarchy);
    }
    definition.setAttributeType(attr,AttributeType.QUASI_IDENTIFYING_ATTRIBUTE);
    if (config.getTransformationMode(attr) == ModelTransformationMode.MICRO_AGGREGATION) {
      MicroAggregationFunction function=config.getMicroAggregationFunction(attr).createInstance(config.getMicroAggregationIgnoreMissingData(attr));
      definition.setMicroAggregationFunction(attr,function);
    }
 else {
      definition.setMicroAggregationFunction(attr,null);
      Integer min=config.getMinimumGeneralization(attr);
      Integer max=config.getMaximumGeneralization(attr);
      if (min != null) {
        definition.setMinimumGeneralization(attr,min);
      }
      if (max != null) {
        definition.setMaximumGeneralization(attr,max);
      }
    }
  }
  if (this.differentialPrivacyModel != null && this.differentialPrivacyModel.isEnabled()) {
    config.addCriterion(this.differentialPrivacyModel.getCriterion(this));
  }
  if (this.kAnonymityModel != null && this.kAnonymityModel.isEnabled()) {
    config.addCriterion(this.kAnonymityModel.getCriterion(this));
  }
  if (this.kMapModel != null && this.kMapModel.isEnabled()) {
    config.addCriterion(this.kMapModel.getCriterion(this));
  }
  if (this.dPresenceModel != null && this.dPresenceModel.isEnabled()) {
    config.addCriterion(this.dPresenceModel.getCriterion(this));
  }
  for (  Entry<String,ModelLDiversityCriterion> entry : this.lDiversityModel.entrySet()) {
    if (entry.getValue() != null && entry.getValue().isEnabled()) {
      config.addCriterion(entry.getValue().getCriterion(this));
    }
  }
  for (  Entry<String,ModelTClosenessCriterion> entry : this.tClosenessModel.entrySet()) {
    if (entry.getValue() != null && entry.getValue().isEnabled()) {
      if (entry.getValue().getVariant() == 1) {
        if (config.getHierarchy(entry.getValue().getAttribute()) == null) {
          config.setHierarchy(entry.getValue().getAttribute(),Hierarchy.create());
        }
      }
      PrivacyCriterion criterion=entry.getValue().getCriterion(this);
      config.addCriterion(criterion);
    }
  }
  for (  Entry<String,ModelDDisclosurePrivacyCriterion> entry : this.dDisclosurePrivacyModel.entrySet()) {
    if (entry.getValue() != null && entry.getValue().isEnabled()) {
      config.addCriterion(entry.getValue().getCriterion(this));
    }
  }
  for (  ModelRiskBasedCriterion entry : this.riskBasedModel) {
    if (entry != null && entry.isEnabled()) {
      PrivacyCriterion criterion=entry.getCriterion(this);
      config.addCriterion(criterion);
    }
  }
  if (!config.containsCriterion(DPresence.class) || !config.containsCriterion(KMap.class) || (config.containsCriterion(KMap.class) && !config.getCriterion(KMap.class).isAccurate())) {
    if (config.getInput() != null && config.getResearchSubset() != null && config.getResearchSubset().size() != config.getInput().getHandle().getNumRows()) {
      DataSubset subset=DataSubset.create(config.getInput(),config.getResearchSubset());
      config.addCriterion(new Inclusion(subset));
    }
  }
}