<commit_before>var mograndom = function() {
    document.getElementById("result").style.display = 'none';
    var times = document.getElementById("length").value;
    var repeat = document.getElementById("repeat").value;
    var result = [];

    for (var i = 0; i <= times; i++) {
        var tmp_mod = mods.sample();
        var tmp_val = tmp_mod.sample();
        
        if (repeat !== 0 || repeat !== undefined) {
            for (var r = 1; r <= repeat; r++) {
                result.push(tmp_val);
            }
        } else {
            result.push(tmp_val);
        }
    }

    if (result.length > 31) {
        var warn_result = result.slice(0,29);
        document.getElementById("lengthwarn-res").innerHTML = warn_result.join(" ");
        document.getElementById("lengthwarn").style.display = 'block';
        return false;
    } else {
        document.getElementById("lengthwarn").style.display = 'none';
    }

    document.getElementById("result-text").innerHTML = result.join(" ");
    document.getElementById("result").style.display = 'block';
}

document.getElementById("mog").addEventListener("click", mograndom);<commit_msg>something something<commit_after>var mograndom = function() {
    document.getElementById("result").style.display = 'none';
    var times = document.getElementById("length").value;
    var repeat = document.getElementById("repeat").value;
    var result = [];

    for (var i = 0; i <= times; i++) {
        var tmp_mod = mods.sample();
        var tmp_val = tmp_mod.sample();
        
        if (repeat !== 0 || repeat !== undefined) {
            for (var r = 0; r <= repeat; r++) {
                result.push(tmp_val);
            }
        } else {
            result.push(tmp_val);
        }
    }

    if (result.length > 30) {
        var warn_result = result.slice(0,29);
        document.getElementById("lengthwarn-res").innerHTML = warn_result.join(" ");
        document.getElementById("lengthwarn").style.display = 'block';
        return false;
    } else {
        document.getElementById("lengthwarn").style.display = 'none';
    }

    document.getElementById("result-text").innerHTML = result.join(" ");
    document.getElementById("result").style.display = 'block';
}

document.getElementById("mog").addEventListener("click", mograndom);
{'fraction_non_alphanumeric': 0.15684575389948008, 'fraction_numerical': 0.006932409012131715, 'mean_word_length': 2.5965732087227416, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '3672628', 'n_tokens_mistral': 640, 'n_tokens_neox': 617, 'n_words': 124}