import java.net.URL;

public class InheritanceUnsafeClass
{
    public URL getResource(String r)
    {
        return getClass().getResource(r);
    }
}


@@ -13,16 +13,44 @@
 net.URL;
+%0Aimport java.io.InputStream;
 %0A%0Apublic
@@ -175,8 +175,316 @@
    %7D%0A%7D%0A%0A
+class InheritanceUnsafeClass2%0A%7B%09%0A%09public InputStream getResourceBAD(String r)%0A%09%7B%0A%09%09return getClass().getResourceAsStream(r);%0A%09%7D%0A%7D%0A%0Aclass InheritanceUnsafeClass3%0A%7B%0A%09public InputStream getResourceOK(String r)%0A%09%7B//This should not report a bug%0A%09%09return InheritanceUnsafeClass.class.getResourceAsStream(r);%0A%09%7D%0A%7D%0A%0A

show false positive