<commit_before>/**
* prototype_class.js
* Simple JavaScript Oriented Object Programming Suporter.
* version 1.0
**/
var PrototypeClass = {

    /**
    * Define as propriedades e comportamentos do objeto
    **/
    prototype : {
        initialize: function () {
        },

        /**
        * Verifica se o objeto eh inctancia de uma clase
        **/
        instanceof: function (cls) {
            return cls.prototype.isPrototypeOf(this);
        },
    
        /**
        * Invoca um membro do objeto/prototipo pai
        * @param arguments(0) The member name
        * @param arguments(1...) The member arguments
        * @test funcao esta instavel
        **/
        super: function () {
            var arguments = [].splice.call(arguments, 0);
            var memberName = arguments[0];
            var args = [];
            if (arguments.length > 1) {
                args = arguments.slice(1, arguments.length);
            }
            return this.class.super(this, memberName, args);
        }

    },

    /**
    * Constroi e inicializa o objeto
    **/
    create : function () {
        var instance = Object.create(this.prototype);
        instance.class = this;
        instance.initialize.apply(instance, arguments);
        return instance;
    },

    /**
    * Extende a classe com as propriedades no estilo descritivo
    * @param propertyDescriptors property Descriptors (dict) 
    **/
    dextend: function (propertyDescriptors) {

        if (typeof propertyDescriptors.prototype !== "undefined"
                && typeof propertyDescriptors.prototype.value !== "undefined") {
            propertyDescriptors.prototype.value = Object.create(this.prototype, propertyDescriptors.prototype.value);
        }

        return Object.create(this, propertyDescriptors);

    },

    /**
    * Extende a classe
    * @param property As novas propriedades
    **/
    extend: function () {

        if (arguments.length == 2) {
            var type = arguments[0];
            var properties = arguments[1];

            if (type === "prototype") {
                return this.pextend(properties);
            } else if (type === "descriptors") {
                return this.dextend(properties);
            } else if (type === "normal") {
                return this.dextend(this.descriptoralize(properties));
            }

        } else {
            var properties = arguments[0];
            return this.dextend(this.descriptoralize(properties));
        }
    },

    /**
    * Extende apenas o prototipo da classe
    * @param prototype_properties As novas propriedades
    **/<commit_msg>refct<commit_after>/**
* prototype_class.js
* Simple JavaScript Oriented Object Programming Suporter.
* version 1.0
**/
var PrototypeClass = {

    /**
    * Define as propriedades e comportamentos do objeto
    **/
    prototype : {
        initialize: function () {
        },

        /**
        * Verifica se o objeto eh inctancia de uma clase
        **/
        instanceof: function (cls) {
            return cls.prototype.isPrototypeOf(this);
        },
    
        /**
        * Invoca um membro do objeto/prototipo pai
        * @param arguments(0) The member name
        * @param arguments(1...) The member arguments
        * @test funcao esta instavel
        **/
        super: function () {
            var arguments = [].splice.call(arguments, 0);
            var memberName = arguments[0];
            var args = [];
            if (arguments.length > 1) {
                args = arguments.slice(1, arguments.length);
            }
            return this.class.super(this, memberName, args);
        }

    },

    /**
    * Constroi e inicializa o objeto
    **/
    create : function () {
        var instance = Object.create(this.prototype);
        instance.class = this;
        instance.initialize.apply(instance, arguments);
        return instance;
    },

    /**
    * Extende a classe com as propriedades no estilo descritivo
    * @param propertyDescriptors property Descriptors (dict) 
    **/
    dextend: function (propertyDescriptors) {

        if (typeof propertyDescriptors.prototype !== "undefined"
                && typeof propertyDescriptors.prototype.value !== "undefined") {
            propertyDescriptors.prototype.value = Object.create(this.prototype, propertyDescriptors.prototype.value);
        }

        return Object.create(this, propertyDescriptors);

    },

    /**
    * Extende a classe
    * @param property As novas propriedades
    **/
    extend: function () {

        if (arguments.length == 2) {
            var options = arguments[0];
            var properties = arguments[1];

            if (options.scope !== "undefined" && options.scope === "prototype") {
                return this.pextend(properties);
            } else if (options.scope !== "undefined" && options.scope === "all") {
                return this.dextend(this.descriptoralize(properties));
            }

        } else {
            var properties = arguments[0];
            return this.dextend(this.descriptoralize(properties));
        }
    },

    /**
    * Extende apenas o prototipo da classe
    * @param prototype_properties As novas propriedades
    **/
{'fraction_non_alphanumeric': 0.11176920137562094, 'fraction_numerical': 0.0045854031333588076, 'mean_word_length': 1.916434540389972, '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': '4289087', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1402, 'n_words': 350}