private int nextSetBit(int bitIndex) {
    if (bitIndexBase < 0) {
      throw new IllegalStateException();
    }
    if (bitIndex >= bitIndexBase) bitIndex -= bitIndexBase;
    int wordIndex = bitIndex >> SHIFT;
    if (wordIndex > maxNonZeroSlotIndex) {
      return -1;
    }

    long word = bitSlots[wordIndex] & (-1L << bitIndex);

    while (true) {
      if (word != 0) {
        return (wordIndex * BITS_PER_WORD) + Long.numberOfTrailingZeros(word) + bitIndexBase;
      }
      if (++wordIndex > maxNonZeroSlotIndex) {
        return -1;
      }
      word = bitSlots[wordIndex];
    }
  }
private int nextSetBit(int bitIndex)