public static int numberOfTrailingZeros(long hash, int indexBitLength)
    {
        long value = hash | (1L << (Long.SIZE - indexBitLength)); // place a 1 in the final position of the prefix to avoid flowing into prefix when the hash happens to be 0
        return Long.numberOfTrailingZeros(value);
    }
@Test
    public void testNumberOfTrailingZeros()
    {
        for (int indexBitLength : new int[] {6, 12, 18}) {
            for (int i = 0; i < Long.SIZE - 1; i++) {
                long hash = 1L << i;
                assertEquals(SfmSketch.numberOfTrailingZeros(hash, indexBitLength), Math.min(i, Long.SIZE - indexBitLength));
            }
        }
    }