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;
    }
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.
This is required as e.g. 100 e.g. {@link org.primefaces.expression.SearchExpressionFacade#resolveClientId} calls would create
300 {@link StringBuilder} instances!

@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