@Override
    public QueryProfile clone() {
        if (isFrozen()) return this;
        QueryProfile clone = (QueryProfile)super.clone();
        if (variants != null)
            clone.variants = variants.clone();
        if (inherited != null)
            clone.inherited = new ArrayList<>(inherited);

        if (this.content != null)
            clone.content = content.clone();

        return clone;
    }
Returns a clone of this. The clone will not be frozen and will contain copied inherited and content collections
pointing to the same values as this.
container-search/src/main/java/com/yahoo/search/query/profile/QueryProfile.java