// if this query is a further refinement of a non-overflowed
// previous query then satisfy it by filtering the previous results
if (!res.getMoreAvailable() &&
request.getQuery().startsWith(res.getQuery()))
{
Pattern pattern = null;
final String queryLower = request.getQuery().toLowerCase();
if (queryLower.indexOf('*') != -1)
pattern = patternForTerm(queryLower);
ArrayList<CodeSearchSuggestion> suggestions =
new ArrayList<CodeSearchSuggestion>();
for (int s=0; s<res.getSuggestions().size(); s++)
{
CodeSearchSuggestion sugg = res.getSuggestions().get(s);
String name = sugg.getMatchedString().toLowerCase();
if (pattern != null)
{
Match match = pattern.match(name, 0);
if (match != null && match.getIndex() == 0)
suggestions.add(sugg);
}
else
{