anchor.diff:                              + " '20130000000000'\n"
                               + "else\n"
                               + " $crawlerStats/@timestamp/string()\n"
  +                            + "let $maxMemory := if (empty($crawlerStats/@maxMemory)) then \n"
  +                            + " '0'\n"
  +                            + "else\n"
  +                            + " string(($crawlerStats/@maxMemory) div 1048576.0)\n"
                               + "let $jsDateTime := string-join(('new Date(', substring($dateTime, 1, 4), ',', substring($dateTime, 5, 2), ',', substring($dateTime, 7, 2), ',', substring($dateTime, 9, 2), ',', substring($dateTime, 11, 2), ',', substring($dateTime, 13, 2),')'),'')\n"
                               + "let $linkcount := $crawlerStats/@linkcount/string()\n"
                               + "let $documentcount := $crawlerStats/@documentcount/string()\n"
                               + "let $querytime := string($crawlerStats/@queryms)\n"
                               + "let $freebytes := string(($crawlerStats/@freebytes) div 1048576.0)\n"
                               + "let $totalbytes := string(($crawlerStats/@totalbytes) div 1048576.0)\n"
  -                            + "return (',[',string-join(($jsDateTime,$linkcount,$documentcount,$querytime,$freebytes,$totalbytes),','),']'),']')\n";
  +                            + "return (',[',string-join(($jsDateTime,$linkcount,$documentcount,$querytime,$freebytes,$totalbytes,$maxMemory),','),']'),']')\n";
                       try {
                           RestDbAdaptor restDbAdaptor = new RestDbAdaptor(new URL(basexRestUrl), DataBaseManager.guestUser, DataBaseManager.guestUserPass);
                           jsonDataDetailed = restDbAdaptor.executeQuery(DataBaseManager.defaultDataBase, queryStringDetailed);
  
positive.code:                 String errorMessage2 = "";
                  if (request.getParameter("databaseName") != null) {
                      String jsonDataDetailed = "[[0,0,0,0]]";
                      String queryStringDetailed = " ('[[0,0,0,0]',\n" //[''timestamp'', ''linkcount'', ''documentcount'', ''queryms'']',\n"
                              + "let $dbName := '" + request.getParameter("databaseName") + "'\n"
                              + "for $crawlerStats in collection($dbName)/CrawlerStats\n"
                              // this order by seems to cause problems which might depend on which basex version is being used: + "order by $crawlerStats/@timestamp/string()\n"
  
negative.code:             <%
                  String errorMessage1 = "";
                  String jsonData = "[[0][0]]";;
                  String queryString = " ('[[''DB'', ''Date Crawled'', ''Time Taken (hours.minutes)'', ''Time Per Document'', ''Document Count'']',\n"
                          + "for $dbName in db:list()\n"
                          //                        + " where $dbName != '" + DataBaseManager.defaultDataBase + "'\n"
                          + "let $minDate := if (empty(collection($dbName)/CrawlerStats/@timestamp)) then \n"
  