@@ -0,0 +1,2613 @@
+package sfBugs;%0A%0Aimport edu.umd.cs.findbugs.annotations.ExpectWarning;%0Aimport edu.umd.cs.findbugs.annotations.NoWarning;%0A%0Apublic class Bug3479234 %7B%0A    private Parent _p;%0A%0A    public void setParent(Parent p) %7B%0A        _p = p;%0A    %7D%0A%0A    @NoWarning(%22BC_UNCONFIRMED_CAST%22)%0A    public static String getName(Parent o) %7B%0A        String s;%0A%0A        if (o instanceof Child)%0A            s = (String) ((Child) o).getValue();%0A        else%0A            s = %22%3Canonymous%3E%22;%0A%0A        return s;%0A    %7D%0A%0A    @NoWarning(%22BC_UNCONFIRMED_CAST%22)%0A    public String getName2(Parent o) %7B%0A        _p = o;%0A        String s;%0A%0A        if (_p instanceof Child)%0A            s = (String) ((Child) _p).getValue();%0A        else%0A            s = %22%3Canonymous%3E%22;%0A%0A        return s;%0A    %7D%0A%0A    @ExpectWarning(%22BC_UNCONFIRMED_CAST%22)%0A    public  String getName3(Parent o1, Parent o2) %7B%0A        %0A        _p = o1;%0A        String s;%0A%0A        if (_p instanceof Child)%0A            s = (String) ((Child) o2).getValue();%0A        else%0A            s = %22%3Canonymous%3E%22;%0A%0A        return s;%0A    %7D%0A    @ExpectWarning(%22BC_UNCONFIRMED_CAST%22)%0A    public  String getName4(Parent o1, Parent o2) %7B%0A        %0A        _p = o1;%0A        String s;%0A%0A        if (o2 instanceof Child)%0A            s = (String) ((Child) _p).getValue();%0A        else%0A            s = %22%3Canonymous%3E%22;%0A%0A        return s;%0A    %7D%0A    @ExpectWarning(%22BC_UNCONFIRMED_CAST%22)%0A    public static String getName2(Parent o1, Parent o2) %7B%0A        String s;%0A%0A        if (o1 instanceof Child)%0A            s = (String) ((Child) o2).getValue();%0A        else%0A            s = %22%3Canonymous%3E%22;%0A%0A        return s;%0A    %7D%0A    @NoWarning(%22BC_UNCONFIRMED_CAST%22)%0A    public String getName() %7B%0A%0A        String s;%0A%0A        if (_p instanceof Child)%0A            s = (String) ((Child) _p).getValue();%0A        else%0A            s = %22%3Canonymous%3E%22;%0A%0A        return s;%0A    %7D%0A%0A    @NoWarning(%22BC_UNCONFIRMED_CAST%22)%0A    public String getName2() %7B%0A%0A        Parent p = _p;%0A        String s;%0A%0A        if (p instanceof Child)%0A            s = (String) ((Child) p).getValue();%0A        else%0A            s = %22%3Canonymous%3E%22;%0A%0A        return s;%0A    %7D%0A%0A    static class Parent %7B%0A    %7D%0A%0A    static class Child extends Parent %7B%0A        Object getValue() %7B%0A            return null;%0A        %7D%0A    %7D%0A    %0A    static class Original %7B%0A        private Parent _p;%0A        String _s;%0A        @NoWarning(%22BC_UNCONFIRMED_CAST%22)%0A        public Original(Parent o)%0A        %7B%0A            _p = o;%0A%0A            if(_p instanceof Child)%0A                _s = (String)((Child)_p)%0A                .getValue();%0A            else%0A                _s = %22%3Canonymous%3E%22;%0A        %7D%0A%0A    %7D%0A%7D

add test case