CompositeElement () { CompositeElement clone = (CompositeElement)super.clone(); clone.firstChild = null; clone.lastChild = null; clone.myWrapper = null; for (ASTNode child = rawFirstChild(); child != null; child = child.getTreeNext()) { clone.rawAddChildrenWithoutNotifications((TreeElement)child.clone()); } clone.clearCaches(); return clone; }