Buggy code:
public class ToopherApi { private static final String DEFAULT_URI_SCHEME = "https" ; private static final String DEFAULT_URI_HOST = "api.toopher.com" ; private static final String DEFAULT_URI_BASE = "//v1//" ; private static final int DEFAULT_URI_PORT = 443 ; private final HttpClient httpClient ; private final OAuthConsumer consumer ; private final String uriScheme ; private final String uriHost ; private final int uriPort ; private final String uriBase ; public final ToopherApi . AdvancedApiUsageFactory advanced ; public static final String VERSION = "2.0.0" ; public ToopherApi ( String consumerKey , String consumerSecret ) { } public ToopherApi ( String consumerKey , String consumerSecret , String uri ) throws URISyntaxException { } public ToopherApi ( String consumerKey , String consumerSecret , String uriScheme , String uriHost , String uriBase ) throws URISyntaxException { } public ToopherApi ( String consumerKey , String consumerSecret , URI uri ) { } public ToopherApi ( String consumerKey , String consumerSecret , URI uri , HttpClient httpClient ) { } public Pairing pair ( String userName ) throws RequestError , JSONException { } public Pairing pair ( String userName , String pairingPhraseOrNum ) throws RequestError , JSONException { } public Pairing pair ( String userName , String pairingPhraseOrNum , Map < String , String > extras ) throws RequestError , JSONException { } public AuthenticationRequest authenticate ( String pairingIdOrUsername , String terminalNameOrTerminalNameExtra ) throws RequestError , JSONException { } public AuthenticationRequest authenticate ( String pairingIdOrUsername , String terminalNameOrTerminalNameExtra , String actionName ) throws RequestError , JSONException { } public AuthenticationRequest authenticate ( String pairingIdOrUsername , String terminalNameOrTerminalNameExtra , String actionName , Map < String , String > extras ) throws RequestError , JSONException { } public static String getBaseURL ( ) { } private static ResponseHandler < Object > jsonHandler = new ResponseHandler < Object > ( ) { @ Override public Object handleResponse ( HttpResponse response ) throws IOException , ClientProtocolException { } } ; private static ResponseHandler < Object > qrResponseHandler = new ResponseHandler < Object > ( ) { @ Override public Object handleResponse ( HttpResponse response ) throws IOException , ClientProtocolException { } } ; private static void parseRequestError ( StatusLine statusLine , HttpResponse response ) throws RequestError { } class AdvancedApiUsageFactory { public final ToopherApi . AdvancedApiUsageFactory . Pairings pairings ; public final ToopherApi . AdvancedApiUsageFactory . AuthenticationRequests authenticationRequests ; public final ToopherApi . AdvancedApiUsageFactory . Users users ; public final ToopherApi . AdvancedApiUsageFactory . UserTerminals userTerminals ; public final ToopherApi . AdvancedApiUsageFactory . ApiRawRequester raw ; public AdvancedApiUsageFactory ( ToopherApi api ) { } class Pairings { public final ToopherApi api ; public Pairings ( ToopherApi toopherApi ) { } public Pairing getById ( String pairingId ) throws RequestError , JSONException { } } class AuthenticationRequests { public final ToopherApi api ; public AuthenticationRequests ( ToopherApi toopherApi ) { } public AuthenticationRequest getById ( String authenticationRequestId ) throws RequestError , JSONException { } } class Users { public final ToopherApi api ; public Users ( ToopherApi toopherApi ) { } public User create ( String userName ) throws RequestError , JSONException { } public User create ( String userName , Map < String , String > extras ) throws RequestError , JSONException { } public User getById ( String userId ) throws RequestError , JSONException { } public User getByName ( String name ) throws RequestError , JSONException { final String endpoint = "users" ; <START_BUG> List params = new ArrayList < NameValuePair > ( ) ; <END_BUG> params . add ( new BasicNameValuePair ( "name" , name ) ) ; JSONArray result = ( ( JSONArray ) ( advanced . raw . get ( endpoint , params ) ) ) ; if ( ( result . length ( ) ) > 1 ) { throw new RequestError ( String . format ( "More<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>user<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>%s" , name ) ) ; } if ( ( result . length ( ) ) == 0 ) { throw new RequestError ( String . format ( "No<seq2seq4repair_space>users<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>%s" , name ) ) ; } return new User ( result . getJSONObject ( 0 ) , api ) ; } } class UserTerminals { public final ToopherApi api ; public UserTerminals ( ToopherApi toopherApi ) { } public UserTerminal create ( String userName , String terminalName , String requesterSpecifiedId ) throws RequestError , JSONException { } public UserTerminal create ( String userName , String terminalName , String requesterSpecifiedId , Map < String , String > extras ) throws RequestError , JSONException { } public UserTerminal getById ( String terminalId ) throws RequestError , JSONException { } } class ApiRawRequester { public < T > T get ( String endpoint ) throws RequestError , JSONException { } public < T > T get ( String endpoint , List < NameValuePair > params ) throws RequestError , JSONException { } public < T > T get ( String endpoint , List < NameValuePair > params , Map < String , String > extras ) throws RequestError , JSONException { } public < T > T post ( String endpoint ) throws RequestError , JSONException { } public < T > T post ( String endpoint , List < NameValuePair > params ) throws RequestError , JSONException { } public < T > T post ( String endpoint , Map < String , String > extras ) throws RequestError , JSONException { } public < T > T post ( String endpoint , List < NameValuePair > params , Map < String , String > extras ) throws RequestError , JSONException { } private < T > T request ( HttpRequestBase httpRequest , String endpoint , List < NameValuePair > queryStringParameters ) throws RequestError , JSONException { } } } }

Fix:
List < NameValuePair > params = new ArrayList < NameValuePair > ( ) ;