protected static int calculateShift(int minimumValue, int maximumValue) {
        int shift = 0;
        int value = 1;
        while (value < minimumValue && value < maximumValue) {
            value <<= 1;
            shift++;
        }
        return shift;
    }
Calculate a shift value that can be used to create a power-of-two value between
the specified maximum and minimum values.

@param minimumValue the minimum value
@param maximumValue the maximum value
@return the calculated shift (use {@code 1 << shift} to obtain a value)
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/util/ConcurrentReferenceHashMap.java