Review this Java binary search over a large array.
This runs fine in tests but the team has seen ArrayIndexOutOfBoundsException with very large arrays (near 2^30 elements) loaded from a memory-mapped file.
ArrayIndexOutOfBoundsException