<commit_before>;( function ( $ ) {
    "use strict";

    // IIFE generating the $.documentWidth, $.documentHeight and $.scrollbarWidth functions.
    //
    // These functions need to run a feature detection which requires insertion of an iframe. The body element in the
    // main document must be available when that happens (ie, the opening body tag must have been parsed). For that
    // reason, the detection does not run up front - after all, the code might be loaded and run while parsing the head.
    // Instead, detection happens when any of the functions is invoked for the first time, or on DOM-ready. Given their
    // purpose, they won't be called until after the opening body tag has been parsed.

    var _scrollbarWidth,
        elementNameForDocSizeQuery,
        useGetComputedStyle = !! window.getComputedStyle;

    /**
     * @param   {Document} [_document=document]
     * @returns {number}
     */
    $.documentWidth = function ( _document ) {
        _document || ( _document = document );
        if ( elementNameForDocSizeQuery === undefined ) testDocumentScroll();
        return _document[elementNameForDocSizeQuery].scrollWidth;
    };

    /**
     * @param   {Document} [_document=document]
     * @returns {number}
     */
    $.documentHeight = function ( _document ) {
        _document || ( _document = document );
        if ( elementNameForDocSizeQuery === undefined ) testDocumentScroll();
        return _document[elementNameForDocSizeQuery].scrollHeight;
    };

    /**
     * @param   {Window} [_window=window]
     * @returns {number}
     */
    $.windowWidth = function ( _window ) {
        _window || ( _window = window );
        return ( browserScrollbarWidth() || window.innerWidth === undefined ) ? _window.document.documentElement.clientWidth : _window.innerWidth;
    };

    /**
     * @param   {Window} [_window=window]
     * @returns {number}
     */
    $.windowHeight = function ( _window ) {
        _window || ( _window = window );
        return ( browserScrollbarWidth() || window.innerWidth === undefined ) ? _window.document.documentElement.clientHeight : _window.innerHeight;
    };

    /**
     * @returns {number}
     */
    $.scrollbarWidth = browserScrollbarWidth;


    // Let's prime $.documentWidth(), $.documentHeight() and $.scrollbarWidth() immediately after the DOM is ready. It
    // is best to do it up front because the test touches the DOM, so let's get it over with before people set up
    // handlers for mutation events and such.
    if ( typeof $ === "function" ) {
        $( function () {
            if ( elementNameForDocSizeQuery === undefined ) testDocumentScroll();
        } );
        $( browserScrollbarWidth );
    }


    /**
     * Does the actual work of $.scrollbarWidth. Protected from external modification. See $.scrollbarWidth for details.
     *
     * Adapted from <NAME>'s scrollbarWidth plugin. See
     * - http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth
     * - http://jsbin.com/zeliy/1
     *
     * @returns {number}
     */
    function browserScrollbarWidth () {
        var testEl;<commit_msg>Tweaked feature-testing code (minor)<commit_after>;( function ( $ ) {
    "use strict";

    // IIFE generating the $.documentWidth, $.documentHeight and $.scrollbarWidth functions.
    //
    // These functions need to run a feature detection which requires insertion of an iframe. The body element in the
    // main document must be available when that happens (ie, the opening body tag must have been parsed). For that
    // reason, the detection does not run up front - after all, the code might be loaded and run while parsing the head.
    // Instead, detection happens when any of the functions is invoked for the first time, or on DOM-ready. Given their
    // purpose, they won't be called until after the opening body tag has been parsed.

    var _scrollbarWidth,
        elementNameForDocSizeQuery,
        useGetComputedStyle = !! window.getComputedStyle;

    /**
     * @param   {Document} [_document=document]
     * @returns {number}
     */
    $.documentWidth = function ( _document ) {
        _document || ( _document = document );
        if ( elementNameForDocSizeQuery === undefined ) testDocumentScroll();
        return _document[elementNameForDocSizeQuery].scrollWidth;
    };

    /**
     * @param   {Document} [_document=document]
     * @returns {number}
     */
    $.documentHeight = function ( _document ) {
        _document || ( _document = document );
        if ( elementNameForDocSizeQuery === undefined ) testDocumentScroll();
        return _document[elementNameForDocSizeQuery].scrollHeight;
    };

    /**
     * @param   {Window} [_window=window]
     * @returns {number}
     */
    $.windowWidth = function ( _window ) {
        _window || ( _window = window );
        return ( browserScrollbarWidth() || window.innerWidth === undefined ) ? _window.document.documentElement.clientWidth : _window.innerWidth;
    };

    /**
     * @param   {Window} [_window=window]
     * @returns {number}
     */
    $.windowHeight = function ( _window ) {
        _window || ( _window = window );
        return ( browserScrollbarWidth() || window.innerWidth === undefined ) ? _window.document.documentElement.clientHeight : _window.innerHeight;
    };

    /**
     * @returns {number}
     */
    $.scrollbarWidth = browserScrollbarWidth;


    // Let's prime $.documentWidth(), $.documentHeight() and $.scrollbarWidth() immediately after the DOM is ready. It
    // is best to do it up front because the test touches the DOM, so let's get it over with before people set up
    // handlers for mutation events and such.
    if ( typeof $ === "function" ) {
        $( function () {
            if ( elementNameForDocSizeQuery === undefined ) testDocumentScroll();
            browserScrollbarWidth();
        } );
    }


    /**
     * Does the actual work of $.scrollbarWidth. Protected from external modification. See $.scrollbarWidth for details.
     *
     * Adapted from <NAME>'s scrollbarWidth plugin. See
     * - http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth
     * - http://jsbin.com/zeliy/1
     *
     * @returns {number}
     */
    function browserScrollbarWidth () {
        var testEl;
{'fraction_non_alphanumeric': 0.11149936467598476, 'fraction_numerical': 0.0003176620076238882, 'mean_word_length': 2.6674432149097265, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6314238', 'n_tokens_mistral': 1682, 'n_tokens_neox': 1630, 'n_words': 522}