<commit_before>define(function () {
    "use strict";

    /**
     * Used as the base class from which all form elements should extend that primarily provides methods
     * that eliminate code redundancy and provide fallbacks for methods that which all forms should have.
     * @param options
     * @constructor
     */
    var BaseFormElement = function (options) {
        this.initialize(options);
    };

    BaseFormElement.prototype = {

        /**
         * Sets up stuff.
         */
        initialize: function (options) {},

        /**
         * Gets the form element.
         * @returns {HTMLInputElement} Returns the input field element
         * @abstract
         */
        getFormElement: function () {
            console.error('form element: getFormElement() method not implemented');
        },

        /**
         * Gets the ui version of the form element.
         * @returns {HTMLElement} Returns the checkbox div element.
         * @abstract
         */
        getUIElement: function () {
            console.error('form element: getUIElement() method not implemented');
        },

        /**
         * Enables the form element.
         */
        enable: function () {
            this.getFormElement().disabled = false;
        },

        /**
         * Disables the form element.
         */
        disable: function () {
            this.getFormElement().disabled = true;
        },

        /**
         * Gets the key (must be unique from all other form elements) that is associated.
         * @returns {string} Return the unique key
         * @abstract
         */
        getElementKey: function () {
            console.error('form element: getUIElement() method not implemented');
        },

        /**
         * Destruction of this class.
         */
        destroy: function () {}

    };

    return BaseFormElement;
});<commit_msg>Adding defaults to base form element class<commit_after>define(function () {
    "use strict";

    /**
     * Used as the base class from which all form elements should extend that primarily provides methods
     * that eliminate code redundancy and provide fallbacks for methods that which all forms should have.
     * @param options
     * @constructor
     */
    var BaseFormElement = function (options) {
        this.initialize(options);
    };

    BaseFormElement.prototype = {

        /**
         * Sets up stuff.
         */
        initialize: function (options) {},

        /**
         * Gets the form element.
         * @returns {HTMLElement} Returns the form element
         * @abstract
         */
        getFormElement: function () {
            return this.el;
        },

        /**
         * Gets the ui version of the form element.
         * @returns {HTMLElement} Returns the ui-version of the element.
         * @abstract
         */
        getUIElement: function () {
            return this.getFormElement();
        },

        /**
         * Enables the form element.
         */
        enable: function () {
            this.getFormElement().disabled = false;
        },

        /**
         * Disables the form element.
         */
        disable: function () {
            this.getFormElement().disabled = true;
        },

        /**
         * Gets the element's identifier (preferably unique form all other form elements).
         * @returns {string} Return the unique key
         * @abstract
         */
        getElementKey: function () {
            return 'element';
        },

        /**
         * Destruction of this class.
         */
        destroy: function () {}

    };

    return BaseFormElement;
});
{'fraction_non_alphanumeric': 0.09986357435197817, 'fraction_numerical': 0.0, 'mean_word_length': 1.6148359486447932, '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': '5090781', 'n_tokens_mistral': 888, 'n_tokens_neox': 858, 'n_words': 283}