The following document contains the results of PMD's CPD 4.2.5.
File | Line |
---|---|
org/kuali/rice/core/impl/config/property/ConfigParserImpl.java | 203 |
org/kuali/rice/core/impl/config/property/JAXBConfigImpl.java | 514 |
this.setProperty("host.name", RiceUtilities.getHostName()); } /** * Generates a random integer in the range specified by the specifier, in the format: min-max * * @param rangeSpec * a range specification, 'min-max' * @return a random integer in the range specified by the specifier, in the format: min-max */ protected int generateRandomInteger(String rangeSpec) { String[] range = rangeSpec.split("-"); if (range.length != 2) { throw new RuntimeException("Invalid range specifier: " + rangeSpec); } int from = Integer.parseInt(range[0].trim()); int to = Integer.parseInt(range[1].trim()); if (from > to) { int tmp = from; from = to; to = tmp; } int num; // not very random huh... if (from == to) { num = from; |