code: private static void moveAllFollowing(
        Node start, Node srcParent, Node destParent) {
      for (Node n = start.getNext(); n != null; n = start.getNext()) {
        boolean isFunctionDeclaration = NodeUtil.isFunctionDeclaration(n);
        srcParent.removeChild(n);
        if (isFunctionDeclaration) {
          destParent.addChildToFront(n);
        } else {
          destParent.addChildToBack(n);
        }
      }
    }
docs: Move all the child nodes following start in srcParent to the end of
  destParent's child list.
  @param start The start point in the srcParent child list.
  @param srcParent The parent node of start.
  @param destParent The destination node.