protected void ensureNotFrozen() {
            if (frozen)
                throw new IllegalStateException(this + " is frozen and cannot be modified");
        }
Throws an IllegalStateException if this is frozen
container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileVariants.java