<commit_before>/*global jQuery*/

(function ($) {
    'use strict';

    function initHtml($el) {
        var html;

        html = '<div class="smartTabsSystem"><div class="smartTabsHeader">';
        html += '<ul class="smartTabsList"></ul></div><div class="smartTabsBody"></div></div>';

        $el.append(html);
    }

    function createTabs(listTabs) {
        var i;

        for (i = 0; i < listTabs.length; i += 1) {
            $('.smartTabsList').append('<li class="smartTabsTabTitle">' + listTabs[i].title + '</li>');
            $('.smartTabsBody').append('<div class="smartTabsContent">' + $('#' + listTabs[i].templateId).html() + '</div>');
        }
    }

    $.fn.smartTabs = function (options) {
        var $this = $(this);

        initHtml($this);

        createTabs(options || []);

    };

}(jQuery));<commit_msg>Improving performance by limiting direct DOM Manipulation<commit_after>/*global jQuery*/

(function ($) {
    'use strict';

    function initHtml($el) {
        var html;

        html = '<div class="smartTabsSystem"><div class="smartTabsHeader">';
        html += '<ul class="smartTabsList"></ul></div><div class="smartTabsBody"></div></div>';

        $el.append(html);
    }

    function createTabs(listTabs) {
        var i,
            htmlTitles = '',
            htmlContents = '';

        for (i = 0; i < listTabs.length; i += 1) {
            htmlTitles += '<li class="smartTabsTabTitle">' + listTabs[i].title + '</li>';
            htmlContents += '<div class="smartTabsContent">' + $('#' + listTabs[i].templateId).html() + '</div>';
        }

        $('.smartTabsList').append(htmlTitles);
        $('.smartTabsBody').append(htmlContents);

    }

    $.fn.smartTabs = function (options) {
        var $this = $(this);

        initHtml($this);

        createTabs(options || []);

    };

}(jQuery));
{'fraction_non_alphanumeric': 0.19935344827586207, 'fraction_numerical': 0.0021551724137931034, 'mean_word_length': 2.537142857142857, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 27, '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': '2735357', 'n_tokens_mistral': 605, 'n_tokens_neox': 579, 'n_words': 103}