<commit_before>function load() {
    var xmlhttp = null;
    var json = null;
    if (window.XMLHttpRequest) { // code for all new browsers
        xmlhttp = new XMLHttpRequest();
    } else if (window.ActiveXObject) { // code for IE5 and IE6
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    if (xmlhttp != null) {
        xmlhttp.onreadystatechange = state_Change;

        xmlhttp.open("get", "./class.json", true);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.send();

    } else {
        alert("Your browser does not support XMLHTTP.");
    }

    function state_Change() {
        if (xmlhttp.readyState == 4) { // 4 = "loaded"
            if (xmlhttp.status == 200) { // 200 = OK
                console.log(xmlhttp.response);
                json=eval(xmlhttp.response);
            } else {
                alert("Problem retrieving XML data");
            }
        }
    }
    return json;
}<commit_msg>fix JSON parse<commit_after>function load() {
    var xmlhttp = null;
    var json = null;
    if (window.XMLHttpRequest) { // code for all new browsers
        xmlhttp = new XMLHttpRequest();
    } else if (window.ActiveXObject) { // code for IE5 and IE6
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    if (xmlhttp != null) {
        xmlhttp.onreadystatechange = state_Change;

        xmlhttp.open("get", "./class.json", true);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.send();

    } else {
        alert("Your browser does not support XMLHTTP.");
    }

    function state_Change() {
        if (xmlhttp.readyState == 4) { // 4 = "loaded"
            if (xmlhttp.status == 200) { // 200 = OK
                console.log(xmlhttp.response);
                json = JSON.parse(xmlhttp.responseText)
            } else {
                alert("Problem retrieving XML data");
            }
        }
    }
    return json;
}
{'fraction_non_alphanumeric': 0.1283851554663992, 'fraction_numerical': 0.010030090270812437, 'mean_word_length': 1.9865269461077844, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 24}, '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': '6763561', 'n_tokens_mistral': 602, 'n_tokens_neox': 564, 'n_words': 139}