Program: 108061
Project: 108061
Buggy source:
/** 
 * Build an ARX lattice for a completely classified solution space
 * @param optimum
 * @param headermap
 */
private void buildComplete(final Transformation optimum,Map<String,Integer> headermap){
  this.size=(int)solutions.getSize();
  int[] offsets=solutions.getMultipliersForLowDimensionalData();
  int[] maxLevels=solutions.getTop().getGeneralization();
  int[] minLevels=solutions.getBottom().getGeneralization();
  int topLevel=solutions.getTop().getLevel();
  int[] levelsizes=new int[topLevel + 1];
  ARXNode[] cache=new ARXNode[size];
  for (int identifier=0; identifier < cache.length; identifier++) {
    Transformation transformation=solutions.getTransformation(identifier);
    cache[identifier]=new ARXNode(this,this.solutions,transformation,headermap);
    if (identifier == optimum.getIdentifier()) {
      this.optimum=cache[identifier];
    }
    int numSuccessors=0;
    int numPredecessors=0;
    int[] generalization=transformation.getGeneralization();
    for (int dimension=0; dimension < generalization.length; dimension++) {
      numPredecessors+=generalization[dimension] > minLevels[dimension] ? 1 : 0;
      numSuccessors+=generalization[dimension] < maxLevels[dimension] ? 1 : 0;
    }
    levelsizes[transformation.getLevel()]++;
    cache[identifier].successors=new ARXNode[numSuccessors];
    cache[identifier].predecessors=new ARXNode[numPredecessors];
  }
  this.levels=new ARXNode[topLevel + 1][];
  for (int i=0; i < levels.length; i++) {
    levels[i]=new ARXNode[levelsizes[i]];
  }
  int[] successorIndices=new int[size];
  int[] predecessorIndices=new int[size];
  for (int identifier=0; identifier < cache.length; identifier++) {
    ARXNode node=cache[identifier];
    int level=node.getTotalGeneralizationLevel();
    --levelsizes[level];
    levels[level][levels[level].length - 1 - levelsizes[level]]=node;
    int[] generalization=node.getTransformation();
    for (int dimension=0; dimension < generalization.length; dimension++) {
      if (generalization[dimension] < maxLevels[dimension]) {
        int successorIdentifier=identifier + offsets[dimension];
        ARXNode successor=cache[successorIdentifier];
        node.successors[successorIndices[identifier]++]=successor;
        successor.predecessors[predecessorIndices[successorIdentifier]++]=node;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Build an ARX lattice for a completely classified solution space
 * @param optimum
 * @param headermap
 */
private void buildComplete(final Transformation optimum,Map<String,Integer> headermap){
  this.size=(int)solutions.getSize();
  int[] offsets=solutions.getMultipliersForLowDimensionalData();
  int[] maxLevels=solutions.getTop().getGeneralization();
  int[] minLevels=solutions.getBottom().getGeneralization();
  int topLevel=solutions.getTop().getLevel();
  int[] levelsizes=new int[topLevel + 1];
  ARXNode[] cache=new ARXNode[size];
  for (int identifier=0; identifier < cache.length; identifier++) {
    Transformation transformation=solutions.getTransformation(identifier);
    cache[identifier]=new ARXNode(this,this.solutions,transformation,headermap);
    if (optimum != null && identifier == optimum.getIdentifier()) {
      this.optimum=cache[identifier];
    }
    int numSuccessors=0;
    int numPredecessors=0;
    int[] generalization=transformation.getGeneralization();
    for (int dimension=0; dimension < generalization.length; dimension++) {
      numPredecessors+=generalization[dimension] > minLevels[dimension] ? 1 : 0;
      numSuccessors+=generalization[dimension] < maxLevels[dimension] ? 1 : 0;
    }
    levelsizes[transformation.getLevel()]++;
    cache[identifier].successors=new ARXNode[numSuccessors];
    cache[identifier].predecessors=new ARXNode[numPredecessors];
  }
  this.levels=new ARXNode[topLevel + 1][];
  for (int i=0; i < levels.length; i++) {
    levels[i]=new ARXNode[levelsizes[i]];
  }
  int[] successorIndices=new int[size];
  int[] predecessorIndices=new int[size];
  for (int identifier=0; identifier < cache.length; identifier++) {
    ARXNode node=cache[identifier];
    int level=node.getTotalGeneralizationLevel();
    --levelsizes[level];
    levels[level][levels[level].length - 1 - levelsizes[level]]=node;
    int[] generalization=node.getTransformation();
    for (int dimension=0; dimension < generalization.length; dimension++) {
      if (generalization[dimension] < maxLevels[dimension]) {
        int successorIdentifier=identifier + offsets[dimension];
        ARXNode successor=cache[successorIdentifier];
        node.successors[successorIndices[identifier]++]=successor;
        successor.predecessors[predecessorIndices[successorIdentifier]++]=node;
      }
    }
  }
}