void (@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) { final PsiMethod psiMethod; final CommonProblemDescriptor[] problems; final RefMethod refMethod; if (myProcessor != null) { final RefEntity refElement = myProcessor.getElement(descriptor); if (!(refElement instanceof RefMethod) || !refElement.isValid()) return; refMethod = (RefMethod)refElement; psiMethod = ObjectUtils.tryCast(refMethod.getPsiElement(), PsiMethod.class); problems = myProcessor.getDescriptions(refMethod); } else { psiMethod = PsiTreeUtil.getParentOfType(descriptor.getPsiElement(), PsiMethod.class); if (psiMethod == null) return; refMethod = null; problems = new CommonProblemDescriptor[]{descriptor}; } removeExcessiveThrows(refMethod, psiMethod, problems); }