void (@NotNull List<? extends PsiElement> elements, @NotNull Collection<? super LineMarkerInfo<?>> result) { final Set<PsiStatement> statements = new HashSet<>(); for (PsiElement element : elements) { ProgressManager.checkCanceled(); if (element instanceof PsiMethodCallExpression methodCall) { final PsiStatement statement = PsiTreeUtil.getParentOfType(methodCall, PsiStatement.class, true, PsiMethod.class); if (!statements.contains(statement) && isRecursiveMethodCall(methodCall)) { statements.add(statement); ContainerUtil.addIfNotNull(result, RecursiveMethodCallMarkerInfo.create(methodCall)); } } } }