void (List toShow) { Set<GrMethod> methods = new HashSet<>(); for (Iterator iterator = toShow.iterator(); iterator.hasNext(); ) { Object next = iterator.next(); if (next instanceof GroovyResolveResult) { final PsiElement element = ((GroovyResolveResult)next).getElement(); if (element instanceof GrReflectedMethod) { final GrMethod base = ((GrReflectedMethod)element).getBaseMethod(); if (!methods.add(base)) { iterator.remove(); } } } } }