The following document contains the results of PMD's CPD 7.0.0.
File | Line |
---|---|
org/codehaus/plexus/util/TypeFormat.java | 126 |
org/codehaus/plexus/util/TypeFormat.java | 174 |
int limit = (isNegative) ? Short.MIN_VALUE : -Short.MAX_VALUE; int multmin = limit / radix; int length = chars.length(); int i = (isNegative || (chars.charAt(0) == '+')) ? 1 : 0; while (true) { int digit = Character.digit(chars.charAt(i), radix); int tmp = result * radix; if ((digit < 0) || (result < multmin) || (tmp < limit + digit)) { // Overflow. throw new NumberFormatException("For input characters: \"" + chars.toString() + "\""); } // Accumulates negatively. result = tmp - digit; if (++i >= length) { break; } } return (short) (isNegative ? result : -result); |