boolean reversed = false;
boolean json = false;
int maxlines = 400, lines = 200;
String filter = ".*.*";
if(post != null){
<BUG>reversed = (post.containsKey("mode") && (post.get("mode")).equals("reversed"));

json = post.containsKey("json");
if(post.containsKey("lines")){</BUG>
lines = Integer.parseInt(post.get("lines"));

boolean reversed = false;
boolean json = false;
int maxlines = 400, lines = 200;
String filter = ".*.*";
if(post != null){
if(post.containsKey("mode") && (post.get("mode")).equals("reversed")){
reversed=true;
