You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FooProducer.java 592B

123456789101112131415161718
  1. public class FooProducer {
  2. public static final int N_METHODS = 50;
  3. public static final int N_STATEMENTS = Short.MAX_VALUE/(2*N_METHODS);
  4. public static void main(String[] args) {
  5. System.out.println("public class Foo {");
  6. System.out.println("static java.util.Set hs = new java.util.HashSet();");
  7. for (int i = 0; i < N_METHODS; i++) {
  8. System.out.println("public void test" + i + "() {");
  9. for (int j=0; j < N_STATEMENTS; j++) {
  10. System.out.println("hs.add(new Object());");
  11. }
  12. System.out.println("}");
  13. }
  14. System.out.println("}");
  15. }
  16. }