Program: 109024
Project: 109024
Buggy source:
/** 
 * Performs some sanity checks.
 * @param data the allowed maximal number of outliers
 * @param config the configuration
 */
private void checkBeforeEncoding(final Data data,final ARXConfiguration config){
  if (data == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (config.containsCriterion(LDiversity.class) || config.containsCriterion(TCloseness.class)) {
    if (data.getDefinition().getSensitiveAttributes().size() == 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  for (  String attr : data.getDefinition().getSensitiveAttributes()) {
    boolean found=false;
    for (    LDiversity c : config.getCriteria(LDiversity.class)) {
      if (c.getAttribute().equals(attr)) {
        found=true;
        break;
      }
    }
    if (!found) {
      for (      TCloseness c : config.getCriteria(TCloseness.class)) {
        if (c.getAttribute().equals(attr)) {
          found=true;
          break;
        }
      }
    }
    if (!found) {
      throw new IllegalArgumentException("String_Node_Str" + attr + "String_Node_Str");
    }
  }
  for (  LDiversity c : config.getCriteria(LDiversity.class)) {
    if (data.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {
      throw new RuntimeException("String_Node_Str" + c.getAttribute() + "String_Node_Str");
    }
  }
  for (  TCloseness c : config.getCriteria(TCloseness.class)) {
    if (data.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {
      throw new RuntimeException("String_Node_Str" + c.getAttribute() + "String_Node_Str");
    }
  }
  final DataHandle handle=data.getHandle();
  if (!(handle instanceof DataHandleInput)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Set<String> attributes=new HashSet<String>();
  for (int i=0; i < handle.getNumColumns(); i++) {
    attributes.add(handle.getAttributeName(i));
  }
  for (  String attribute : data.getDefinition().getSensitiveAttributes()) {
    if (!attributes.contains(attribute)) {
      throw new IllegalArgumentException("String_Node_Str" + attribute + "String_Node_Str");
    }
  }
  for (  String attribute : data.getDefinition().getInsensitiveAttributes()) {
    if (!attributes.contains(attribute)) {
      throw new IllegalArgumentException("String_Node_Str" + attribute + "String_Node_Str");
    }
  }
  for (  String attribute : data.getDefinition().getIdentifyingAttributes()) {
    if (!attributes.contains(attribute)) {
      throw new IllegalArgumentException("String_Node_Str" + attribute + "String_Node_Str");
    }
  }
  for (  String attribute : data.getDefinition().getQuasiIdentifyingAttributes()) {
    if (!attributes.contains(attribute)) {
      throw new IllegalArgumentException("String_Node_Str" + attribute + "String_Node_Str");
    }
  }
  Map<String,String[][]> hierarchies=handle.getDefinition().getHierarchies();
  if ((config.getMaxOutliers() < 0d) || (config.getMaxOutliers() >= 1d)) {
    throw new IllegalArgumentException("String_Node_Str" + handle + "String_Node_Str");
  }
  if (hierarchies.size() > 15) {
    throw new IllegalArgumentException("String_Node_Str" + config.size());
  }
  if (hierarchies.size() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Performs some sanity checks.
 * @param data the allowed maximal number of outliers
 * @param config the configuration
 */
private void checkBeforeEncoding(final Data data,final ARXConfiguration config){
  if (data == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (config.containsCriterion(LDiversity.class) || config.containsCriterion(TCloseness.class)) {
    if (data.getDefinition().getSensitiveAttributes().size() == 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  for (  String attr : data.getDefinition().getSensitiveAttributes()) {
    boolean found=false;
    for (    LDiversity c : config.getCriteria(LDiversity.class)) {
      if (c.getAttribute().equals(attr)) {
        found=true;
        break;
      }
    }
    if (!found) {
      for (      TCloseness c : config.getCriteria(TCloseness.class)) {
        if (c.getAttribute().equals(attr)) {
          found=true;
          break;
        }
      }
    }
    if (!found) {
      throw new IllegalArgumentException("String_Node_Str" + attr + "String_Node_Str");
    }
  }
  for (  LDiversity c : config.getCriteria(LDiversity.class)) {
    if (data.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {
      throw new RuntimeException("String_Node_Str" + c.getAttribute() + "String_Node_Str");
    }
  }
  for (  TCloseness c : config.getCriteria(TCloseness.class)) {
    if (data.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {
      throw new RuntimeException("String_Node_Str" + c.getAttribute() + "String_Node_Str");
    }
  }
  final DataHandle handle=data.getHandle();
  if (!(handle instanceof DataHandleInput)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Set<String> attributes=new HashSet<String>();
  for (int i=0; i < handle.getNumColumns(); i++) {
    attributes.add(handle.getAttributeName(i));
  }
  for (  String attribute : data.getDefinition().getSensitiveAttributes()) {
    if (!attributes.contains(attribute)) {
      throw new IllegalArgumentException("String_Node_Str" + attribute + "String_Node_Str");
    }
  }
  for (  String attribute : data.getDefinition().getInsensitiveAttributes()) {
    if (!attributes.contains(attribute)) {
      throw new IllegalArgumentException("String_Node_Str" + attribute + "String_Node_Str");
    }
  }
  for (  String attribute : data.getDefinition().getIdentifyingAttributes()) {
    if (!attributes.contains(attribute)) {
      throw new IllegalArgumentException("String_Node_Str" + attribute + "String_Node_Str");
    }
  }
  for (  String attribute : data.getDefinition().getQuasiIdentifyingAttributes()) {
    if (!attributes.contains(attribute)) {
      throw new IllegalArgumentException("String_Node_Str" + attribute + "String_Node_Str");
    }
  }
  Map<String,String[][]> hierarchies=handle.getDefinition().getHierarchies();
  if ((config.getMaxOutliers() < 0d) || (config.getMaxOutliers() >= 1d)) {
    throw new IllegalArgumentException("String_Node_Str" + handle + "String_Node_Str");
  }
  if (hierarchies.size() > 15) {
    throw new IllegalArgumentException("String_Node_Str" + hierarchies.size());
  }
  if (hierarchies.size() == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
}