int inputLength; if (repeat == 1 || (inputLength = str.length()) == 0) {
int inputLength = str.length(); if (repeat == 1 || inputLength == 0) {
    public static String repeat(String str, int repeat) {        // Performance tuned for 2.0 (JDK1.4)                if (str == null) {            return null;        }        if (repeat <= 0) {            return "";        }        int inputLength;        if (repeat == 1 || (inputLength = str.length()) == 0) {            return str;        }        if (inputLength == 1 && repeat <= PAD_LIMIT) {           return padding(repeat, str.charAt(0));        }        int outputLength = inputLength * repeat;        switch (inputLength) {            case 1:                char ch = str.charAt(0);                char[] output1 = new char[outputLength];                for (int i = repeat - 1; i >= 0; i--) {                    output1[i] = ch;                }                return new String(output1);            case 2:                char ch0 = str.charAt(0);                char ch1 = str.charAt(1);                char[] output2 = new char[outputLength];                for (int i = repeat * 2 - 2; i >= 0; i--,i--) {                    output2[i] = ch0;                    output2[i + 1] = ch1;                }                return new String(output2);            default:                StringBuffer buf = new StringBuffer(outputLength);                for (int i = 0; i < repeat; i++) {                    buf.append(str);                }                        return buf.toString();        }    }