The PositiveIntSet impl has a bug in the ordered set iterator (not incrementing an index in a loop). In addition, Improve this also by eliminating expensive operations on bit Sets (such as computing the number of elements in the set), and augmenting the IntBitSet to allow a potentially much smaller footprint, by supporting an "offset" for the use case where there's a lot of fairly "dense" members, clustered at an offset from 0. Increase the hysteresis for switching among alternative impls in PositiveIntSet. Add (approximate) tracking for IntHashSet of mostNegative as well as most positive. Do some other minor cleanup - making things appropriately private / final. Add / update test cases.