aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/pr59208/FooProducer.java
blob: b34a23cbf66e9fdc650c46fdc31cd227150d1c1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public class FooProducer {

  public static final int N_METHODS = 50;
  public static final int N_STATEMENTS = Short.MAX_VALUE/(2*N_METHODS);  
  public static void main(String[] args) {
    System.out.println("public class Foo {");
    System.out.println("static java.util.Set hs = new java.util.HashSet();");
    for (int i = 0; i < N_METHODS; i++) {
      System.out.println("public void test" + i + "() {");
      for (int j=0; j < N_STATEMENTS; j++) {
        System.out.println("hs.add(new Object());");
      } 
      System.out.println("}");
    }
    System.out.println("}");
  }

}