<BUG>if(context.containsKey("term")) {String term = context.getString("term");</BUG><CONTEXT>int offset = context.getInteger("OFFSET");PrintWriter pw = context.get("SERVLET_WRITER", PrintWriter.class);int limit = Integer.parseInt(properties.getProperty("DocBrowserLimit"));BestDocumentsForGivenTopic bestDocAction;<extra_id_0>bestDocAction = new BestDocumentsForGivenTopic(topicId, limit, offset, database, pw, term, Arrays.asList(properties.get("plugins").toString().split(",")).contains("hierarchicaltopic"));} else {bestDocAction = new BestDocumentsForGivenTopic(topicId, limit, offset, database, pw);</CONTEXT>
MySQLEncoder me = new MySQLEncoder();String term = me.encode(context.getString("term"));