<commit_before>$(function() {
   $('#doExplain').click(function() {
        explainDb = $('#explainDb option:selected').val();
        checksum = $('#checksum').val();
        $.ajax({
            url: 'explain.php',
            data : {
                checksum: checksum,
                explainDb: explainDb
            },

            success: function(data) {
                $('#normalizedQuery').html(data.Query);
                $('#explainPlan').dataTable().fnClearTable();
                if (typeof data.Warnings != 'undefined') {
                  $('#dialogWarning').text('');
                  for (var i=0; i < data.Warnings.length; i++) {
                     var line = data.Warnings[i].Level + ' ['+data.Warnings[i].Code+'] '+data.Warnings[i].Message+"\n";
                     $('#dialogWarning').text($('#dialogWarning').text() + line);
                  }
                  $('#dialogWarning').dialog('open');
                }
                if (typeof data.Explain != 'undefined') {
                  for (var i=0; i < data.Explain.length; i++) {
                      ret = $('#explainPlan').dataTable().fnAddData([
                          data.Explain[i].id,
                          data.Explain[i].select_type,
                          $(data.Explain[i].table),
                          data.Explain[i].type,
                          data.Explain[i].possible_keys,
                          data.Explain[i].key,
                          data.Explain[i].key_len,
                          data.Explain[i].ref,
                          data.Explain[i].rows,
                          data.Explain[i].Extra
                      ], true);
                  }
                }
                $('#explainAccordion').accordion( "resize" );<commit_msg>Fix an issue with the tables being a js object<commit_after>$(function() {
   $('#doExplain').click(function() {
        explainDb = $('#explainDb option:selected').val();
        checksum = $('#checksum').val();
        $.ajax({
            url: 'explain.php',
            data : {
                checksum: checksum,
                explainDb: explainDb
            },

            success: function(data) {
                $('#normalizedQuery').html(data.Query);
                $('#explainPlan').dataTable().fnClearTable();
                if (typeof data.Warnings != 'undefined') {
                  $('#dialogWarning').text('');
                  for (var i=0; i < data.Warnings.length; i++) {
                     var line = data.Warnings[i].Level + ' ['+data.Warnings[i].Code+'] '+data.Warnings[i].Message+"\n";
                     $('#dialogWarning').text($('#dialogWarning').text() + line);
                  }
                  $('#dialogWarning').dialog('open');
                }
                if (typeof data.Explain != 'undefined') {
                  for (var i=0; i < data.Explain.length; i++) {
                      ret = $('#explainPlan').dataTable().fnAddData([
                          data.Explain[i].id,
                          data.Explain[i].select_type,
                          data.Explain[i].table,
                          data.Explain[i].type,
                          data.Explain[i].possible_keys,
                          data.Explain[i].key,
                          data.Explain[i].key_len,
                          data.Explain[i].ref,
                          data.Explain[i].rows,
                          data.Explain[i].Extra
                      ], true);
                  }
                }
                $('#explainAccordion').accordion( "resize" );
{'fraction_non_alphanumeric': 0.15545050055617352, 'fraction_numerical': 0.0011123470522803114, 'mean_word_length': 1.2013463892288863, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7005832', 'n_tokens_mistral': 933, 'n_tokens_neox': 916, 'n_words': 135}