private static @Nullable List<UMethod> selectMethod(List<UMethod> methods, final LineResult previousLineResult) {
    if (previousLineResult == null || previousLineResult.method() == null) return null;

    final List<UMethod> result = new SmartList<>();
    for (final UMethod method : methods) {
      PsiElement psi = method.getSourcePsi();
      if (psi == null) continue;
      psi.accept(new PsiRecursiveElementWalkingVisitor() {
        @Override
        public void visitElement(@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();
            }
          }
        }
      });
    }

    return result;
  }
private static @Nullable List<UMethod> selectMethod(List<UMethod> methods, final LineResult previousLineResult)