Buggy code:
public class WroManager implements WroConfigurationChangeListener , CacheChangeCallbackAware { private static final Logger LOG = LoggerFactory . getLogger ( WroManager . class ) ; WroModelFactory modelFactory ; private GroupExtractor groupExtractor ; private HashBuilder hashBuilder ; CacheStrategy < CacheEntry , ContentHashEntry > cacheStrategy ; PropertyChangeListener cacheChangeListener ; private final SchedulerHelper cacheSchedulerHelper ; private final SchedulerHelper modelSchedulerHelper ; private ProcessorsFactory processorsFactory ; private UriLocatorFactory uriLocatorFactory ; private NamingStrategy namingStrategy ; @ Inject private LifecycleCallbackRegistry callbackRegistry ; @ Inject private GroupsProcessor groupsProcessor ; public WroManager ( ) { } public final void process ( ) throws IOException { } private boolean isProxyResourceRequest ( ) { } private boolean isGzipAllowed ( ) { } private void serveProcessedBundle ( ) throws IOException { final HttpServletRequest request = Context . get ( ) . getRequest ( ) ; final HttpServletResponse response = Context . get ( ) . getResponse ( ) ; final OutputStream os = response . getOutputStream ( ) ; try { final ResourceType type = groupExtractor . getResourceType ( request ) ; final String groupName = groupExtractor . getGroupName ( request ) ; final boolean minimize = groupExtractor . isMinimized ( request ) ; if ( ( groupName == null ) || ( type == null ) ) { throw new ro . isdc . wro . WroRuntimeException ( ( "No<seq2seq4repair_space>groups<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>request:<seq2seq4repair_space>" + ( request . getRequestURI ( ) ) ) ) ; } initAggregatedFolderPath ( request , type ) ; final WroConfiguration config = Context . get ( ) . getConfig ( ) ; cacheSchedulerHelper . scheduleWithPeriod ( config . getCacheUpdatePeriod ( ) ) ; modelSchedulerHelper . scheduleWithPeriod ( config . getModelUpdatePeriod ( ) ) ; final ContentHashEntry contentHashEntry = getContentHashEntry ( groupName , type , minimize ) ; final String ifNoneMatch = request . getHeader ( IF_NONE_MATCH . toString ( ) ) ; final String etagValue = String . format ( "\"%s\"" , contentHashEntry . getHash ( ) ) ; if ( ( etagValue != null ) && ( etagValue . equals ( ifNoneMatch ) ) ) { WroManager . LOG . debug ( "ETag<seq2seq4repair_space>hash<seq2seq4repair_space>detected:<seq2seq4repair_space>{}.<seq2seq4repair_space>Sending<seq2seq4repair_space>{}<seq2seq4repair_space>status<seq2seq4repair_space>code" , etagValue , SC_NOT_MODIFIED ) ; response . setStatus ( SC_NOT_MODIFIED ) ; return ; } if ( type != null ) { response . setContentType ( ( ( ( type . getContentType ( ) ) + ";<seq2seq4repair_space>charset=" ) + ( Context . get ( ) . getConfig ( ) . getEncoding ( ) ) ) ) ; } if ( ( contentHashEntry . getRawContent ( ) ) != null ) { if ( isGzipAllowed ( ) ) { response . setHeader ( CONTENT_ENCODING . toString ( ) , "gzip" ) ; response . setHeader ( "Vary" , "Accept-Encoding" ) ; IOUtils . write ( contentHashEntry . getGzippedContent ( ) , os ) ; } else { <START_BUG> IOUtils . write ( contentHashEntry . getRawContent ( ) , os ) ; <END_BUG> } } response . setHeader ( ETAG . toString ( ) , etagValue ) ; } finally { IOUtils . closeQuietly ( os ) ; } } private void initAggregatedFolderPath ( final HttpServletRequest request , final ResourceType type ) { } public final String encodeVersionIntoGroupPath ( final String groupName , final ResourceType resourceType , final boolean minimize ) { } protected String formatVersionedResource ( final String hash , final String resourcePath ) { } private ContentHashEntry getContentHashEntry ( final String groupName , final ResourceType type , final boolean minimize ) throws IOException { } ContentHashEntry getContentHashEntryByContent ( final String content ) throws IOException { } private void serveProxyResourceRequest ( ) throws IOException { } public final void onCachePeriodChanged ( final long period ) { } public final void onModelPeriodChanged ( final long period ) { } public final void destroy ( ) { } private void validate ( ) { } public final void registerCacheChangeListener ( final PropertyChangeListener cacheChangeListener ) { } private boolean isGzipSupported ( ) { } public final WroManager setGroupExtractor ( final GroupExtractor groupExtractor ) { } public final WroManager setModelFactory ( final WroModelFactory modelFactory ) { } public final WroManager setCacheStrategy ( final CacheStrategy < CacheEntry , ContentHashEntry > cacheStrategy ) { } public WroManager setHashBuilder ( final HashBuilder contentDigester ) { } public WroModelFactory getModelFactory ( ) { } public ProcessorsFactory getProcessorsFactory ( ) { } public WroManager setProcessorsFactory ( final ProcessorsFactory processorsFactory ) { } public WroManager setUriLocatorFactory ( final UriLocatorFactory uriLocatorFactory ) { } public CacheStrategy < CacheEntry , ContentHashEntry > getCacheStrategy ( ) { } public UriLocatorFactory getUriLocatorFactory ( ) { } public final NamingStrategy getNamingStrategy ( ) { } GroupsProcessor getGroupsProcessor ( ) { } public LifecycleCallbackRegistry getCallbackRegistry ( ) { } public final WroManager setNamingStrategy ( final NamingStrategy namingStrategy ) { } @ Override public String toString ( ) { } No newline ; at end ; of file ; }

Fix:
IOUtils . write ( contentHashEntry . getRawContent ( ) , os , Context . get ( ) . getConfig ( ) . getEncoding ( ) ) ;