Buggy code:
public void setProtocol ( String value ) { } public String getProtocol ( ) { } public void setPath ( String path ) { } public void setPath ( String path , String contentEncoding ) { } public String getPath ( ) { } public void setFollowRedirects ( boolean value ) { } public boolean getFollowRedirects ( ) { } public void setAutoRedirects ( boolean value ) { } public boolean getAutoRedirects ( ) { } public void setMethod ( String value ) { } public String getMethod ( ) { } public void setContentEncoding ( String charsetName ) { } public String getContentEncoding ( ) { } public void setUseKeepAlive ( boolean value ) { } public boolean getUseKeepAlive ( ) { } public void setDoMultipartPost ( boolean value ) { } public boolean getDoMultipartPost ( ) { } public void setDoBrowserCompatibleMultipart ( boolean value ) { } public boolean getDoBrowserCompatibleMultipart ( ) { } public void setMonitor ( String value ) { } public void setMonitor ( boolean truth ) { } public String getMonitor ( ) { } public boolean isMonitor ( ) { } public void setImplementation ( String value ) { } public String getImplementation ( ) { } public boolean useMD5 ( ) { } public void setMD5 ( boolean truth ) { } public void addEncodedArgument ( String name , String value ) { } public void addEncodedArgument ( String name , String value , String metaData , String contentEncoding ) { } public void addEncodedArgument ( String name , String value , String metaData ) { } public void addNonEncodedArgument ( String name , String value , String metadata ) { } public void addArgument ( String name , String value ) { } public void addArgument ( String name , String value , String metadata ) { } public boolean hasArguments ( ) { } @ Override public void addTestElement ( TestElement el ) { } @ Override public void clearTestElementChildren ( ) { } public void setPort ( int value ) { } public static int getDefaultPort ( String protocol , int port ) { } public int getPortIfSpecified ( ) { } public boolean isProtocolDefaultPort ( ) { } public int getPort ( ) { } public void setDomain ( String value ) { } public String getDomain ( ) { } public void setConnectTimeout ( String value ) { } public int getConnectTimeout ( ) { } public void setResponseTimeout ( String value ) { } public int getResponseTimeout ( ) { } public String getProxyHost ( ) { } public int getProxyPortInt ( ) { } public String getProxyUser ( ) { } public String getProxyPass ( ) { } public void setArguments ( Arguments value ) { } public Arguments getArguments ( ) { } public void setPostBodyRaw ( boolean value ) { } public boolean getPostBodyRaw ( ) { } 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 setCacheManager ( CacheManager value ) { } public CacheManager getCacheManager ( ) { } public boolean isImageParser ( ) { } public void setImageParser ( boolean parseImages ) { } public String getEmbeddedUrlRE ( ) { } public void setEmbeddedUrlRE ( String regex ) { } protected HTTPSampleResult errorResult ( Throwable e , HTTPSampleResult res ) { } private static final String HTTP_PREFIX = ( HTTPConstants . PROTOCOL_HTTP ) + ":////" ; private static final String HTTPS_PREFIX = ( HTTPConstants . PROTOCOL_HTTPS ) + ":////" ; private static final boolean SEPARATE_CONTAINER = JMeterUtils . getPropDefault ( "httpsampler.separate.container" , true ) ; public java . net . URL getUrl ( ) throws MalformedURLException { } public String getQueryString ( ) { } public String getQueryString ( String contentEncoding ) { <START_BUG> if ( ( contentEncoding == null ) || ( ( contentEncoding . trim ( ) . length ( ) ) == 0 ) ) { <END_BUG> contentEncoding = EncoderCache . URL_ARGUMENT_ENCODING ; } StringBuilder buf = new StringBuilder ( ) ; PropertyIterator iter = getArguments ( ) . iterator ( ) ; boolean first = true ; while ( iter . hasNext ( ) ) { HTTPArgument item = null ; Object objectValue = iter . next ( ) . getObjectValue ( ) ; try { item = ( ( HTTPArgument ) ( objectValue ) ) ; } catch ( ClassCastException e ) { HTTPSamplerBase . log . warn ( ( "Unexpected<seq2seq4repair_space>argument<seq2seq4repair_space>type:<seq2seq4repair_space>" + ( objectValue . getClass ( ) . getName ( ) ) ) ) ; item = new HTTPArgument ( ( ( Argument ) ( objectValue ) ) ) ; } final String encodedName = item . getEncodedName ( ) ; if ( ( encodedName . length ( ) ) == 0 ) { continue ; } if ( ! first ) { buf . append ( HTTPSamplerBase . QRY_SEP ) ; } else { first = false ; } buf . append ( encodedName ) ; if ( ( item . getMetaData ( ) ) == null ) { buf . append ( HTTPSamplerBase . ARG_VAL_SEP ) ; } else { buf . append ( item . getMetaData ( ) ) ; } try { buf . append ( item . getEncodedValue ( contentEncoding ) ) ; } catch ( UnsupportedEncodingException e ) { HTTPSamplerBase . log . warn ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>encode<seq2seq4repair_space>parameter<seq2seq4repair_space>in<seq2seq4repair_space>encoding<seq2seq4repair_space>" + contentEncoding ) + ",<seq2seq4repair_space>parameter<seq2seq4repair_space>value<seq2seq4repair_space>not<seq2seq4repair_space>included<seq2seq4repair_space>in<seq2seq4repair_space>query<seq2seq4repair_space>string" ) ) ; } } return buf . toString ( ) ; } public void parseArguments ( String queryString , String contentEncoding ) { } public void parseArguments ( String queryString ) { } @ Override public String toString ( ) { } public SampleResult sample ( Entry e ) { } public SampleResult sample ( ) { }

Fix:
if ( JOrphanUtils . isBlank ( contentEncoding ) ) {