public static StringBuilder get(FacesContext context, String key, int initialSize) {
        StringBuilder builder = (StringBuilder) context.getAttributes().get(key);

        if (builder == null) {
            builder = new StringBuilder(initialSize);
            context.getAttributes().put(key, builder);
        }
        else {
            builder.setLength(0);
        }

        return builder;
    }
Get a shared {@link StringBuilder} instance.

@param context The {@link FacesContext}
@param key The key for the {@link FacesContext} attributes.
@param initialSize The initial size for the {@link StringBuilder}.
@return The shared {@link StringBuilder} instance
primefaces/src/main/java/org/primefaces/util/SharedStringBuilder.java