@@ -0,0 +1,1545 @@
+package sfBugs;%0A%0Aimport java.math.BigDecimal;%0Aimport junit.framework.Assert;%0Aimport org.junit.Test;%0Aimport edu.umd.cs.findbugs.annotations.ExpectWarning;%0A%0Apublic class Bug3474679%0A%7B%0A    @ExpectWarning(value = %22EC_UNRELATED_TYPES%22, num=4)%0A    @Test%0A    public void testEqualsOK()%0A    %7B%0A        Assert.assertEquals(new Double(0), new BigDecimal(%220%22)); //correctly flagged as a bug%0A        Assert.assertEquals(new Double(0), new CustomObject()); //identical bug type is missed%0A%0A        if (new Double(0).equals(new BigDecimal(%220%22))) //correctly flagged as a bug%0A            ;%0A        if (new Double(0).equals(new CustomObject())) //identical bug type is missed%0A            ;%0A    %7D%0A%0A    @ExpectWarning(value = %22EC_UNRELATED_TYPES%22, num=2)%0A    @Test%0A    public void testEqualsFalseNegative()%0A    %7B%0A       Assert.assertEquals(new Double(0), new CustomObject()); //identical bug type is missed%0A%0A       if (new Double(0).equals(new CustomObject())) //identical bug type is missed%0A            ;%0A    %7D%0A    %0A    @ExpectWarning(value = %22EC_UNRELATED_TYPES%22, num=4)%0A    public void testEquals2()%0A    %7B%0A        Assert.assertEquals(new Double(0), new BigDecimal(%220%22)); //correctly flagged as a bug%0A        Assert.assertEquals(new Double(0), new CustomObject()); //correctly flagged as a bug%0A%0A        if (new Double(0).equals(new BigDecimal(%220%22))) //correctly flagged as a bug%0A            ;%0A        if (new Double(0).equals(new CustomObject())) //correctly flagged as a bug%0A            ;%0A    %7D%0A%0A    private static class CustomObject%0A    %7B%0A        //NOP%0A    %7D%0A%7D%0A%0A

add sourceforge bug