code: private static Tree findFootNode(Tree t) {
      Tree footNode = findFootNodeHelper(t);
      Tree result = footNode;
      if (footNode != null) {
        Tree parent = footNode.parent(t);
        int i = parent.indexOf(footNode);
        Tree newFootNode = footNode.treeFactory().newTreeNode(footNode.label(), new ArrayList<Tree>());
        parent.setChild(i, newFootNode);
        result = newFootNode;
      }
      return result;
    }
docs: Returns the foot node of the adjunction tree, which is the terminal node
  that ends in @.  In the process, turns the foot node into a TreeNode
  (rather than a leaf), and destructively un-escapes all the escaped
  instances of @ in the tree.  Note that final @ in a non-terminal node is
  ignored, and left in.