question: protected StringBuilder appendSearchStringParamIfNecessary ( StringBuilder sb ) { String searchStringParam = getEncodedSearchStringParam ( ) ; if ( searchStringParam != null ) { if ( sb . indexOf ( "?" ) == - 1 ) { sb . append ( '?' ) ; } else { sb . append ( '&' ) ; } sb . append ( searchStringParam ) ; } return sb ; }
target:  If a search has been executed, appends a URL-encoded String representation of the search criteria to the given StringBuilder, as a GET parameter. The StringBuilder's contents are modified.