Program: 107790
Project: 107790
Buggy source:
/** 
 * Performs some sanity checks.
 * @param config
 * @param manager the manager
 */
private void checkAfterEncoding(final ARXConfiguration config,final DataManager manager){
  if (config.isPrivacyModelSpecified(KAnonymity.class)) {
    KAnonymity c=config.getPrivacyModel(KAnonymity.class);
    if ((c.getK() > manager.getDataGeneralized().getDataLength()) || (c.getK() < 1)) {
      throw new IllegalArgumentException("String_Node_Str" + c.getK() + "String_Node_Str"+ manager.getDataGeneralized().getDataLength()+ "String_Node_Str");
    }
  }
  if (config.isPrivacyModelSpecified(LDiversity.class)) {
    for (    LDiversity c : config.getPrivacyModels(LDiversity.class)) {
      if ((c.getL() > manager.getDataGeneralized().getDataLength()) || (c.getL() < 1)) {
        throw new IllegalArgumentException("String_Node_Str" + c.getL() + "String_Node_Str"+ manager.getDataGeneralized().getDataLength()+ "String_Node_Str");
      }
    }
  }
  if (config.isPrivacyModelSpecified(DDisclosurePrivacy.class)) {
    for (    DDisclosurePrivacy c : config.getPrivacyModels(DDisclosurePrivacy.class)) {
      if (c.getD() <= 0) {
        throw new IllegalArgumentException("String_Node_Str" + c.getD() + "String_Node_Str");
      }
    }
  }
  if (config.isPrivacyModelSpecified(BasicBLikeness.class)) {
    for (    BasicBLikeness c : config.getPrivacyModels(BasicBLikeness.class)) {
      if (c.getB() <= 0) {
        throw new IllegalArgumentException("String_Node_Str" + c.getB() + "String_Node_Str");
      }
    }
  }
  if (config.isPrivacyModelSpecified(EnhancedBLikeness.class)) {
    for (    EnhancedBLikeness c : config.getPrivacyModels(EnhancedBLikeness.class)) {
      if (c.getB() <= 0) {
        throw new IllegalArgumentException("String_Node_Str" + c.getB() + "String_Node_Str");
      }
    }
  }
  for (  final GeneralizationHierarchy hierarchy : manager.getHierarchies()) {
    hierarchy.checkMonotonicity(manager);
  }
  final int[] hierarchyHeights=manager.getHierachiesHeights();
  final int[] minLevels=manager.getHierarchiesMinLevels();
  final int[] maxLevels=manager.getHierarchiesMaxLevels();
  for (int i=0; i < hierarchyHeights.length; i++) {
    if (minLevels[i] > (hierarchyHeights[i] - 1)) {
      throw new IllegalArgumentException("String_Node_Str" + manager.getHierarchies()[i].getName() + "String_Node_Str"+ minLevels[i]+ "String_Node_Str"+ (hierarchyHeights[i] - 1));
    }
    if (minLevels[i] < 0) {
      throw new IllegalArgumentException("String_Node_Str" + manager.getHierarchies()[i].getName() + "String_Node_Str");
    }
    if (maxLevels[i] > (hierarchyHeights[i] - 1)) {
      throw new IllegalArgumentException("String_Node_Str" + manager.getHierarchies()[i].getName() + "String_Node_Str"+ maxLevels[i]+ "String_Node_Str"+ (hierarchyHeights[i] - 1));
    }
    if (maxLevels[i] < minLevels[i]) {
      throw new IllegalArgumentException("String_Node_Str" + manager.getHierarchies()[i].getName() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Performs some sanity checks.
 * @param config
 * @param manager the manager
 */
private void checkAfterEncoding(final ARXConfiguration config,final DataManager manager){
  int numberOfOutputRecords=config.getNumOutputRecords();
  if (config.isPrivacyModelSpecified(KAnonymity.class)) {
    KAnonymity c=config.getPrivacyModel(KAnonymity.class);
    if ((c.getK() > numberOfOutputRecords) || (c.getK() < 1)) {
      throw new IllegalArgumentException("String_Node_Str" + c.getK() + "String_Node_Str"+ manager.getDataGeneralized().getDataLength()+ "String_Node_Str");
    }
  }
  if (config.isPrivacyModelSpecified(LDiversity.class)) {
    for (    LDiversity c : config.getPrivacyModels(LDiversity.class)) {
      if ((c.getL() > numberOfOutputRecords) || (c.getL() < 1)) {
        throw new IllegalArgumentException("String_Node_Str" + c.getL() + "String_Node_Str"+ manager.getDataGeneralized().getDataLength()+ "String_Node_Str");
      }
    }
  }
  if (config.isPrivacyModelSpecified(DDisclosurePrivacy.class)) {
    for (    DDisclosurePrivacy c : config.getPrivacyModels(DDisclosurePrivacy.class)) {
      if (c.getD() <= 0) {
        throw new IllegalArgumentException("String_Node_Str" + c.getD() + "String_Node_Str");
      }
    }
  }
  if (config.isPrivacyModelSpecified(BasicBLikeness.class)) {
    for (    BasicBLikeness c : config.getPrivacyModels(BasicBLikeness.class)) {
      if (c.getB() <= 0) {
        throw new IllegalArgumentException("String_Node_Str" + c.getB() + "String_Node_Str");
      }
    }
  }
  if (config.isPrivacyModelSpecified(EnhancedBLikeness.class)) {
    for (    EnhancedBLikeness c : config.getPrivacyModels(EnhancedBLikeness.class)) {
      if (c.getB() <= 0) {
        throw new IllegalArgumentException("String_Node_Str" + c.getB() + "String_Node_Str");
      }
    }
  }
  for (  final GeneralizationHierarchy hierarchy : manager.getHierarchies()) {
    hierarchy.checkMonotonicity(manager);
  }
  final int[] hierarchyHeights=manager.getHierachiesHeights();
  final int[] minLevels=manager.getHierarchiesMinLevels();
  final int[] maxLevels=manager.getHierarchiesMaxLevels();
  for (int i=0; i < hierarchyHeights.length; i++) {
    if (minLevels[i] > (hierarchyHeights[i] - 1)) {
      throw new IllegalArgumentException("String_Node_Str" + manager.getHierarchies()[i].getName() + "String_Node_Str"+ minLevels[i]+ "String_Node_Str"+ (hierarchyHeights[i] - 1));
    }
    if (minLevels[i] < 0) {
      throw new IllegalArgumentException("String_Node_Str" + manager.getHierarchies()[i].getName() + "String_Node_Str");
    }
    if (maxLevels[i] > (hierarchyHeights[i] - 1)) {
      throw new IllegalArgumentException("String_Node_Str" + manager.getHierarchies()[i].getName() + "String_Node_Str"+ maxLevels[i]+ "String_Node_Str"+ (hierarchyHeights[i] - 1));
    }
    if (maxLevels[i] < minLevels[i]) {
      throw new IllegalArgumentException("String_Node_Str" + manager.getHierarchies()[i].getName() + "String_Node_Str");
    }
  }
}