void (@NotNull PsiElement element) { super.visitElement(element); UCallExpression call = UastContextKt.toUElement(element, UCallExpression.class); if (call != null) { PsiMethod resolved = call.resolve(); if (resolved != null && resolved.getName().equals(previousLineResult.method())) { result.add(method); stopWalking(); } } }