private int findNextClearBit(BitSet bitSet, int fromIndex) {
    int nextClearBit = bitSet.nextClearBit(fromIndex);

    long maxmimumClearBit = maximumVersion - bitSetVersion;
    if (nextClearBit >= maxmimumClearBit) {
      // We found empty bits, but past the offset we are interested in
      // Ignore these
      return -1;
    }

    return nextClearBit;
  }
Find the next clear bit from a given index in the bitset, that is less than or
equal to our maximum version for this iterator.

@return the next clear bit, or -1 if there is no next clear bit within the range.
geode-core/src/main/java/org/apache/geode/internal/cache/versions/BitSetExceptionIterator.java