@@ -0,0 +1,1957 @@
+package sfBugsNew;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport java.util.Set;%0Aimport java.util.concurrent.ConcurrentHashMap;%0A%0Apublic class Bug1387 %7B%0A%0A    static class PoJo %7B%0A        final String s;%0A%0A        @Override%0A        public int hashCode() %7B%0A            final int prime = 31;%0A            int result = 1;%0A            result = prime * result + ((s == null) ? 0 : s.hashCode());%0A            return result;%0A        %7D%0A%0A        @Override%0A        public boolean equals(Object obj) %7B%0A            if (this == obj)%0A                return true;%0A            if (obj == null)%0A                return false;%0A            if (getClass() != obj.getClass())%0A                return false;%0A            PoJo other = (PoJo) obj;%0A            if (s == null) %7B%0A                if (other.s != null)%0A                    return false;%0A            %7D else if (!s.equals(other.s))%0A                return false;%0A            return true;%0A        %7D%0A%0A        public PoJo(String s) %7B%0A            super();%0A            this.s = s;%0A        %7D%0A%0A    %7D%0A    public static void test3() %7B%0A        Set%3CString%3E%5B%5D sets = new Set%5B10%5D;%0A        for (int i = 0; i %3C 10; ++i) %7B%0A            sets%5Bi%5D = Collections.newSetFromMap(new ConcurrentHashMap%3CString,Boolean%3E());%0A            sets%5Bi%5D.add(%22Foo%22);%0A        %7D%0A        PoJo p = new PoJo(%22Foo%22);%0A        sets%5B5%5D.remove(p); // %3C- bug%0A    %7D%0A%0A    public static void test() %7B%0A        Set%3CString%3E s = Collections.newSetFromMap(new ConcurrentHashMap%3CString,Boolean%3E());%0A        s.add(%22Foo%22);%0A        PoJo p = new PoJo(%22Foo%22);%0A        s.remove(p); // %3C- bug%0A    %7D%0A    public static void test2() %7B%0A        List%3CSet%3CString%3E%3E sets = new ArrayList%3CSet%3CString%3E%3E();%0A        for (int i = 0; i %3C 10; ++i) %7B%0A            sets.add( Collections.newSetFromMap(new ConcurrentHashMap%3CString,Boolean%3E()));%0A            sets.get(i).add(%22Foo%22);%0A        %7D%0A        PoJo p = new PoJo(%22Foo%22);%0A        sets.get(5).remove(p); // %3C- bug%0A    %7D%0A%7D%0A

add Bug1387