@@ -0,0 +1,1637 @@
+package sfBugs;%0A%0Apublic class Bug1815013 %7B%0A    private int x, y;%0A%0A    public Bug1815013(Bug1815013 p) %7B%0A        this(p.x, p.y); // Should be treated as UNSYNC_ACCESS w/r/t p.x and p.y%0A    %7D%0A%0A    public Bug1815013(int x, int y) %7B%0A        this.x = x;%0A        this.y = y;%0A    %7D%0A%0A    public synchronized int%5B%5D get() %7B%0A        return new int%5B%5D %7B x, y %7D;%0A    %7D%0A%0A    public synchronized void set(int x, int y) %7B%0A        this.x = x;%0A        this.y = y;%0A    %7D%0A%0A    public void set2(Bug1815013 p) %7B%0A        synchronized(this) %7B%0A            p.x = y; // should generate warning w/r/t p%0A        %7D%0A    %7D%0A%0A    public void set3(Bug1815013 p) %7B%0A        synchronized(this) %7B%0A            p.x = get()%5B0%5D; // should generate warning w/r/t p%0A        %7D%0A    %7D%0A%0A    public void set4(Bug1815013 p) %7B%0A        synchronized(p) %7B%0A            p.x = get()%5B0%5D; // should not generate warning%0A        %7D%0A    %7D%0A    %0A    public void set5(Bug1815013 p) %7B%0A        synchronized(p) %7B%0A            synchronized(this) %7B%0A                p.x = y; // should not generate warning%0A            %7D%0A        %7D%0A    %7D%0A    %0A    private void privateUnsynchSetThis(Bug1815013 p) %7B%0A        // should be treated as SYNC_ACCESS, and it is%0A        this.x = p.get()%5B0%5D; %0A    %7D%0A    %0A    public void publicSyncThis(Bug1815013 p) %7B%0A        synchronized(this) %7B%0A            privateUnsynchSetThis(p);%0A        %7D%0A    %7D%0A%0A    private void privateUnsynchSetP(Bug1815013 p) %7B%0A        // should be treated as SYNC_ACCESS, but is treated as UNSYNC_ACCESS%0A        p.x = get()%5B0%5D; %0A    %7D%0A    %0A    public void publicSyncP(Bug1815013 p) %7B%0A        synchronized(p) %7B%0A            privateUnsynchSetP(p);%0A        %7D%0A    %7D%0A%7D%0A

Test case for sourceforge Bug1815013