<commit_before>JARS.internal('ConfigsManager', function configsManagerSetup(InternalsManager) {
    'use strict';

    var utils = InternalsManager.get('utils'),
        objectEach = utils.objectEach,
        objectMerge = utils.objectMerge,
        System = InternalsManager.get('System'),
        Loader = InternalsManager.get('Loader'),
        InterceptionManager = InternalsManager.get('InterceptionManager'),
        SourceManager = InternalsManager.get('SourceManager'),
        configs = {
            environments: {},

            globalAccess: false,

            supressErrors: false
        },
        configHooks = {
            debugging: function(debugConfig) {
                if (!System.isObject(debugConfig)) {
                    debugConfig = {
                        debug: debugConfig
                    };
                }

                ConfigsManager.update('modules', {
                    restrict: 'System.Logger',

                    config: debugConfig
                });
            },
            /**
             * @param {Boolean} makeGlobal
             * @param {Boolean} isGlobal
             *
             * @return {Boolean}
             */
            globalAccess: function(makeGlobal, isGlobal) {
                if (makeGlobal) {
                    exposeModulesGlobal(!isGlobal);
                }
                else {
                    delete JARS.mods;
                }

                return !!makeGlobal;
            },
            /**
             * @param {String} mainScript
             * @param {String} oldMainScript
             *
             * @return {String}
             */
            main: function(mainScript, oldMainScript) {
                return oldMainScript || (mainScript && SourceManager.loadSource('main', mainScript + '.js'));
            },
            /**
             * @param {Object} newEnvironments
             * @param {Object} oldEnvironments
             *
             * @return {Object<string, function>}
             */
            environments: function(newEnvironments, oldEnvironments) {
                return objectMerge(oldEnvironments, newEnvironments);
            },
            /**
             * @param {String} newEnvironment
             * @param {String} oldEnvironment
             *
             * @return {String}
             */
            environment: function(newEnvironment, oldEnvironment) {
                var environment = configs.environments[newEnvironment];

                if (newEnvironment !== oldEnvironment && System.isObject(environment)) {
                    ConfigsManager.update(environment);
                }

                return newEnvironment;
            },
            /**
             * @param {(Object|Array)} newModuleConfigs
             *
             * @return {Object}
             */
            modules: function(newModuleConfigs) {
                return Loader.setModuleConfig(newModuleConfigs);
            },
            /**
             * @param {String} newLoaderContext
             * @param {String} oldLoaderContext
             *
             * @return {Object}
             */
            loaderContext: function(newLoaderContext, oldLoaderContext) {
                if (newLoaderContext !== oldLoaderContext) {
                    newLoaderContext = Loader.setLoaderContext(newLoaderContext);

                    exposeModulesGlobal(configs.globalAccess);
                }

                return newLoaderContext;
            },
            /**
             * @param {Object} newInterceptors
             *
             * @return {Object}
             */
            interceptors: function(newInterceptors) {
                if (System.isObject(newInterceptors)) {
                    objectEach(newInterceptors, InterceptionManager.addInterceptor);
                }

                return InterceptionManager.getInterceptors();
            }
        },
        ConfigsManager;

    ConfigsManager = {
        update: function(config, value) {
            var configHook = configHooks[config];

            if (System.isString(config)) {
                configs[config] = System.isFunction(configHook) ? configHook(value, configs[config]) : value;
            }
            else if (System.isObject(config)) {
                objectEach(config, function configure(value, option) {
                    ConfigsManager.update(option, value);
                });
            }
        },

        get: function(config) {
            return configs[config];<commit_msg>Switch from object to array for interceptors config<commit_after>JARS.internal('ConfigsManager', function configsManagerSetup(InternalsManager) {
    'use strict';

    var utils = InternalsManager.get('utils'),
        objectEach = utils.objectEach,
        arrayEach = utils.arrayEach,
        objectMerge = utils.objectMerge,
        System = InternalsManager.get('System'),
        Loader = InternalsManager.get('Loader'),
        InterceptionManager = InternalsManager.get('InterceptionManager'),
        SourceManager = InternalsManager.get('SourceManager'),
        configs = {
            environments: {},

            globalAccess: false,

            supressErrors: false
        },
        configHooks = {
            debugging: function(debugConfig) {
                if (!System.isObject(debugConfig)) {
                    debugConfig = {
                        debug: debugConfig
                    };
                }

                ConfigsManager.update('modules', {
                    restrict: 'System.Logger',

                    config: debugConfig
                });
            },
            /**
             * @param {Boolean} makeGlobal
             * @param {Boolean} isGlobal
             *
             * @return {Boolean}
             */
            globalAccess: function(makeGlobal, isGlobal) {
                if (makeGlobal) {
                    exposeModulesGlobal(!isGlobal);
                }
                else {
                    delete JARS.mods;
                }

                return !!makeGlobal;
            },
            /**
             * @param {String} mainScript
             * @param {String} oldMainScript
             *
             * @return {String}
             */
            main: function(mainScript, oldMainScript) {
                return oldMainScript || (mainScript && SourceManager.loadSource('main', mainScript + '.js'));
            },
            /**
             * @param {Object} newEnvironments
             * @param {Object} oldEnvironments
             *
             * @return {Object<string, function>}
             */
            environments: function(newEnvironments, oldEnvironments) {
                return objectMerge(oldEnvironments, newEnvironments);
            },
            /**
             * @param {String} newEnvironment
             * @param {String} oldEnvironment
             *
             * @return {String}
             */
            environment: function(newEnvironment, oldEnvironment) {
                var environment = configs.environments[newEnvironment];

                if (newEnvironment !== oldEnvironment && System.isObject(environment)) {
                    ConfigsManager.update(environment);
                }

                return newEnvironment;
            },
            /**
             * @param {(Object|Array)} newModuleConfigs
             *
             * @return {Object}
             */
            modules: function(newModuleConfigs) {
                return Loader.setModuleConfig(newModuleConfigs);
            },
            /**
             * @param {String} newLoaderContext
             * @param {String} oldLoaderContext
             *
             * @return {Object}
             */
            loaderContext: function(newLoaderContext, oldLoaderContext) {
                if (newLoaderContext !== oldLoaderContext) {
                    newLoaderContext = Loader.setLoaderContext(newLoaderContext);

                    exposeModulesGlobal(configs.globalAccess);
                }

                return newLoaderContext;
            },
            /**
             * @param {JARS~InterceptionManager~Interceptor[]} newInterceptors
             *
             * @return {Object<String, JARS~InterceptionManager~Interceptor>}
             */
            interceptors: function(newInterceptors) {
                if (System.isArray(newInterceptors)) {
                    arrayEach(newInterceptors, InterceptionManager.addInterceptor);
                }

                return InterceptionManager.getInterceptors();
            }
        },
        ConfigsManager;

    /**
    * @access public
    *
    * @namespace ConfigsManager
    *
    * @memberof JARS
    * @inner
    */
    ConfigsManager = {
        /**
        * @access public
        *
        * @memberof JARS~ConfigsManager
        *
        * @param {(Object|String)} config
        * @param {*} value
        */
        update: function(config, value) {
            var configHook = configHooks[config];

            if (System.isString(config)) {
                configs[config] = System.isFunction(configHook) ? configHook(value, configs[config]) : value;
            }
            else if (System.isObject(config)) {
                objectEach(config, function update(value, option) {
                    ConfigsManager.update(option, value);
                });
            }
        },
        /**
        * @access public
        *
        * @memberof JARS~ConfigsManager
        *
        * @param {String} option
        *
        * @return {*}
        */
        get: function(option) {
            return configs[option];
{'fraction_non_alphanumeric': 0.09664775657555441, 'fraction_numerical': 0.0, 'mean_word_length': 1.3666097144251892, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '1868183', 'n_tokens_mistral': 2309, 'n_tokens_neox': 2190, 'n_words': 393}