@@ -0,0 +1,1269 @@
+package bugIdeas;%0A%0Apublic class Ideas_2010_09_17 %7B%0A    private static int bufferSize = 0;%0A%0A    private static int%5B%5D dataBuffer = new int%5BbufferSize%5D;%0A%0A    private void resize(int size) %7B%0A        synchronized (dataBuffer) %7B%0A            System.out.println(%22Entering synchronized block (resizing to: %22 + size + %22)%22);%0A            bufferSize = size;%0A            if (dataBuffer.length %3C size) %7B%0A                dataBuffer = new int%5Bsize%5D; // danger modifying mutex!!!!%0A            %7D%0A            try %7B%0A                Thread.sleep(3000);%0A            %7D catch (InterruptedException e) %7B%0A                System.out.println(%22Sleep was interrupted%22);%0A            %7D%0A            System.out.println(%22Exiting synchronized block%22);%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        new Thread(new Runnable() %7B%0A            @Override%0A            public void run() %7B%0A                Ideas_2010_09_17 instance1 = new Ideas_2010_09_17();%0A                instance1.resize(100);%0A            %7D%0A        %7D).start();%0A%0A        try %7B%0A            Thread.sleep(1000);%0A        %7D catch (InterruptedException e) %7B%0A            System.out.println(%22Sleep was interrupted%22);%0A        %7D%0A%0A        Ideas_2010_09_17 instance2 = new Ideas_2010_09_17();%0A        instance2.resize(10000);%0A    %7D%0A%0A%7D

add test case