boolean (RefEntity @NotNull [] refElements) { if (!super.applyFix(refElements)) return false; List<RefElement> deletedRefs = new ArrayList<>(1); final RefFilter filter = getFilter(); for (RefEntity refElement : refElements) { PsiElement psiElement = refElement instanceof RefElement ? ((RefElement)refElement).getPsiElement() : null; if (psiElement == null) continue; if (filter.getElementProblemCount((RefJavaElement)refElement) == 0) continue; final RefEntity owner = refElement.getOwner(); if (!(owner instanceof RefJavaElement) || filter.getElementProblemCount((RefJavaElement)owner) == 0 || !(ArrayUtil.find(refElements, owner) > -1)) { commentOutDead(psiElement); } refElement.getRefManager().removeRefElement((RefElement)refElement, deletedRefs); } EntryPointsManager entryPointsManager = getEntryPointsManager(); for (RefElement refElement : deletedRefs) { entryPointsManager.removeEntryPoint(refElement); } for (RefElement ref : deletedRefs) { myFixedElements.put(ref, UnusedDeclarationHint.COMMENT); } return true; }