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

    var ROOT_MODULE_NAME = '*',
        BUNDLE_SUFFIX = '.*',
        EMPTY_STRING = '',
        DOT = '.',
        VERSION_DELIMITER = '@',
        VERSION_WITH_ZERO_PATCH = '$10',
        RE_VERSION_WITHOUT_PATCH_NUMBER = /(\d+\.\d+\.)\d+.+/,
        RE_BUNDLE = /\.\*$/,
        ResolutionStrategies = InternalsManager.get('ResolutionStrategies'),
        Resolver;

    /**
     * @namespace
     *
     * @memberof JARS.internals
     */
    Resolver = {
        /**
         * @param {string} moduleName
         *
         * @return {boolean}
         */
        isRootName: function(moduleName) {
            return ROOT_MODULE_NAME === moduleName;
        },
        /**
         * @return {string}
         */
        getRootName: function() {
            return ROOT_MODULE_NAME;
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        getBundleName: function(moduleName) {
            return Resolver.appendVersion(Resolver.getModuleNameWithoutVersion(moduleName) + BUNDLE_SUFFIX, Resolver.getVersion(moduleName));
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        getImplicitDependencyName: function(moduleName) {
            var version = Resolver.getVersion(moduleName),
                moduleNameWithoutVersion = Resolver.getModuleNameWithoutVersion(moduleName),
                implicitDependencyWithoutVersion = moduleNameWithoutVersion.substr(0, moduleNameWithoutVersion.lastIndexOf(DOT));

            version && (version = version.replace(RE_VERSION_WITHOUT_PATCH_NUMBER, VERSION_WITH_ZERO_PATCH));

            return Resolver.appendVersion(implicitDependencyWithoutVersion, version);
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        getModuleTail: function(moduleName) {
            return Resolver.getModuleNameWithoutVersion(moduleName).split(DOT).pop();
        },
        /**
         * @param {string} moduleName
         *
         * @return {boolean}
         */
        isVersionedModule: function(moduleName) {
            return moduleName.indexOf(VERSION_DELIMITER) > -1;
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        getModuleNameWithoutVersion: function(moduleName) {
            return moduleName.split(VERSION_DELIMITER)[0];
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        getVersion: function(moduleName) {
            return moduleName.split(VERSION_DELIMITER)[1] || EMPTY_STRING;
        },
        /**
         * @param {string} moduleName
         * @param {string} version
         *
         * @return {string}
         */
        appendVersion: function(moduleName, version) {
            return (moduleName && version) ? [moduleName, version].join(VERSION_DELIMITER) : moduleName;
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        extractModuleNameFromBundle: function(moduleName) {
            return moduleName.replace(RE_BUNDLE, EMPTY_STRING);
        },
        /**
         * @param {string} moduleName
         *
         * @return {boolean}
         */
        isBundle: function(moduleName) {
            return RE_BUNDLE.test(moduleName);
        },
        /**<commit_msg>Fix isBundle() to remove version number before the check<commit_after>JARS.internal('Resolver', function resolverSetup(InternalsManager) {
    'use strict';

    var ROOT_MODULE_NAME = '*',
        BUNDLE_SUFFIX = '.*',
        EMPTY_STRING = '',
        DOT = '.',
        VERSION_DELIMITER = '@',
        VERSION_WITH_ZERO_PATCH = '$10',
        RE_VERSION_WITHOUT_PATCH_NUMBER = /(\d+\.\d+\.)\d+.+/,
        RE_BUNDLE = /\.\*$/,
        ResolutionStrategies = InternalsManager.get('ResolutionStrategies'),
        Resolver;

    /**
     * @namespace
     *
     * @memberof JARS.internals
     */
    Resolver = {
        /**
         * @param {string} moduleName
         *
         * @return {boolean}
         */
        isRootName: function(moduleName) {
            return ROOT_MODULE_NAME === moduleName;
        },
        /**
         * @return {string}
         */
        getRootName: function() {
            return ROOT_MODULE_NAME;
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        getBundleName: function(moduleName) {
            return Resolver.appendVersion(Resolver.getModuleNameWithoutVersion(moduleName) + BUNDLE_SUFFIX, Resolver.getVersion(moduleName));
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        getImplicitDependencyName: function(moduleName) {
            var version = Resolver.getVersion(moduleName),
                moduleNameWithoutVersion = Resolver.getModuleNameWithoutVersion(moduleName),
                implicitDependencyWithoutVersion = moduleNameWithoutVersion.substr(0, moduleNameWithoutVersion.lastIndexOf(DOT));

            version && (version = version.replace(RE_VERSION_WITHOUT_PATCH_NUMBER, VERSION_WITH_ZERO_PATCH));

            return Resolver.appendVersion(implicitDependencyWithoutVersion, version);
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        getModuleTail: function(moduleName) {
            return Resolver.getModuleNameWithoutVersion(moduleName).split(DOT).pop();
        },
        /**
         * @param {string} moduleName
         *
         * @return {boolean}
         */
        isVersionedModule: function(moduleName) {
            return moduleName.indexOf(VERSION_DELIMITER) > -1;
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        getModuleNameWithoutVersion: function(moduleName) {
            return moduleName.split(VERSION_DELIMITER)[0];
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        getVersion: function(moduleName) {
            return moduleName.split(VERSION_DELIMITER)[1] || EMPTY_STRING;
        },
        /**
         * @param {string} moduleName
         * @param {string} version
         *
         * @return {string}
         */
        appendVersion: function(moduleName, version) {
            return (moduleName && version) ? [moduleName, version].join(VERSION_DELIMITER) : moduleName;
        },
        /**
         * @param {string} moduleName
         *
         * @return {string}
         */
        extractModuleNameFromBundle: function(moduleName) {
            return moduleName.replace(RE_BUNDLE, EMPTY_STRING);
        },
        /**
         * @param {string} moduleName
         *
         * @return {boolean}
         */
        isBundle: function(moduleName) {
            return RE_BUNDLE.test(Resolver.getModuleNameWithoutVersion(moduleName));
        },
        /**
{'fraction_non_alphanumeric': 0.11701683595380548, 'fraction_numerical': 0.0016696813691387227, 'mean_word_length': 1.796887159533074, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6479868', 'n_tokens_mistral': 1987, 'n_tokens_neox': 1970, 'n_words': 300}