/guava/android/guava/src/com/google/common/collect/Collections2.java
if ( permutations == Integer.MAX_VALUE ) { return Integer.MAX_VALUE; }
int r = 1; while (n < sortedInputList.size()) { int comparison = comparator.compare(sortedInputList.get(n - 1), sortedInputList.get(n)); if (comparison < 0) { permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r)); r = 0; <extra_id_0> } n++; r++; } return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r)); }