<commit_before>var EdsnSwitch = (function () {
    'use strict';

    var EDSN_THRESHOLD = 30,
        validBaseLoads = /^(base_load|base_load_edsn)$/;

    function swapSelectBox() {
        var technology   = $(this.target).data('type'),
            self         = this,
            unitSelector = $(this.target).find(".units input"),
            units        = parseInt(unitSelector.val(), 10),
            actual       = (units > EDSN_THRESHOLD ? "base_load_edsn" : "base_load"),
            select       = $(".hidden.profile select." + actual).clone(true, true);

        $(this.target).find('.editable.profile select').replaceWith(select);
        $(this.target).find("option[value='" + technology + "']").attr('value', actual);

        unitSelector.off('change.units').on('change.units', swapSelectBox.bind(self));

        return select;
    }

    EdsnSwitch.prototype = {
        isEdsn: function () {
            return validBaseLoads.test($(this).data('type'));
        },

        cloneAndAppendProfileSelect: function () {
            swapSelectBox.call(this);
        }
    };

    function EdsnSwitch() {
        return;
    }

    return EdsnSwitch;
}());
<commit_msg>Set's correct profile id + type for edsn base load<commit_after>var EdsnSwitch = (function () {
    'use strict';

    var EDSN_THRESHOLD = 30,
        validBaseLoads = /^(base_load|base_load_edsn)$/;

    function swapSelectBox() {
        var self         = this,
            type         = $(this.target).data('type'),
            profile      = $(this.target).data('profile'),
            unitSelector = $(this.target).find(".units input"),
            units        = parseInt(unitSelector.val(), 10),
            actual       = (units > EDSN_THRESHOLD ? "base_load_edsn" : "base_load"),
            options      = $(".hidden.profile select." + actual).find("option").clone(true, true),
            select       = $(this.target).find('.editable.profile select');

        select.html(options);

        if(type === actual) {
            select.val(profile);
        } else {
            select.trigger('change');
        }

        $(this.target).set('type', actual);

        unitSelector.off('change.units').on('change.units', swapSelectBox.bind(self));
    }

    EdsnSwitch.prototype = {
        isEdsn: function () {
            return validBaseLoads.test($(this).data('type'));
        },

        cloneAndAppendProfileSelect: function () {
            swapSelectBox.call(this);
        }
    };

    function EdsnSwitch() {
        return;
    }

    return EdsnSwitch;
}());

{'fraction_non_alphanumeric': 0.1539059463661096, 'fraction_numerical': 0.003109211037699184, 'mean_word_length': 2.1049457177322073, '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': '3018946', 'n_tokens_mistral': 761, 'n_tokens_neox': 742, 'n_words': 125}