<commit_before>var Utilities = (function () {
    function Utilities() {
    }
    Utilities.toRow = function (name, value) {
        var div = document.createElement("div");
        div.className = "row erow col-s-12";

        var namediv = document.createElement("div");
        namediv.className = "col-xs-4";
        var strong = document.createElement("strong");
        strong.textContent = name ? name.toString() : "NaN";
        namediv.appendChild(strong);

        var valuediv = document.createElement("div");
        valuediv.className = "col-xs-8";
        valuediv.textContent = typeof (value) !== "undefined" ? value.toString() : "NaN";

        div.appendChild(namediv);
        div.appendChild(valuediv);
        return div;
    };

    Utilities.errorDiv = function (value) {
        var div = document.createElement("div");
        div.className = "red-error";
        div.textContent = value;
        return div;
    };

    Utilities.makeDialog = function (jquery, height) {
        return jquery.dialog({
            autoOpen: false,
            width: "auto",
            height: height,
            buttons: {
                "Close": function () {
                    $(this).dialog("close");
                }
            }
        }).css("min-width", 600).css("max-width", 1000);
    };

    Utilities.makeArrayTable = function (id, headers, objects, attachedData) {
        if (typeof attachedData === "undefined") { attachedData = null; }
        var table = document.createElement("table");
        table.id = id;
        table.className = "table table-hover table-condensed";
        var tbody = document.createElement("tbody");
        var trHead = document.createElement("tr");
        for (var i = 0; i < headers.length; i++) {
            var thHead = document.createElement("th");
            thHead.textContent = headers[i];
            trHead.appendChild(thHead);
            tbody.appendChild(trHead);
        }

        for (var i = 0; i < objects.length; i++) {
            var cells = objects[i].tableCells();
            var row = document.createElement("tr");
            for (var j = 0; j < cells.length; j++) {
                var cell = document.createElement("td");
                if (cells[j] instanceof HTMLElement) {
                    cell.appendChild(cells[j]);
                } else {
                    cell.innerHTML = cells[j];
                }
                row.appendChild(cell);
            }
            if (attachedData !== null) {
                $(row).data(attachedData, objects[i]);
            }
            tbody.appendChild(row);
        }
        table.appendChild(tbody);
        return table;
    };<commit_msg>Use .text() instead of .innerHTML for values<commit_after>var Utilities = (function () {
    function Utilities() {
    }
    Utilities.toRow = function (name, value) {
        var div = document.createElement("div");
        div.className = "row erow col-s-12";

        var namediv = document.createElement("div");
        namediv.className = "col-xs-4";
        var strong = document.createElement("strong");
        strong.textContent = name ? name.toString() : "NaN";
        namediv.appendChild(strong);

        var valuediv = document.createElement("div");
        valuediv.className = "col-xs-8";
        valuediv.textContent = typeof (value) !== "undefined" ? value.toString() : "NaN";

        div.appendChild(namediv);
        div.appendChild(valuediv);
        return div;
    };

    Utilities.errorDiv = function (value) {
        var div = document.createElement("div");
        div.className = "red-error";
        div.textContent = value;
        return div;
    };

    Utilities.makeDialog = function (jquery, height) {
        return jquery.dialog({
            autoOpen: false,
            width: "auto",
            height: height,
            buttons: {
                "Close": function () {
                    $(this).dialog("close");
                }
            }
        }).css("min-width", 600).css("max-width", 1000);
    };

    Utilities.makeArrayTable = function (id, headers, objects, attachedData) {
        if (typeof attachedData === "undefined") { attachedData = null; }
        var table = document.createElement("table");
        table.id = id;
        table.className = "table table-hover table-condensed";
        var tbody = document.createElement("tbody");
        var trHead = document.createElement("tr");
        for (var i = 0; i < headers.length; i++) {
            var thHead = document.createElement("th");
            thHead.textContent = headers[i];
            trHead.appendChild(thHead);
            tbody.appendChild(trHead);
        }

        for (var i = 0; i < objects.length; i++) {
            var cells = objects[i].tableCells();
            var row = document.createElement("tr");
            for (var j = 0; j < cells.length; j++) {
                var cell = document.createElement("td");
                if (cells[j] instanceof HTMLElement) {
                    cell.appendChild(cells[j]);
                } else {
                    $(cell).text(cells[j]);
                }
                row.appendChild(cell);
            }
            if (attachedData !== null) {
                $(row).data(attachedData, objects[i]);
            }
            tbody.appendChild(row);
        }
        table.appendChild(tbody);
        return table;
    };
{'fraction_non_alphanumeric': 0.1356746765249538, 'fraction_numerical': 0.005175600739371534, 'mean_word_length': 1.805080352514256, 'pattern_counts': {'":': 2, '<': 9, '<?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': '6535619', 'n_tokens_mistral': 1470, 'n_tokens_neox': 1398, 'n_words': 319}