Buggy code:
} else if ( method . equals ( TRACE ) ) { httpRequest = new HttpTrace ( uri ) ; } else if ( method . equals ( OPTIONS ) ) { httpRequest = new HttpOptions ( uri ) ; } else if ( method . equals ( DELETE ) ) { httpRequest = new HTTPHC4Impl . HttpDelete ( uri ) ; } else if ( method . equals ( GET ) ) { httpRequest = new HttpGet ( uri ) ; } else if ( method . equals ( PATCH ) ) { httpRequest = new HttpPatch ( uri ) ; } else { throw new IllegalArgumentException ( ( ( "Unexpected<seq2seq4repair_space>method:<seq2seq4repair_space>'" + method ) + "'" ) ) ; } setupRequest ( url , httpRequest , res ) ; } catch ( Exception e ) { res . sampleStart ( ) ; res . sampleEnd ( ) ; errorResult ( e , res ) ; return res ; } HttpContext localContext = new BasicHttpContext ( ) ; res . sampleStart ( ) ; final CacheManager cacheManager = getCacheManager ( ) ; if ( ( cacheManager != null ) && ( GET . equalsIgnoreCase ( method ) ) ) { if ( cacheManager . inCache ( url ) ) { res . sampleEnd ( ) ; res . setResponseNoContent ( ) ; res . setSuccessful ( true ) ; return res ; } } try { currentRequest = httpRequest ; handleMethod ( method , res , httpRequest , localContext ) ; HttpResponse httpResponse = executeRequest ( httpClient , httpRequest , localContext , url ) ; final HttpRequest request = ( ( HttpRequest ) ( localContext . getAttribute ( HTTP_REQUEST ) ) ) ; final InetAddress localAddr = ( ( InetAddress ) ( httpRequest . getParams ( ) . getParameter ( LOCAL_ADDRESS ) ) ) ; if ( localAddr != null ) { request . addHeader ( HEADER_LOCAL_ADDRESS , localAddr . toString ( ) ) ; } res . setRequestHeaders ( getConnectionHeaders ( request ) ) ; Header contentType = httpResponse . getLastHeader ( HEADER_CONTENT_TYPE ) ; if ( contentType != null ) { String ct = contentType . getValue ( ) ; res . setContentType ( ct ) ; res . setEncodingAndType ( ct ) ; } HttpEntity entity = httpResponse . getEntity ( ) ; if ( entity != null ) { InputStream instream = entity . getContent ( ) ; res . setResponseData ( readResponse ( res , instream , ( ( int ) ( entity . getContentLength ( ) ) ) ) ) ; } res . sampleEnd ( ) ; currentRequest = null ; StatusLine statusLine = httpResponse . getStatusLine ( ) ; int statusCode = statusLine . getStatusCode ( ) ; res . setResponseCode ( Integer . toString ( statusCode ) ) ; res . setResponseMessage ( statusLine . getReasonPhrase ( ) ) ; res . setSuccessful ( isSuccessCode ( statusCode ) ) ; res . setResponseHeaders ( getResponseHeaders ( httpResponse ) ) ; if ( res . isRedirect ( ) ) { final Header headerLocation = httpResponse . getLastHeader ( HEADER_LOCATION ) ; if ( headerLocation == null ) { throw new IllegalArgumentException ( ( "Missing<seq2seq4repair_space>location<seq2seq4repair_space>header<seq2seq4repair_space>in<seq2seq4repair_space>redirect<seq2seq4repair_space>for<seq2seq4repair_space>" + ( httpRequest . getRequestLine ( ) ) ) ) ; } final String redirectLocation = headerLocation . getValue ( ) ; try { final URL redirectUrl = new URL ( redirectLocation ) ; res . setRedirectLocation ( ConversionUtils . sanitizeUrl ( redirectUrl ) . toString ( ) ) ; } catch ( Exception e ) { <START_BUG> HTTPHC4Impl . log . error ( ( ( ( ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>redirect<seq2seq4repair_space>URL<seq2seq4repair_space>for<seq2seq4repair_space>" + ( httpRequest . getRequestLine ( ) ) ) + ",<seq2seq4repair_space>Error<seq2seq4repair_space>sanitizing<seq2seq4repair_space>redirect<seq2seq4repair_space>URL:<seq2seq4repair_space>" ) + redirectLocation ) + "\n\t" ) , e ) ; <END_BUG> } } HttpConnectionMetrics metrics = ( ( HttpConnectionMetrics ) ( localContext . getAttribute ( HTTPHC4Impl . CONTEXT_METRICS ) ) ) ; long headerBytes = ( ( ( res . getResponseHeaders ( ) . length ( ) ) + ( httpResponse . getAllHeaders ( ) . length ) ) + 1 ) + 2 ; long totalBytes = metrics . getReceivedBytesCount ( ) ; res . setHeadersSize ( ( ( int ) ( headerBytes ) ) ) ; res . setBodySize ( ( ( int ) ( totalBytes - headerBytes ) ) ) ; if ( HTTPHC4Impl . log . isDebugEnabled ( ) ) { HTTPHC4Impl . log . debug ( ( ( ( ( ( "ResponseHeadersSize=" + ( res . getHeadersSize ( ) ) ) + "<seq2seq4repair_space>Content-Length=" ) + ( res . getBodySize ( ) ) ) + "<seq2seq4repair_space>Total=" ) + ( ( res . getHeadersSize ( ) ) + ( res . getBodySize ( ) ) ) ) ) ; } if ( getAutoRedirects ( ) ) { HttpUriRequest req = ( ( HttpUriRequest ) ( localContext . getAttribute ( HTTP_REQUEST ) ) ) ; HttpHost target = ( ( HttpHost ) ( localContext . getAttribute ( HTTP_TARGET_HOST ) ) ) ; URI redirectURI = req . getURI ( ) ; if ( redirectURI . isAbsolute ( ) ) { res . setURL ( redirectURI . toURL ( ) ) ; } else { res . setURL ( new URL ( new URL ( target . toURI ( ) ) , redirectURI . toString ( ) ) ) ; } } saveConnectionCookies ( httpResponse , res . getURL ( ) , getCookieManager ( ) ) ; if ( cacheManager != null ) { cacheManager . saveDetails ( httpResponse , res ) ; } res = resultProcessing ( areFollowingRedirect , frameDepth , res ) ; } catch ( IOException e ) { res . sampleEnd ( ) ; res . setRequestHeaders ( getConnectionHeaders ( ( ( HttpRequest ) ( localContext . getAttribute ( HTTP_REQUEST ) ) ) ) ) ; errorResult ( e , res ) ; return res ; } catch ( RuntimeException e ) { res . sampleEnd ( ) ; errorResult ( e , res ) ; return res ; }

Fix:
HTTPHC4Impl . log . error ( ( ( ( ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>redirect<seq2seq4repair_space>URL<seq2seq4repair_space>for<seq2seq4repair_space>" + ( httpRequest . getRequestLine ( ) ) ) + "\n\tCould<seq2seq4repair_space>not<seq2seq4repair_space>sanitize<seq2seq4repair_space>URL:<seq2seq4repair_space>" ) + redirectLocation ) + "\n\t" ) , e ) ;