@Override
    public CompositeItem clone() {
        CompositeItem copy = (CompositeItem) super.clone();

        copy.subitems = new ArrayList<>(subitems.size());
        for (Item subItem : subitems) {
            Item subItemCopy = subItem.clone();
            subItemCopy.setParent(copy);
            copy.subitems.add(subItemCopy);
        }
        fixConnexity(copy);
        return copy;
    }
Returns a deep copy of this item
container-search/src/main/java/com/yahoo/prelude/query/CompositeItem.java