<commit_before>module.exports = function(grunt) {
    "use strict";
    // Load all grunt-* modules in package.json
    require("load-grunt-tasks")(grunt);
    // Read in local environment variables
    var config = {
        mocha_grep: "",
        rst2html: "rst2html",
        jsdoc3: "jsdoc",
        jsdoc_private: false,
        jsdoc3_template_dir: undefined,
        required_jsdoc_version: "3.2.2"
    };

    // Try to load a local configuration file.
    var local_config = {};
    try {
        local_config = require('./local.grunt');
    }
    catch (e) {
        if (e.code !== "MODULE_NOT_FOUND")
            throw e;
    }
    // Override defaults with any variables from commandline environment,
    // then from a local.grunt.js configuration file
    for(var i in config) {
        var opt_name = i.replace("_", "-");
        var opt = grunt.option(opt_name);
        if (opt !== undefined) {
            console.log(i + " set from command line to " + opt);
            config[i] = opt;
        }
        else if (local_config[i] !== undefined) {
            console.log(i + " set from local.grunt to " + local_config[i]);
            config[i] = local_config[i];
        }
    }

    // Check that the local version of JSDoc is the same or better
    // than the version deemed required for proper output.
    // This is a callback used by the grunt-shell task.
    function checkJSDocVersion(err, stdout, stderr, callback) {
        function isPositiveInteger(x) {
            // http://stackoverflow.com/a/1019526/11236
            return /^\d+$/.test(x);
        }

        function validateParts(parts) {
            console.log(parts.length);
            for (var i = 1 ; i < parts.length; i++) {
                if (parts[i] === undefined) {
                    break;
                }
                if (!isPositiveInteger(parts[i])) {
                    return false;
                }
            }
            return true;
        }

        if (err) {
            grunt.fail.warn(err);
        }
        var required_re = /^(\d+)(?:\.(\d+)(?:\.(\d+))?)?$/;
        var req_version_match = config.required_jsdoc_version.match(required_re);
        console.log(req_version_match);
        if (!req_version_match ||(!validateParts(req_version_match))) {
            grunt.fail.warn('Incorrect version specification: "' +
                                         config.required_jsdoc_version + '".');
        }

        var version_re = /(\d+)(?:\.(\d+)(?:\.(\d+))?)?/;
        var version_match_list = version_re.exec(stdout);
        console.log(version_match_list);
        if (!version_match_list) {
            grunt.fail.warn("Could not determine local JSDoc version.");
        }

        for (i = 1; i < req_version_match.length; ++i) {
            console.log(req_version_match[i]);
            console.log(version_match_list[i]);
            if (req_version_match[i] === version_match_list[i]) {
                continue;
            }
            if (req_version_match[i] > version_match_list[i]) {
                grunt.fail.warn("Local JSDoc version is too old: " +
                                version_match_list[0] + " < " +
                                req_version_match[0] + ".");
            }<commit_msg>Removed console logs<commit_after>module.exports = function(grunt) {
    "use strict";
    // Load all grunt-* modules in package.json
    require("load-grunt-tasks")(grunt);
    // Read in local environment variables
    var config = {
        mocha_grep: "",
        rst2html: "rst2html",
        jsdoc3: "jsdoc",
        jsdoc_private: false,
        jsdoc3_template_dir: undefined,
        required_jsdoc_version: "3.2.2"
    };

    // Try to load a local configuration file.
    var local_config = {};
    try {
        local_config = require('./local.grunt');
    }
    catch (e) {
        if (e.code !== "MODULE_NOT_FOUND")
            throw e;
    }
    // Override defaults with any variables from commandline environment,
    // then from a local.grunt.js configuration file
    for(var i in config) {
        var opt_name = i.replace("_", "-");
        var opt = grunt.option(opt_name);
        if (opt !== undefined) {
            console.log(i + " set from command line to " + opt);
            config[i] = opt;
        }
        else if (local_config[i] !== undefined) {
            console.log(i + " set from local.grunt to " + local_config[i]);
            config[i] = local_config[i];
        }
    }

    // Check that the local version of JSDoc is the same or better
    // than the version deemed required for proper output.
    // This is a callback used by the grunt-shell task.
    function checkJSDocVersion(err, stdout, stderr, callback) {
        function isPositiveInteger(x) {
            // http://stackoverflow.com/a/1019526/11236
            return /^\d+$/.test(x);
        }

        function validateParts(parts) {
            for (var i = 1 ; i < parts.length; i++) {
                if (parts[i] === undefined) {
                    break;
                }
                if (!isPositiveInteger(parts[i])) {
                    return false;
                }
            }
            return true;
        }

        if (err) {
            grunt.fail.warn(err);
        }
        var required_re = /^(\d+)(?:\.(\d+)(?:\.(\d+))?)?$/;
        var req_version_match = config.required_jsdoc_version.match(required_re);
        if (!req_version_match ||(!validateParts(req_version_match))) {
            grunt.fail.warn('Incorrect version specification: "' +
                                         config.required_jsdoc_version + '".');
        }

        var version_re = /(\d+)(?:\.(\d+)(?:\.(\d+))?)?/;
        var version_match_list = version_re.exec(stdout);
        if (!version_match_list) {
            grunt.fail.warn("Could not determine local JSDoc version.");
        }

        for (i = 1; i < req_version_match.length; ++i) {
            if (req_version_match[i] === version_match_list[i]) {
                continue;
            }
            if (req_version_match[i] > version_match_list[i]) {
                grunt.fail.warn("Local JSDoc version is too old: " +
                                version_match_list[0] + " < " +
                                req_version_match[0] + ".");
            }
{'fraction_non_alphanumeric': 0.1322458029775103, 'fraction_numerical': 0.007285397529299968, 'mean_word_length': 1.6826677994902295, 'pattern_counts': {'":': 0, '<': 9, '<?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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '704994', 'n_tokens_mistral': 1910, 'n_tokens_neox': 1840, 'n_words': 417}