Program: 108920
Project: 108920
Buggy source:
/** 
 * Performs data anonymization
 * @param data The data
 * @param config The privacy config
 * @return ARXResult
 * @throws IOException
 */
public ARXResult anonymize(final Data data,ARXConfiguration config) throws IOException {
  if (config.isProtectSensitiveAssociations() && config.isPracticalMonotonicity() && data.getDefinition().getSensitiveAttributes().size() > 1) {
    throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str");
  }
  final long time=System.currentTimeMillis();
  checkBeforeEncoding(data,config);
  DataHandle handle=data.getHandle();
  handle.getRegistry().reset();
  handle.getRegistry().createInputSubset(config);
  if (data.getDefinition().getSensitiveAttributes().size() > 1) {
    final AttributeType substition;
    if (config.isProtectSensitiveAssociations()) {
      substition=AttributeType.QUASI_IDENTIFYING_ATTRIBUTE;
    }
 else {
      substition=AttributeType.INSENSITIVE_ATTRIBUTE;
    }
    Result result=null;
    List<String> sensitive=new ArrayList<String>(data.getDefinition().getSensitiveAttributes());
    DataDefinition currentDefinition=null;
    DataDefinition previousDefinition=handle.getDefinition();
    for (int i=0; i < sensitive.size(); i++) {
      String attribute=sensitive.get(i);
      ARXConfiguration currentConfig=config.clone();
      previousDefinition=currentDefinition;
      currentDefinition=handle.getDefinition().clone();
      for (      LDiversity c : currentConfig.getCriteria(LDiversity.class)) {
        if (!c.getAttribute().equals(attribute)) {
          currentConfig.removeCriterion(c);
          currentDefinition.setAttributeType(c.getAttribute(),substition);
        }
      }
      for (      TCloseness c : currentConfig.getCriteria(TCloseness.class)) {
        if (!c.getAttribute().equals(attribute)) {
          currentConfig.removeCriterion(c);
          currentDefinition.setAttributeType(c.getAttribute(),substition);
        }
      }
      Lattice lattice=null;
      AbstractAlgorithm algorithm=null;
      if (result != null) {
        int numAnonymous=alterLattice(result.lattice,config,((DataHandleInput)handle).header,previousDefinition,currentDefinition);
        lattice=result.lattice;
        algorithm=result.algorithm;
        if (numAnonymous == 0) {
          break;
        }
      }
      result=anonymizeInternal(handle,currentDefinition,currentConfig,lattice,sensitive.size(),algorithm);
    }
    return result.asResult(config,handle,time);
  }
 else {
    return anonymizeInternal(handle,handle.getDefinition(),config).asResult(config,handle,time);
  }
}

Fixed version (ground truth):
/** 
 * Performs data anonymization
 * @param data The data
 * @param config The privacy config
 * @return ARXResult
 * @throws IOException
 */
public ARXResult anonymize(final Data data,ARXConfiguration config) throws IOException {
  if (config.isProtectSensitiveAssociations() && config.isPracticalMonotonicity() && data.getDefinition().getSensitiveAttributes().size() > 1) {
    throw new UnsupportedOperationException("String_Node_Str" + "String_Node_Str");
  }
  final long time=System.currentTimeMillis();
  checkBeforeEncoding(data,config);
  DataHandle handle=data.getHandle();
  handle.getRegistry().reset();
  handle.getRegistry().createInputSubset(config);
  if (data.getDefinition().getSensitiveAttributes().size() > 1) {
    final AttributeType substition;
    if (config.isProtectSensitiveAssociations()) {
      substition=AttributeType.QUASI_IDENTIFYING_ATTRIBUTE;
    }
 else {
      substition=AttributeType.INSENSITIVE_ATTRIBUTE;
    }
    DataDefinition definition=handle.getDefinition().clone();
    Result result=null;
    List<String> sensitive=new ArrayList<String>(data.getDefinition().getSensitiveAttributes());
    DataDefinition currentDefinition=null;
    DataDefinition previousDefinition=handle.getDefinition();
    for (int i=0; i < sensitive.size(); i++) {
      String attribute=sensitive.get(i);
      ARXConfiguration currentConfig=config.clone();
      previousDefinition=currentDefinition;
      currentDefinition=handle.getDefinition().clone();
      for (      LDiversity c : currentConfig.getCriteria(LDiversity.class)) {
        if (!c.getAttribute().equals(attribute)) {
          currentConfig.removeCriterion(c);
          currentDefinition.setAttributeType(c.getAttribute(),substition);
        }
      }
      for (      TCloseness c : currentConfig.getCriteria(TCloseness.class)) {
        if (!c.getAttribute().equals(attribute)) {
          currentConfig.removeCriterion(c);
          currentDefinition.setAttributeType(c.getAttribute(),substition);
        }
      }
      Lattice lattice=null;
      AbstractAlgorithm algorithm=null;
      if (result != null) {
        int numAnonymous=alterLattice(result.lattice,config,((DataHandleInput)handle).header,previousDefinition,currentDefinition);
        lattice=result.lattice;
        algorithm=result.algorithm;
        if (numAnonymous == 0) {
          break;
        }
      }
      result=anonymizeInternal(handle,currentDefinition,currentConfig,lattice,sensitive.size(),algorithm,null);
    }
    if (config.isProtectSensitiveAssociations()) {
      DataDefinition finalDefinition=createFinalDefinition(definition);
      ARXConfiguration finalConfig=createFinalConfig(config);
      LatticeManipulator finalManipulator=createFinalManipulator(result.lattice,config,((DataHandleInput)handle).header,currentDefinition,definition);
      result=anonymizeInternal(handle,finalDefinition,finalConfig,null,1,null,finalManipulator);
    }
    return result.asResult(config,handle,time);
  }
 else {
    return anonymizeInternal(handle,handle.getDefinition(),config).asResult(config,handle,time);
  }
}