Program: 108538
Project: 108538
Buggy source:
/** 
 * Creates the manipulator for the final lattice in the iterative process
 * @param lattice
 * @param config
 * @param header
 * @param definition
 * @return
 */
private LatticeManipulator createFinalManipulator(Lattice lattice,ARXConfiguration config,String[] header,DataDefinition previous,DataDefinition definition){
  final Map<IntArrayWrapper,Node> map=new HashMap<IntArrayWrapper,Node>();
  final Set<String> previousQI=previous.getQuasiIdentifyingAttributes();
  final Set<String> currentQI=definition.getQuasiIdentifyingAttributes();
  for (  Node[] level : lattice.getLevels()) {
    for (    Node node : level) {
      int[] key=new int[currentQI.size()];
      int previousIdx=-1;
      int currentIdx=-1;
      for (int i=0; i < header.length; i++) {
        if (previousQI.contains(header[i])) {
          previousIdx++;
        }
        if (currentQI.contains(header[i])) {
          currentIdx++;
          key[currentIdx]=node.getTransformation()[previousIdx];
        }
      }
      map.put(new IntArrayWrapper(key),node);
    }
  }
  return new LatticeManipulator(){
    @Override public void process(    Lattice lattice,    Node node){
      Node other=map.get(new IntArrayWrapper(node.getTransformation()));
      if (other.isAnonymous()) {
        node.setAnonymous(false);
        node.setNotTagged();
        node.setNotChecked();
      }
 else {
        node.setAnonymous(false);
        node.setTagged();
        node.setChecked();
        lattice.triggerTagged();
        lattice.decUntaggedCount(node.getLevel());
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates the manipulator for the final lattice in the iterative process
 * @param lattice
 * @param config
 * @param header
 * @param definition
 * @return
 */
private LatticeManipulator createFinalManipulator(Lattice lattice,ARXConfiguration config,String[] header,DataDefinition previous,DataDefinition definition){
  final Map<IntArrayWrapper,Node> map=new HashMap<IntArrayWrapper,Node>();
  final Set<String> previousQI=previous.getQuasiIdentifyingAttributes();
  final Set<String> currentQI=definition.getQuasiIdentifyingAttributes();
  for (  Node[] level : lattice.getLevels()) {
    for (    Node node : level) {
      int[] key=new int[currentQI.size()];
      int previousIdx=-1;
      int currentIdx=-1;
      for (int i=0; i < header.length; i++) {
        if (previousQI.contains(header[i])) {
          previousIdx++;
        }
        if (currentQI.contains(header[i])) {
          currentIdx++;
          key[currentIdx]=node.getTransformation()[previousIdx];
        }
      }
      map.put(new IntArrayWrapper(key),node);
    }
  }
  return new LatticeManipulator(){
    @Override public void process(    Lattice lattice,    Node node){
      Node other=map.get(new IntArrayWrapper(node.getTransformation()));
      if (other.isAnonymous()) {
        node.setAnonymous(false);
        node.setNotTagged();
        node.setNotChecked();
      }
 else {
        node.setAnonymous(false);
        node.setTagged();
        node.setChecked();
        lattice.triggerTagged();
        lattice.decUntaggedCount(node.getLevel());
      }
      node.setInformationLoss(other.getInformationLoss());
    }
  }
;
}