Buggy code:
public class HttpClient extends AsyncHttpClient { private final String apiUrl ; private final int apiKey ; private HttpClient ( HttpClient . Builder builder ) { } public String createSession ( Map < String , Collection < String > > params ) throws RequestException { } public String getArchive ( String archiveId ) throws RequestException { } public String getArchives ( int offset , int count ) throws RequestException { String responseString = null ; Future < Response > request = null ; String url = ( ( ( this . apiUrl ) + "//v2//partner//" ) + ( this . apiKey ) ) + "//archive" ; if ( ( offset != 0 ) || ( count != 1000 ) ) { url += "?" ; if ( offset != 0 ) { <START_BUG> url += "offset=" + ( Integer . toString ( offset ) ) ; <END_BUG> } if ( count != 1000 ) { url += "count=" + ( Integer . toString ( count ) ) ; } } try { request = this . prepareGet ( url ) . execute ( ) ; } catch ( IOException e ) { throw new RequestException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>OpenTok<seq2seq4repair_space>Archives" , e ) ; } try { Response response = request . get ( ) ; switch ( response . getStatusCode ( ) ) { case 200 : responseString = response . getResponseBody ( ) ; break ; case 403 : throw new RequestException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>OpenTok<seq2seq4repair_space>Archives.<seq2seq4repair_space>The<seq2seq4repair_space>request<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>authorized." ) ; case 500 : throw new RequestException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>OpenTok<seq2seq4repair_space>Archives.<seq2seq4repair_space>A<seq2seq4repair_space>server<seq2seq4repair_space>error<seq2seq4repair_space>occurred." ) ; default : throw new RequestException ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>an<seq2seq4repair_space>OpenTok<seq2seq4repair_space>Archive.<seq2seq4repair_space>The<seq2seq4repair_space>server<seq2seq4repair_space>response<seq2seq4repair_space>was<seq2seq4repair_space>invalid." + "<seq2seq4repair_space>response<seq2seq4repair_space>code:<seq2seq4repair_space>" ) + ( response . getStatusCode ( ) ) ) ) ; } } catch ( InterruptedException e ) { throw new RequestException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>OpenTok<seq2seq4repair_space>Archives" , e ) ; } catch ( ExecutionException e ) { throw new RequestException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>OpenTok<seq2seq4repair_space>Archives" , e ) ; } catch ( IOException e ) { throw new RequestException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>OpenTok<seq2seq4repair_space>Archives" , e ) ; } return responseString ; } public String startArchive ( String sessionId , String name ) throws OpenTokException , RequestException { } public String stopArchive ( String archiveId ) throws RequestException { } public String deleteArchive ( String archiveId ) throws RequestException { } public static class Builder { private final int apiKey ; private final String apiSecret ; private String apiUrl ; private AsyncHttpClientConfig config ; public Builder ( int apiKey , String apiSecret ) { } public HttpClient . Builder apiUrl ( String apiUrl ) { } public HttpClient build ( ) { } } static class PartnerAuthRequestFilter implements RequestFilter { private int apiKey ; private String apiSecret ; public PartnerAuthRequestFilter ( int apiKey , String apiSecret ) { } public FilterContext filter ( FilterContext ctx ) throws FilterException { } } }

Fix:
url += ( "offset=" + ( Integer . toString ( offset ) ) ) + '&' ;