private Object cloneByReflection(Object object) {
        try {
            Method cloneMethod = cloneMethodCache.get(object, name -> log.warning("Caching the clone method of '" + name + "'. Let it implement com.yahoo.lang.PublicCloneable instead"));
            if (cloneMethod == null) {
                log.warning("'" + object + "' of class " + object.getClass() +
                            " is Cloneable, but has no clone method - will use the same instance in all requests");
                return null;
            }
            return cloneMethod.invoke(object);
        } catch (IllegalAccessException e) {
            log.warning("'" + object + "' of class " + object.getClass() +
                        " is Cloneable, but clone method cannot be accessed - will use the same instance in all requests");
            return null;
        } catch (InvocationTargetException e) {
            throw new RuntimeException("Exception cloning '" + object + "'", e);
        }
    }
Clones this object if it is clonable, and the clone is public. Returns null if not.
container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java