<commit_before>var MetaTraderUI = (function() {
    "use strict";

    var hiddenClass,
        errorClass,
        $form,
        isValid,
        isAuthenticated,
        hasGamingCompany,
        hasFinancialCompany,
        currency,
        highlightBalance,
        mt5Logins,
        mt5Accounts;

    var init = function() {
        MetaTraderData.initSocket();
        if(!TUser.get().hasOwnProperty('is_virtual')) {
            return; // authorize response is not received yet
        }

        hiddenClass = 'invisible';
        errorClass  = 'errorfield';
        currency    = 'USD';
        mt5Logins   = {};
        mt5Accounts = {};
        highlightBalance = false;

        Content.populate();

        MetaTraderData.requestLandingCompany();
    };

    var initOk = function() {
        findInSection('demo', '.form-new-account').contents().clone().appendTo('#section-financial .form-new-account');
        if(hasGamingCompany) {
            $('#section-financial').contents().clone().appendTo('#section-volatility');
            $('#section-volatility > h3').text(text.localize('Volatility Indices Account'));
        } else {
            hideAccount('volatility');
        }
        if(!hasFinancialCompany) {
            hideAccount('financial');
        }

        MetaTraderData.requestLoginList();

        // Tab
        $('.sidebar-nav li a').click(function(e) {
            e.preventDefault();
            displayTab($(this).attr('href').substring(1));
        });

        $('#mt-container').removeClass(hiddenClass);
    };<commit_msg>Do not clone forms more than once<commit_after>var MetaTraderUI = (function() {
    "use strict";

    var hiddenClass,
        errorClass,
        $form,
        isValid,
        isAuthenticated,
        hasGamingCompany,
        hasFinancialCompany,
        currency,
        highlightBalance,
        mt5Logins,
        mt5Accounts;

    var init = function() {
        MetaTraderData.initSocket();
        if(!TUser.get().hasOwnProperty('is_virtual')) {
            return; // authorize response is not received yet
        }

        hiddenClass = 'invisible';
        errorClass  = 'errorfield';
        currency    = 'USD';
        mt5Logins   = {};
        mt5Accounts = {};
        highlightBalance = false;

        Content.populate();

        MetaTraderData.requestLandingCompany();
    };

    var initOk = function() {
        if($('#section-financial .form-new-account').contents().length === 0) {
            findInSection('demo', '.form-new-account').contents().clone().appendTo('#section-financial .form-new-account');
            if(hasGamingCompany) {
                $('#section-financial').contents().clone().appendTo('#section-volatility');
                $('#section-volatility > h3').text(text.localize('Volatility Indices Account'));
            } else {
                hideAccount('volatility');
            }
            if(!hasFinancialCompany) {
                hideAccount('financial');
            }
        }

        MetaTraderData.requestLoginList();

        // Tab
        $('.sidebar-nav li a').click(function(e) {
            e.preventDefault();
            displayTab($(this).attr('href').substring(1));
        });

        $('#mt-container').removeClass(hiddenClass);
    };
{'fraction_non_alphanumeric': 0.14090079123554475, 'fraction_numerical': 0.003956177723676202, 'mean_word_length': 2.0128322639780016, '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': '6545412', 'n_tokens_mistral': 900, 'n_tokens_neox': 876, 'n_words': 139}