if (index == parent.getChildCount())
if (index == 0 || index >= mod.getChildCount(parent))
  TreeNode getNextSibling(TreeNode node)  {    TreeNode parent = node.getParent();    if (parent == null)      return null;    int index = parent.getIndex(node) + 1;        if (index == parent.getChildCount())      return null;    return parent.getChildAt(index);  }