<commit_before>var TangoIconsAnimation = {

    _el : null,
    _size : null,
    _timer : null,
    _x : 0,
    _y : 0,

    run : function(el, size, speed) {
        this._el = el;
        this._size = size;
        $(this._el).css({
            display : 'block',
            width : size+'px',
            height : size+'px',
            background : 'url(images/'+size+'x'+size+'/animations/process-working.png) no-repeat -'+size+'px 0'
        });
        this._timer = setInterval(function() {
            TangoIconsAnimation._x -= TangoIconsAnimation._size;
            if(TangoIconsAnimation._x == -(8*TangoIconsAnimation._size)) {
                TangoIconsAnimation._x = 0;
                TangoIconsAnimation._y -= TangoIconsAnimation._size;
            }
            if(TangoIconsAnimation._y == -(4*TangoIconsAnimation._size)) {
                TangoIconsAnimation._x = -TangoIconsAnimation._size;
                TangoIconsAnimation._y = 0;
            }
            $(TangoIconsAnimation._el).css('background-position', TangoIconsAnimation._x+'px '+TangoIconsAnimation._y+'px');
        }, speed);
    }
}

//(function($){
//    $.fn.TangoIconsAnimation = function(size, speed) {
//        return this.each(function(){
//            $(this).css({
//                display : 'block',
//                width : size+'px',
//                height : size+'px',
//                background : 'url(images/'+size+'x'+size+'/animations/process-working.png) no-repeat -'+size+'px 0'
//            });
//            setInterval(function() {
//                console.debug(this);
//            }, speed);
//        })
//    }
//})(jQuery)<commit_msg>new animation function<commit_after>function TangoIconsAnimation(selector, size, speed) {
    this._selector = selector;
    this._size = size;
    this._timer = null;
    this._x = 0;
    this._y = 0;
    $(this._selector).css({
        display : 'block',
        width : size+'px',
        height : size+'px',
        background : 'url(images/'+size+'x'+size+'/animations/process-working.png) no-repeat -'+size+'px 0'
    });

    this.start = function() {
        var self = this;
        this._timer = window.setInterval(function() {
            self._x -= self._size;
            if(self._x == -(8*self._size)) {
                self._x = 0;
                self._y -= self._size;
            }
            if(self._y == -(4*self._size)) {
                self._x = -self._size;
                self._y = 0;
            }
            $(self._selector).css('background-position', self._x+'px '+self._y+'px');
        }, speed);
    }

    this.stop = function() {
        window.clearInterval(this._timer);
    }
}
{'fraction_non_alphanumeric': 0.16249533059394844, 'fraction_numerical': 0.0056032872618602915, 'mean_word_length': 1.7215447154471544, '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': '5175178', 'n_tokens_mistral': 835, 'n_tokens_neox': 814, 'n_words': 129}