@@ -0,0 +1,1655 @@
+public class Trace implements Runnable %7B%0A  private volatile boolean alive = true;%0A%0A  private static void throwSomething() %7B%0A    throw new RuntimeException();%0A  %7D%0A%0A  private void bar(Object o) %7B%0A    o.toString();%0A  %7D%0A%0A  private void foo() %7B%0A    %7B long a = 42;%0A      long b = 25;%0A      long c = a / b;%0A    %7D%0A%0A    try %7B%0A      long a = 42;%0A      long b = 0;%0A      long c = a / b;%0A    %7D catch (Exception e) %7B %7D%0A%0A    try %7B%0A      throw new Exception();%0A    %7D catch (Exception e) %7B %7D%0A%0A    try %7B%0A      throwSomething();%0A    %7D catch (Exception e) %7B %7D%0A%0A    try %7B%0A      Trace.class.getMethod(%22bar%22, Object.class).invoke(this, this);%0A    %7D catch (Exception e) %7B %7D%0A  %7D%0A%0A  private static void dummy() %7B%0A    byte%5B%5D a = new byte%5B10%5D;%0A    byte%5B%5D b = new byte%5B10%5D;%0A    System.arraycopy(a, 0, b, 0, 10);%0A  %7D%0A%0A  private static void tail1(int a, int b, int c, int d, int e, int f) %7B%0A    dummy();%0A  %7D%0A%0A  private static void tail2() %7B%0A    tail1(1, 2, 3, 4, 5, 6);%0A    tail1(1, 2, 3, 4, 5, 6);%0A  %7D%0A%0A  private static void test(Trace trace) %7B%0A    tail1(1, 2, 3, 4, 5, 6);%0A    tail2();%0A    trace.foo();%0A  %7D%0A%0A  public void run() %7B%0A    synchronized (this) %7B%0A      notifyAll();%0A    %7D%0A%0A    try %7B%0A      for (int i = 0; i %3C 10000; ++i) %7B%0A        test(this);%0A      %7D%0A    %7D finally %7B%0A      alive = false;%0A    %7D%0A  %7D%0A%0A  public static void main(String%5B%5D args) throws Exception %7B%0A    Trace trace = new Trace();%0A    Thread thread = new Thread(trace);%0A%0A    synchronized (trace) %7B%0A      thread.start();%0A      trace.wait();%0A%0A      int count = 0;%0A      while (trace.alive) %7B%0A        thread.getStackTrace();%0A        ++ count;%0A      %7D%0A%0A      System.out.println(%22got %22 + count + %22 traces%22);%0A    %7D%0A  %7D%0A%7D%0A

add Thread.getStackTrace test