boolean (PsiElement element1, PsiElement element2) { if (super.equivalentDeclarations(element1, element2)) { return true; } return checkLibraryMethods && element1.getNavigationElement().equals(element2.getNavigationElement()); }