docs: @Nullable
    private static JCTree findFieldDeclaration(TreePath path, VarSymbol var) {
      for (TreePath curr = path; curr != null; curr = curr.getParentPath()) {
        Tree leaf = curr.getLeaf();
        if (!(leaf instanceof JCClassDecl)) {
          continue;
        }
        for (JCTree tree : ((JCClassDecl) leaf).getMembers()) {
          if (Objects.equals(var, ASTHelpers.getSymbol(tree))) {
            return tree;
          }
        }
      }
      return null;
    }