int (int fromIndex) { assertNonNegative(fromIndex); int i = wordIndex(fromIndex); int result; int[] array = this.array; result = array.length * BITS_PER_WORD; if (i >= array.length) { result = fromIndex; } else { int w = ~arrayRead(array, i); int nextBitsInWord = w & -wordMaskForIndex(fromIndex); if (nextBitsInWord != 0) { int wordIndex = Integer.numberOfTrailingZeros(nextBitsInWord); result = i * BITS_PER_WORD + wordIndex; } else { for (i += 1; i < array.length; i++) { w = ~arrayRead(array, i); if (w == 0) continue; int wordIndex = Integer.numberOfTrailingZeros(w); result = i * BITS_PER_WORD + wordIndex; break; } } } return result; }