We have had some bugs caused by a misunderstanding of HashSet functionality. Apparently someone assumed that calling .iterator() would return the elements in the order they were inserted. What should have been used is LinkedHashSet.
Now, I was wondering if there is some way to search for this bug. As in: is there a way to find instances of iterator being called on variables of types implementing the Set interface?