code: private void compactAndRemove(final E[] buffer, final int mask, int removeHashIndex) {
          // remove(9a): [9a,9b,10a,9c,10b,11a,null] -> [9b,9c,10a,10b,null,11a,null]
          removeHashIndex = removeHashIndex & mask;
          int j = removeHashIndex;
          while(true) {
              int k;
              // skip elements which belong where they are
              do {
                  // j := (j+1) modulo num_slots
                  j = (j + 1) & mask;
                  // if slot[j] is unoccupied exit
                  if (buffer[j] == null) {
                      // delete last duplicate slot
                      buffer[removeHashIndex] = null;
                      return;
                  }
  
                  // k := hash(slot[j].key) modulo num_slots
                  k = System.identityHashCode(buffer[j]) & mask;
                  // determine if k lies cyclically in [i,j]
                  // |    i.k.j |
                  // |....j i.k.| or  |.k..j i...|
              }
              while ( (removeHashIndex  <= j) ?
                      ((removeHashIndex < k) && (k <= j)) :
                      ((removeHashIndex < k) || (k <= j)) );
              // slot[removeHashIndex] := slot[j]
              buffer[removeHashIndex] = buffer[j];
              // removeHashIndex := j
              removeHashIndex = j;
          }
      }
docs: /*
  implemented as per wiki suggested algo with minor adjustments.