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

    var ModuleLogger = InternalsManager.get('ModuleLogger'),

        // Module states
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_WAITING = 1,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_LOADING = 2,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_LOADED = 3,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_REGISTERED = 4,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_LOADED_MANUAL = 5,

        // Bundle states
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_BUNDLE_WAITING = 0,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_BUNDLE_LOADING = 1,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_BUNDLE_REQUESTED = 2,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_BUNDLE_LOADED = 3,
        WAITING_STATES = [MODULE_WAITING, MODULE_BUNDLE_WAITING],
        LOADING_STATES = [MODULE_LOADING, MODULE_BUNDLE_LOADING],
        LOADED_STATES = [MODULE_LOADED, MODULE_BUNDLE_LOADED],
        LOADED_MANUAL_STATES = [MODULE_LOADED_MANUAL],
        REGISTERED_STATES = [MODULE_REGISTERED],
        REQUESTED_STATES = [null, MODULE_BUNDLE_REQUESTED],
        MODULE = 'module',
        BUNDLE = 'bundle',
        LOADING = 'loading',
        LOADED = 'loaded',
        MANUAL = ' manual',
        STARTED_LOADING = 'started ' + LOADING + ' ',
        FINISHED_LOADING = 'finished ' + LOADING + ' ',
        ATTEMPTED_TO = 'attempted to ',
        ATTEMPTED_TO_LOAD = ATTEMPTED_TO + 'load ',
        BUT_ALREADY = ' but is already ',
        ABORTED_LOADING = 'aborted ' + LOADING + ' ',
        PROBLEMS_WITH = ' because of problems with ',
        // Error when module or bundle is aborted
        MSG_MODULE_ABORTED = addAbortionMessage('given path "${path}" after ${sec} second(s) - file may not exist'),
        MSG_MODULE_DEPENDENCY_ABORTED = addAbortionMessage('dependency "${dep}"'),
        MSG_BUNDLE_ABORTED = addAbortionMessage('parent "${dep}"', true),
        MSG_BUNDLE_SUBMODULE_ABORTED = addAbortionMessage('submodule "${dep}"', true),
        // Show module or bundle is requested
        MSG_MODULE_REQUESTED = addRequestMessage(),
        MSG_BUNDLE_REQUESTED = addRequestMessage(true),
        // Show loading progress for module or bundle
        MSG_MODULE_LOADED = addLoadingMessage(),
        MSG_MODULE_LOADING = addLoadingMessage(true),
        MSG_BUNDLE_LOADED = addLoadingMessage(false, true),
        MSG_BUNDLE_LOADING = addLoadingMessage(true, true),
        // Info when loading is already in progress or done
        MSG_MODULE_ALREADY_LOADED = addLoadAttemptMessage(LOADED),
        MSG_MODULE_ALREADY_LOADED_MANUAL = addLoadAttemptMessage(LOADED + MANUAL),
        MSG_MODULE_ALREADY_LOADING = addLoadAttemptMessage(LOADING),
        MSG_BUNDLE_ALREADY_LOADED = addLoadAttemptMessage(LOADED, true),
        MSG_BUNDLE_ALREADY_LOADING = addLoadAttemptMessage(LOADING, true),
        // Warning when a module is registered twice
        MSG_MODULE_ALREADY_REGISTERED = ModuleLogger.addWarning(ATTEMPTED_TO + 'register ' + MODULE + BUT_ALREADY + ' registered'),
        // Show special cases for module
        MSG_MODULE_LOADED_MANUAL = ModuleLogger.addDebug(MODULE + ' was ' + LOADED, MANUAL),
        MSG_MODULE_REGISTERING = ModuleLogger.addDebug(MODULE + ' registering...');

    /**
    * @access public
    *
    * @constructor ModuleState
    *
    * @memberof JARS
    * @inner
    *
    * @param {JARS~Module} module
    */
    function ModuleState(module) {
        var moduleState = this;

        moduleState._module = module;

        moduleState.setWaiting();
        moduleState.setWaiting(true);
    }

    ModuleState.prototype = {
        /**
         * @access public
         *
         * @alias JARS~ModuleState
         *
         * @memberof JARS~ModuleState#
         */
         constructor: ModuleState,
        /**<commit_msg>Fix in adding loaded manual message<commit_after>JARS.internal('ModuleState', function moduleStateSetup(InternalsManager) {
    'use strict';

    var ModuleLogger = InternalsManager.get('ModuleLogger'),

        // Module states
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_WAITING = 1,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_LOADING = 2,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_LOADED = 3,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_REGISTERED = 4,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_LOADED_MANUAL = 5,

        // Bundle states
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_BUNDLE_WAITING = 0,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_BUNDLE_LOADING = 1,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_BUNDLE_REQUESTED = 2,
        /**
         * @access private
         *
         * @constant {Number}
         * @default
         *
         * @memberof JARS~ModuleState
         * @inner
         */
        MODULE_BUNDLE_LOADED = 3,
        WAITING_STATES = [MODULE_WAITING, MODULE_BUNDLE_WAITING],
        LOADING_STATES = [MODULE_LOADING, MODULE_BUNDLE_LOADING],
        LOADED_STATES = [MODULE_LOADED, MODULE_BUNDLE_LOADED],
        LOADED_MANUAL_STATES = [MODULE_LOADED_MANUAL],
        REGISTERED_STATES = [MODULE_REGISTERED],
        REQUESTED_STATES = [null, MODULE_BUNDLE_REQUESTED],
        MODULE = 'module',
        BUNDLE = 'bundle',
        LOADING = 'loading',
        LOADED = 'loaded',
        LOADED_MANUAL = LOADED + ' manual',
        STARTED_LOADING = 'started ' + LOADING + ' ',
        FINISHED_LOADING = 'finished ' + LOADING + ' ',
        ATTEMPTED_TO = 'attempted to ',
        ATTEMPTED_TO_LOAD = ATTEMPTED_TO + 'load ',
        BUT_ALREADY = ' but is already ',
        ABORTED_LOADING = 'aborted ' + LOADING + ' ',
        PROBLEMS_WITH = ' because of problems with ',
        // Error when module or bundle is aborted
        MSG_MODULE_ABORTED = addAbortionMessage('given path "${path}" after ${sec} second(s) - file may not exist'),
        MSG_MODULE_DEPENDENCY_ABORTED = addAbortionMessage('dependency "${dep}"'),
        MSG_BUNDLE_ABORTED = addAbortionMessage('parent "${dep}"', true),
        MSG_BUNDLE_SUBMODULE_ABORTED = addAbortionMessage('submodule "${dep}"', true),
        // Show module or bundle is requested
        MSG_MODULE_REQUESTED = addRequestMessage(),
        MSG_BUNDLE_REQUESTED = addRequestMessage(true),
        // Show loading progress for module or bundle
        MSG_MODULE_LOADED = addLoadingMessage(),
        MSG_MODULE_LOADING = addLoadingMessage(true),
        MSG_BUNDLE_LOADED = addLoadingMessage(false, true),
        MSG_BUNDLE_LOADING = addLoadingMessage(true, true),
        // Info when loading is already in progress or done
        MSG_MODULE_ALREADY_LOADED = addLoadAttemptMessage(LOADED),
        MSG_MODULE_ALREADY_LOADED_MANUAL = addLoadAttemptMessage(LOADED_MANUAL),
        MSG_MODULE_ALREADY_LOADING = addLoadAttemptMessage(LOADING),
        MSG_BUNDLE_ALREADY_LOADED = addLoadAttemptMessage(LOADED, true),
        MSG_BUNDLE_ALREADY_LOADING = addLoadAttemptMessage(LOADING, true),
        // Warning when a module is registered twice
        MSG_MODULE_ALREADY_REGISTERED = ModuleLogger.addWarning(ATTEMPTED_TO + 'register ' + MODULE + BUT_ALREADY + ' registered'),
        // Show special cases for module
        MSG_MODULE_LOADED_MANUAL = ModuleLogger.addDebug(MODULE + ' was ' + LOADED_MANUAL),
        MSG_MODULE_REGISTERING = ModuleLogger.addDebug(MODULE + ' registering...');

    /**
    * @access public
    *
    * @constructor ModuleState
    *
    * @memberof JARS
    * @inner
    *
    * @param {JARS~Module} module
    */
    function ModuleState(module) {
        var moduleState = this;

        moduleState._module = module;

        moduleState.setWaiting();
        moduleState.setWaiting(true);
    }

    ModuleState.prototype = {
        /**
         * @access public
         *
         * @alias JARS~ModuleState
         *
         * @memberof JARS~ModuleState#
         */
         constructor: ModuleState,
        /**
{'fraction_non_alphanumeric': 0.09943643136880313, 'fraction_numerical': 0.0017193619256853567, 'mean_word_length': 1.819822246162133, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7459791', 'n_tokens_mistral': 3201, 'n_tokens_neox': 3060, 'n_words': 572}