Buggy code:
public class HTTPSamplerFull { private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.protocol.http" ) ; protected static String utfEncodingName ; protected URL baseUrl ; public HTTPSamplerFull ( ) { } public SampleResult sample ( HTTPSampler sampler ) { } protected SampleResult parseForImages ( SampleResult res , HTTPSampler sampler ) { } protected void parseNodes ( Document html , String htmlTag , boolean type , String srcTag , Set uniques , SampleResult res , HTTPSampler sampler ) { } protected byte [ ] loadBinary ( URL url , SampleResult res , HTTPSampler sampler ) throws Exception { HTTPSamplerFull . log . debug ( "Start<seq2seq4repair_space>:<seq2seq4repair_space>loadBinary" ) ; byte [ ] ret = new byte [ 0 ] ; res . setSamplerData ( new HTTPSampler ( url ) . toString ( ) ) ; HttpURLConnection conn ; try { <START_BUG> conn = sampler . setupConnection ( url , GET ) ; <END_BUG> sampler . connect ( ) ; } catch ( Exception ioe ) { if ( HTTPSamplerFull . log . isDebugEnabled ( ) ) { HTTPSamplerFull . log . debug ( ( "loadBinary<seq2seq4repair_space>:<seq2seq4repair_space>error<seq2seq4repair_space>in<seq2seq4repair_space>setupConnection<seq2seq4repair_space>" + ioe ) ) ; } throw ioe ; } try { long time = System . currentTimeMillis ( ) ; if ( HTTPSamplerFull . log . isDebugEnabled ( ) ) { HTTPSamplerFull . log . debug ( ( "loadBinary<seq2seq4repair_space>:<seq2seq4repair_space>start<seq2seq4repair_space>time<seq2seq4repair_space>-<seq2seq4repair_space>" + time ) ) ; } int errorLevel = getErrorLevel ( conn , res ) ; if ( errorLevel == 2 ) { ret = sampler . readResponse ( conn ) ; res . setSuccessful ( true ) ; long endTime = System . currentTimeMillis ( ) ; if ( HTTPSamplerFull . log . isDebugEnabled ( ) ) { HTTPSamplerFull . log . debug ( ( "loadBinary<seq2seq4repair_space>:<seq2seq4repair_space>end<seq2seq4repair_space>time<seq2seq4repair_space>-<seq2seq4repair_space>" + endTime ) ) ; } res . setTime ( ( endTime - time ) ) ; } else { res . setSuccessful ( false ) ; int responseCode = ( ( HttpURLConnection ) ( conn ) ) . getResponseCode ( ) ; String responseMsg = ( ( HttpURLConnection ) ( conn ) ) . getResponseMessage ( ) ; HTTPSamplerFull . log . error ( ( "loadBinary<seq2seq4repair_space>:<seq2seq4repair_space>failed<seq2seq4repair_space>code<seq2seq4repair_space>-<seq2seq4repair_space>" + responseCode ) ) ; HTTPSamplerFull . log . error ( ( "loadBinary<seq2seq4repair_space>:<seq2seq4repair_space>failed<seq2seq4repair_space>message<seq2seq4repair_space>-<seq2seq4repair_space>" + responseMsg ) ) ; } if ( HTTPSamplerFull . log . isDebugEnabled ( ) ) { HTTPSamplerFull . log . debug ( ( ( "loadBinary<seq2seq4repair_space>:<seq2seq4repair_space>binary<seq2seq4repair_space>-<seq2seq4repair_space>" + ( ret [ 0 ] ) ) + ( ret [ 1 ] ) ) ) ; HTTPSamplerFull . log . debug ( ( "loadBinary<seq2seq4repair_space>:<seq2seq4repair_space>loadTime<seq2seq4repair_space>-<seq2seq4repair_space>" + ( res . getTime ( ) ) ) ) ; } HTTPSamplerFull . log . debug ( "End<seq2seq4repair_space>:<seq2seq4repair_space>loadBinary" ) ; res . setResponseData ( ret ) ; res . setDataType ( BINARY ) ; return ret ; } finally { try { sampler . disconnect ( conn ) ; } catch ( Exception e ) { } } } protected int getErrorLevel ( HttpURLConnection conn , SampleResult res ) { } protected static Tidy getParser ( ) { } protected static Node getDOM ( String text ) throws SAXException { } protected static String getUTFEncodingName ( ) { } public static class Test extends TestCase { private HTTPSampler hsf ; private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.test" ) ; public Test ( String name ) { } protected void setUp ( ) { } public void testGetUTFEncodingName ( ) { } public void testGetUrlConfig ( ) { } public void testSampleMain ( ) { } protected void tearDown ( ) { } } }

Fix:
conn = sampler . setupConnection ( url , GET , res ) ;