<commit_before>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

;(function($, document) {
    var origTimeline = TA.Timeline;

    TA.Timeline = function() {
        /**
         * Displays controls to control this timeline in your Webpage
         *
         * @method TA.Timeline#displayControls
         * @param [jQuery|String] $e - either a jQuery Node object or an ID. The Element gets created if it does not exist.
         * @return {jQuery} the jQuery Node the controls reside in
         */
        this.displayControls = function($e) {
            if(!$e) {
                $e = this.name+'_controls';
            }
            if($.type($e) === 'string') {
                if($($e).length === 0) {
                    $e = $('<div></div>').attr('id', $e);
                } else {
                    $e = $($e);
                }
            }

            var $btn = $('<button></button>'),
                btns = [
                    $btn.clone().addClass('tapause').text('Pause'),
                    $btn.clone().addClass('tastep').text('Step'),
                    $btn.clone().addClass('taskip').text('Skip'),
                    $btn.clone().addClass('taplay').text('Play')
                ],
                that = this
            ;

            $e
                .append(btns)
                .on('click', '.tapause', function(evt) {
                    that.pause();
                })
                .on('click', '.tastep', function(evt) {
                    that.setSingleStep(true);
                    that.play();
                })
                .on('click', '.taskip', function(evt) {
                    that.step(1);
                    that.setSingleStep(true);
                    that.play();
                })
                .on('click', '.taplay', function(evt) {
                    that.setSingleStep(false);
                    that.breakOnExecute = false;
                    that.play();
                })
            ;

            if (!$.contains(document.documentElement, $e[0])) {
                $e.appendTo('body');
            }

            return $e;
        };

        return origTimeline.apply(this, arguments);
    };
})(jQuery, document);
<commit_msg>Fix invalid variable setting in debugControls due to scope issues<commit_after>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

;(function($, document) {
    var origTimeline = TA.Timeline;

    TA.Timeline = function() {
        /**
         * Displays controls to control this timeline in your Webpage
         *
         * @method TA.Timeline#displayControls
         * @param [jQuery|String] $e - either a jQuery Node object or an ID. The Element gets created if it does not exist.
         * @return {jQuery} the jQuery Node the controls reside in
         */
        this.displayControls = function($e) {
            if(!$e) {
                $e = this.name+'_controls';
            }
            if($.type($e) === 'string') {
                if($($e).length === 0) {
                    $e = $('<div></div>').attr('id', $e);
                } else {
                    $e = $($e);
                }
            }

            var $btn = $('<button></button>'),
                btns = [
                    $btn.clone().addClass('tapause').text('Pause'),
                    $btn.clone().addClass('tastep').text('Step'),
                    $btn.clone().addClass('taskip').text('Skip'),
                    $btn.clone().addClass('taplay').text('Play')
                ],
                that = this
            ;

            $e
                .append(btns)
                .on('click', '.tapause', function(evt) {
                    that.pause();
                })
                .on('click', '.tastep', function(evt) {
                    that.setSingleStep(true);
                    that.play();
                })
                .on('click', '.taskip', function(evt) {
                    that.step(1);
                    that.setSingleStep(true);
                    that.play();
                })
                .on('click', '.taplay', function(evt) {
                    that.setSingleStep(false);
                    that.play();
                })
            ;

            if (!$.contains(document.documentElement, $e[0])) {
                $e.appendTo('body');
            }

            return $e;
        };

        return origTimeline.apply(this, arguments);
    };
})(jQuery, document);

{'fraction_non_alphanumeric': 0.1458640286255525, 'fraction_numerical': 0.002946748053041465, 'mean_word_length': 1.2457466918714555, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '4118854', 'n_tokens_mistral': 1314, 'n_tokens_neox': 1214, 'n_words': 291}