Buggy code:
public String getFilename ( ) { } public void setProtocol ( String value ) { } public String getProtocol ( ) { } public void setPath ( String path ) { } public void setEncodedPath ( String path ) { } private String encodePath ( String path ) { } public String getEncodedPath ( ) { } public void setProperty ( JMeterProperty prop ) { } public void addProperty ( JMeterProperty prop ) { } public String getPath ( ) { } public void setFollowRedirects ( boolean value ) { } public boolean getFollowRedirects ( ) { } public void setMethod ( String value ) { } public String getMethod ( ) { } public void setUseKeepAlive ( boolean value ) { } public boolean getUseKeepAlive ( ) { } public void addEncodedArgument ( String name , String value , String metaData ) { } public void addArgument ( String name , String value ) { } public void addArgument ( String name , String value , String metadata ) { } public void setPort ( int value ) { } public int getPort ( ) { } public void setDomain ( String value ) { } public String getDomain ( ) { } public void setArguments ( Arguments value ) { } public Arguments getArguments ( ) { } public void setAuthManager ( AuthManager value ) { } public AuthManager getAuthManager ( ) { } public void setHeaderManager ( HeaderManager value ) { } public HeaderManager getHeaderManager ( ) { } public void setCookieManager ( CookieManager value ) { } public CookieManager getCookieManager ( ) { } public void setMimetype ( String value ) { } public String getMimetype ( ) { } protected static final String NON_HTTP_RESPONSE_CODE = "Non<seq2seq4repair_space>HTTP<seq2seq4repair_space>response<seq2seq4repair_space>code" ; protected static final String NON_HTTP_RESPONSE_MESSAGE = "Non<seq2seq4repair_space>HTTP<seq2seq4repair_space>response<seq2seq4repair_space>message" ; private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.protocol.http" ) ; private ArrayList m_sampledURLs = new ArrayList ( ) ; public HTTPSampler ( ) { } public HTTPSampler ( java . net . URL u ) { } public SampleResult sample ( Entry e ) { } public SampleResult sample ( ) { } public java . net . URL getUrl ( ) throws MalformedURLException { } public String getQueryString ( ) { } public void setPostHeaders ( URLConnection conn ) throws IOException { } public void sendPostData ( URLConnection connection ) throws IOException { } protected HttpURLConnection setupConnection ( java . net . URL u , String method ) throws IOException { } public void parseArguments ( String queryString ) { } protected byte [ ] readResponse ( HttpURLConnection conn ) throws IOException { } protected byte [ ] getResponseHeaders ( HttpURLConnection conn , SampleResult res ) throws IOException { } private void setConnectionCookie ( HttpURLConnection conn , java . net . URL u , CookieManager cookieManager ) { } private void setConnectionHeaders ( HttpURLConnection conn , java . net . URL u , HeaderManager headerManager ) { } private void setConnectionAuthorization ( HttpURLConnection conn , java . net . URL u , AuthManager authManager ) { } private int getErrorLevel ( HttpURLConnection conn , SampleResult res , long time ) throws IOException { } public void removeArguments ( ) { } private void redirectUrl ( HttpURLConnection conn , java . net . URL u ) throws MalformedURLException { } protected long connect ( ) throws IOException { } private SampleResult sample ( int redirects ) { HTTPSampler . log . debug ( "Start<seq2seq4repair_space>:<seq2seq4repair_space>sample2" ) ; long time = System . currentTimeMillis ( ) ; SampleResult res = new SampleResult ( ) ; HTTPSampler . log . debug ( ( "#4,<seq2seq4repair_space>encoded<seq2seq4repair_space>path<seq2seq4repair_space>=<seq2seq4repair_space>" + ( getEncodedPath ( ) ) ) ) ; java . net . URL u = null ; try { u = getUrl ( ) ; res . setSampleLabel ( getName ( ) ) ; res . setSamplerData ( this . toString ( ) ) ; if ( HTTPSampler . log . isDebugEnabled ( ) ) { HTTPSampler . log . debug ( ( "sample2<seq2seq4repair_space>:<seq2seq4repair_space>sampling<seq2seq4repair_space>url<seq2seq4repair_space>-<seq2seq4repair_space>" + u ) ) ; } conn = setupConnection ( u , getMethod ( ) ) ; <START_BUG> if ( getProperty ( HTTPSampler . METHOD ) . equals ( HTTPSampler . POST ) ) { <END_BUG> setPostHeaders ( conn ) ; time = connect ( ) ; sendPostData ( conn ) ; } else time = connect ( ) ; saveConnectionCookies ( conn , u , getCookieManager ( ) ) ; int errorLevel = 0 ; try { errorLevel = getErrorLevel ( conn , res , time ) ; } catch ( IOException e ) { time = bundleResponseInResult ( time , res , conn ) ; res . setSuccessful ( false ) ; res . setTime ( time ) ; return res ; } if ( ( ( errorLevel // 100 ) == 2 ) || ( errorLevel == 304 ) ) { time = bundleResponseInResult ( time , res , conn ) ; } else if ( ( errorLevel // 100 ) == 3 ) { if ( redirects >= ( HTTPSampler . MAX_REDIRECTS ) ) { throw new IOException ( "Maximum<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>redirects<seq2seq4repair_space>exceeded" ) ; } if ( ! ( getFollowRedirects ( ) ) ) { time = bundleResponseInResult ( time , res , conn ) ; } else { time = ( System . currentTimeMillis ( ) ) - time ; HTTPSampler redirect = ( ( HTTPSampler ) ( this . clone ( ) ) ) ; redirect . redirectUrl ( conn , u ) ; SampleResult redirectResult = redirect . sample ( ( redirects + 1 ) ) ; res . addSubResult ( redirectResult ) ; res . setResponseData ( redirectResult . getResponseData ( ) ) ; res . setSuccessful ( redirectResult . isSuccessful ( ) ) ; time += redirectResult . getTime ( ) ; } } else { time = bundleResponseInResult ( time , res , conn ) ; res . setSuccessful ( false ) ; }

Fix:
if ( getMethod ( ) . equals ( HTTPSampler . POST ) ) {