public static int roundToPowerOfTwo(final int value) {
        return 1 << (32 - Integer.numberOfLeadingZeros(value - 1));
    }
Find the next larger positive power of two value up from the given value.
If value is a power of two then this value will be returned.

@param value from which next positive power of two will be found
@return the next positive power of 2 or this value if it is a power of 2
jraft-core/src/main/java/com/alipay/sofa/jraft/util/Ints.java