@Nullable
  static ExceptionLineRefiner.RefinerMatchResult onTheSameLineFor(@Nullable PsiElement from,
                                                                  @Nullable PsiElement reason,
                                                                  boolean forward) {
    if (from == null || reason == null) {
      return null;
    }
    if (isEmpty(from)) {
      PsiElement probablyFrom;
      if (forward) {
        probablyFrom = PsiTreeUtil.prevVisibleLeaf(from);
      }
      else {
        probablyFrom = PsiTreeUtil.nextVisibleLeaf(from);
      }
      if (probablyFrom != null) {
        from = probablyFrom;
      }
    }
    PsiFile file = from.getContainingFile();
    Document document = PsiDocumentManager.getInstance(file.getProject()).getDocument(file);
    if (document == null) return null;

    PsiElement current = reason;
    while (current != null && current != from) {
      if (onTheSameLine(document, current, from)) {
        return new ExceptionLineRefiner.RefinerMatchResult(current, reason);
      }
      if (forward) {
        current = PsiTreeUtil.prevLeaf(current);
      }
      else {
        current = PsiTreeUtil.nextLeaf(current);
      }
    }
    return new ExceptionLineRefiner.RefinerMatchResult(from, reason);
  }
@Nullable
  static ExceptionLineRefiner.RefinerMatchResult onTheSameLineFor(@Nullable PsiElement from,
                                                                  @Nullable PsiElement reason,
                                                                  boolean forward)