Fixed repetition count (Java APIs are crazy)