Buggy code:
public class Proxy extends Thread { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final byte [ ] CRLF_BYTES = new byte [ ] { 13 , 10 } ; private static final String CRLF_STRING = "\r\n" ; private static final String NEW_LINE = "\n" ; private static final String [ ] HEADERS_TO_REMOVE ; private static final String PROXY_HEADERS_REMOVE = "proxy.headers.remove" ; private static final String PROXY_HEADERS_REMOVE_DEFAULT = "If-Modified-Since,If-None-Match,Host" ; private static final String PROXY_HEADERS_REMOVE_SEPARATOR = "," ; private static final String KEYMANAGERFACTORY = JMeterUtils . getPropDefault ( "proxy.cert.factory" , "SunX509" ) ; private static final String SSLCONTEXT_PROTOCOL = JMeterUtils . getPropDefault ( "proxy.ssl.protocol" , "SSLv3" ) ; private static final HashMap < String , SSLSocketFactory > HOST2SSL_SOCK_FAC = new HashMap < String , SSLSocketFactory > ( ) ; private static final SamplerCreatorFactory SAMPLERFACTORY = new SamplerCreatorFactory ( ) ; private OutputStream outStreamClient = null ; private Socket clientSocket = null ; private ProxyControl target ; private boolean captureHttpHeaders ; private Map < String , String > pageEncodings ; private Map < String , String > formEncodings ; private String port ; private KeyStore keyStore ; private String keyPassword ; public Proxy ( ) { } void configure ( Socket _clientSocket , ProxyControl _target , Map < String , String > _pageEncodings , Map < String , String > _formEncodings ) { } @ Override public void run ( ) { String httpSamplerName = target . getSamplerTypeName ( ) ; HttpRequestHdr request = new HttpRequestHdr ( httpSamplerName ) ; SampleResult result = null ; HeaderManager headers = null ; HTTPSamplerBase sampler = null ; Proxy . log . debug ( ( ( port ) + "====================================================================" ) ) ; try { byte [ ] ba = request . parse ( new BufferedInputStream ( clientSocket . getInputStream ( ) ) ) ; if ( ( ba . length ) == 0 ) { <START_BUG> Proxy . log . warn ( ( ( port ) + "Empty<seq2seq4repair_space>request,<seq2seq4repair_space>ignored" ) ) ; <END_BUG> throw new JMeterException ( ) ; } if ( Proxy . log . isDebugEnabled ( ) ) { Proxy . log . debug ( ( ( ( port ) + "Initial<seq2seq4repair_space>request:<seq2seq4repair_space>" ) + ( new String ( ba ) ) ) ) ; } outStreamClient = clientSocket . getOutputStream ( ) ; if ( ( request . getMethod ( ) . startsWith ( CONNECT ) ) && ( ( outStreamClient ) != null ) ) { Proxy . log . debug ( ( ( port ) + "Method<seq2seq4repair_space>CONNECT<seq2seq4repair_space>=><seq2seq4repair_space>SSL" ) ) ; outStreamClient . write ( "HTTP//1.0<seq2seq4repair_space>200<seq2seq4repair_space>OK\r\n\r\n" . getBytes ( DEFAULT_HTTP_ENCODING ) ) ; outStreamClient . flush ( ) ; String [ ] param = request . getUrl ( ) . split ( ":" ) ; if ( ( param . length ) == 2 ) { Proxy . log . debug ( ( ( ( port ) + "Start<seq2seq4repair_space>to<seq2seq4repair_space>negotiate<seq2seq4repair_space>SSL<seq2seq4repair_space>connection,<seq2seq4repair_space>host:<seq2seq4repair_space>" ) + ( param [ 0 ] ) ) ) ; clientSocket = startSSL ( clientSocket , param [ 0 ] ) ; } else { Proxy . log . error ( ( "In<seq2seq4repair_space>SSL<seq2seq4repair_space>request,<seq2seq4repair_space>unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>host<seq2seq4repair_space>and<seq2seq4repair_space>port<seq2seq4repair_space>in<seq2seq4repair_space>CONNECT<seq2seq4repair_space>request:<seq2seq4repair_space>" + ( request . getUrl ( ) ) ) ) ; throw new JMeterException ( ) ; } try { ba = request . parse ( new BufferedInputStream ( clientSocket . getInputStream ( ) ) ) ; } catch ( IOException ioe ) { final String url = ( ( param . length ) > 0 ) ? ( "<seq2seq4repair_space>for<seq2seq4repair_space>'" + ( param [ 0 ] ) ) + "'" : "" ; Proxy . log . warn ( ( ( ( ( ( port ) + "Problem<seq2seq4repair_space>with<seq2seq4repair_space>SSL<seq2seq4repair_space>certificate" ) + url ) + "?<seq2seq4repair_space>Ensure<seq2seq4repair_space>browser<seq2seq4repair_space>is<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>accept<seq2seq4repair_space>the<seq2seq4repair_space>JMeter<seq2seq4repair_space>proxy<seq2seq4repair_space>cert:<seq2seq4repair_space>" ) + ( ioe . getMessage ( ) ) ) ) ; result = Proxy . generateErrorResult ( result , request , ioe , "\n**ensure<seq2seq4repair_space>browser<seq2seq4repair_space>is<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>accept<seq2seq4repair_space>the<seq2seq4repair_space>JMeter<seq2seq4repair_space>proxy<seq2seq4repair_space>certificate**" ) ; throw new JMeterException ( ) ; } if ( Proxy . log . isDebugEnabled ( ) ) { Proxy . log . debug ( ( ( ( port ) + "Reparse:<seq2seq4repair_space>" ) + ( new String ( ba ) ) ) ) ; } if ( ( ba . length ) == 0 ) { Proxy . log . warn ( ( ( ( port ) + "Empty<seq2seq4repair_space>response<seq2seq4repair_space>to<seq2seq4repair_space>http<seq2seq4repair_space>over<seq2seq4repair_space>SSL.<seq2seq4repair_space>Probably<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>user<seq2seq4repair_space>to<seq2seq4repair_space>authorize<seq2seq4repair_space>the<seq2seq4repair_space>certificate<seq2seq4repair_space>for<seq2seq4repair_space>" ) + ( request . getUrl ( ) ) ) ) ; throw new JMeterException ( ) ; } } SamplerCreator samplerCreator = Proxy . SAMPLERFACTORY . getSamplerCreator ( request , pageEncodings , formEncodings ) ; sampler = samplerCreator . createAndPopulateSampler ( request , pageEncodings , formEncodings ) ; headers = request . getHeaderManager ( ) ; sampler . setHeaderManager ( headers ) ; sampler . threadStarted ( ) ; if ( Proxy . log . isDebugEnabled ( ) ) { Proxy . log . debug ( ( ( ( ( ( port ) + "Execute<seq2seq4repair_space>sample:<seq2seq4repair_space>" ) + ( sampler . getMethod ( ) ) ) + "<seq2seq4repair_space>" ) + ( sampler . getUrl ( ) ) ) ) ; } result = sampler . sample ( ) ; String pageEncoding = addPageEncoding ( result ) ; addFormEncodings ( result , pageEncoding ) ; writeToClient ( result , new BufferedOutputStream ( clientSocket . getOutputStream ( ) ) ) ; samplerCreator . postProcessSampler ( sampler , result ) ; } catch ( JMeterException jme ) { } catch ( UnknownHostException uhe ) { Proxy . log . warn ( ( ( port ) + "Server<seq2seq4repair_space>Not<seq2seq4repair_space>Found." ) , uhe ) ; writeErrorToClient ( HttpReplyHdr . formServerNotFound ( ) ) ; result = generateErrorResult ( result , request , uhe ) ; } catch ( IllegalArgumentException e ) { Proxy . log . error ( ( ( port ) + "Not<seq2seq4repair_space>implemented<seq2seq4repair_space>(probably<seq2seq4repair_space>used<seq2seq4repair_space>https)" ) , e ) ; writeErrorToClient ( HttpReplyHdr . formNotImplemented ( ( "Probably<seq2seq4repair_space>used<seq2seq4repair_space>https<seq2seq4repair_space>instead<seq2seq4repair_space>of<seq2seq4repair_space>http.<seq2seq4repair_space>" + ( "To<seq2seq4repair_space>record<seq2seq4repair_space>https<seq2seq4repair_space>requests,<seq2seq4repair_space>see<seq2seq4repair_space>" + "<a<seq2seq4repair_space>href=\"http:////jmeter.apache.org//usermanual//component_reference.html#HTTP(S)_Test_Script_Recorder\">HTTP(S)<seq2seq4repair_space>Test<seq2seq4repair_space>Script<seq2seq4repair_space>Recorder<seq2seq4repair_space>documentation<//a>" ) ) ) ) ; result = generateErrorResult ( result , request , e ) ; }

Fix:
Proxy . log . info ( ( ( port ) + "Empty<seq2seq4repair_space>request,<seq2seq4repair_space>ignored" ) ) ;