<commit_before>var CLAZZ, SUPER, slice = Array.prototype.slice;
(function(){
    var nextUID=1;
    CLAZZ = function( name, clazz ){
    	"use strict";
    	if( typeof name == "object" )
    	{
    		clazz = name;
    		name = null;
    	}

    	if( !clazz ) return null;
    	var ctor = clazz["CONSTRUCTOR"], desc = {
    	    __uid : {
				value:0,
				enumerable: false,
				writable: false
			}
    	};
    	var injects = {}, provides = {};
    	var metas = {};
    	var methods = {};
    	var props = {};

        var ret = function(){
/* INJECTION */
            if( this == self )
                return new (ret.bind.apply(ret, [null].concat( slice.call(arguments) )));

            if( nextInstanceName && nextInstanceClazz === ret ){
                ret.singletons[nextInstanceName] = this;
                nextInstanceName = null;
                nextInstanceClazz = null;
            }
/* */
    		var isLast = !this.__uid;
    		if( isLast )
    		{
    		    desc.__uid.value = nextUID++;
    			Object.defineProperties(this, desc);
/* INJECTION */
    			doInjections(this, injects, name);
/* */
    		}

    		if( ctor )
    		{
    			var superBackup = SUPER;
    			SUPER = (ctor.SUPER && ctor.SUPER.bind(this));
    			ctor.apply( this, slice.call(arguments, 0) );
    			SUPER = superBackup;
    		}

    		/* */
    		if( isLast && !clazz.DYNAMIC )
    			Object.seal(this);
    		/* */
    	};

    	ret.properties = props;
    	ret.methods = methods;
    	ret.descriptor = desc;

    	/* FUNCTION SUPER */

    	function getWrapper( func ){
    		return function(){
    			var superBackup = (self||{}).SUPER;
    			var s = func.SUPER;
    			if( s.SUPER ) s = getWrapper(s);
    			SUPER = s.bind(this);
    			var ret = func.apply( this, slice.call(arguments, 0) );
    			SUPER = superBackup;
    			return ret;
    		};
    	}
    	/* */

    	function addMerge(dest, src){
    	    for( var sk in src )
    	        if( !(sk in dest) )
    	            dest[sk] = src[sk];
    	}

    	var cclazz = clazz, sk;
    	while( cclazz ){
    		var base = cclazz["EXTENDS"];
    		if( typeof base == "string" ) base = resolve(base);

    		for( var k in cclazz )
    		{
    			if(
    				k == "EXTENDS" ||
    				k == "ENUMERABLE" ||
    				k in desc
    			) continue;

    			var v = cclazz[k];
			    /* INJECTION */
    			if( k == "INJECT" ){
    			    if( Array.isArray(v) ){
        			    for( sk=0; sk<v.length; ++sk ){
        					if( !(v[sk] in injects) )
            			        injects[v[sk]] = v[sk]
        			    }
    			    }else addMerge(injects, v);
    				continue;
    			}
    			if( k == "PROVIDES" ){
    			    addMerge(provides, v);
    				continue;
    			}
			    /* */
    			if( k == "MIXIN" ){
    			    for( sk=0; sk<v.length; ++sk ){
    			        var mix = v[sk];
    			        if( typeof mix == "string" ) mix = resolve(v[sk]);
    			        if(mix.descriptor)
    			            addMerge(desc, mix.descriptor);
    			    }
    			    continue;
    			}
    			if( k == "STATIC" ){
    			    addMerge(ret, v);
    				continue;
    			}

    			var obj = {};
    			if( typeof v == "function" )
    			{
					if( k == "CONSTRUCTOR" )
					{
						v.SUPER = cclazz["EXTENDS"];
						if( typeof v.SUPER == "string" )
							v.SUPER = resolve( v.SUPER );
						continue;
				    }
				    /* FUNCTION SUPER */
    				if( cclazz["EXTENDS"] )
    				{
						var cbase = base;
						while( cbase && cbase.CLAZZ && !cbase.CLAZZ[k] )
						{
							cbase = cbase.CLAZZ["EXTENDS"];
							if( typeof cbase == "string" )
								cbase = resolve(cbase);
						}

						if( cbase && cbase.CLAZZ && cbase.CLAZZ[k] ){
							v.SUPER = cbase.CLAZZ[k];
							v = getWrapper(v);
						}
    				}
    				/* */

    				obj.writable = clazz["DYNAMIC"] == true;
    				methods[k] = v;
    			}
    			/* META * /else if( k.charAt(0) == "@" )
    			{
    				metas[k.substr(1, k.length)] = v;
    				continue;
    			} /* */
    			else
    			{
					obj.writable = true;
					props[k] = v;<commit_msg>support for overloading function operator in clazz.<commit_after>var CLAZZ, SUPER, slice = Array.prototype.slice;
(function(){
    var nextUID=1;
    CLAZZ = function( name, clazz ){
    	"use strict";
    	if( typeof name == "object" )
    	{
    		clazz = name;
    		name = null;
    	}

    	if( !clazz ) return null;
    	var ctor = clazz["CONSTRUCTOR"], desc = {
    	    __uid : {
				value:0,
				enumerable: false,
				writable: false
			}
    	};
    	var injects = {}, provides = {};
    	var metas = {}, methods = {}, props = {}, opFunc = null;

        var ret = function(){
			if( opFunc && typeof this !== "function" ){
				var fwd = function(){ return opFunc.apply(fwd, slice.call(arguments, 0)); };
				ret.apply(fwd, slice.call(arguments,0));
				return fwd;
			}

            if( this == self )
                return new (ret.bind.apply(ret, [null].concat( slice.call(arguments, 0) )));

/* INJECTION */
            if( nextInstanceName && nextInstanceClazz === ret ){
                ret.singletons[nextInstanceName] = this;
                nextInstanceName = null;
                nextInstanceClazz = null;
            }
/* */
    		var isLast = !this.__uid;
    		if( isLast )
    		{
    		    desc.__uid.value = nextUID++;
    			Object.defineProperties(this, desc);
/* INJECTION */
    			doInjections(this, injects, name);
/* */
    		}

    		if( ctor )
    		{
    			var superBackup = SUPER;
    			SUPER = (ctor.SUPER && ctor.SUPER.bind(this));
    			ctor.apply( this, slice.call(arguments, 0) );
    			SUPER = superBackup;
    		}

    		/* */
    		if( isLast && !clazz.DYNAMIC )
    			Object.seal(this);
    		/* */
    	};

    	ret.properties = props;
    	ret.methods = methods;
    	ret.descriptor = desc;

    	/* FUNCTION SUPER */

    	function getWrapper( func ){
    		return function(){
    			var superBackup = (self||{}).SUPER;
    			var s = func.SUPER;
    			if( s.SUPER ) s = getWrapper(s);
    			SUPER = s.bind(this);
    			var ret = func.apply( this, slice.call(arguments, 0) );
    			SUPER = superBackup;
    			return ret;
    		};
    	}
    	/* */

    	function addMerge(dest, src){
    	    for( var sk in src )
    	        if( !(sk in dest) )
    	            dest[sk] = src[sk];
    	}

    	var cclazz = clazz, sk;
    	while( cclazz ){
    		var base = cclazz["EXTENDS"];
    		if( typeof base == "string" ) base = resolve(base);

    		for( var k in cclazz )
    		{
    			if(
    				k == "EXTENDS" ||
    				k == "ENUMERABLE" ||
    				k in desc
    			) continue;

    			var v = cclazz[k];
			    /* INJECTION */
    			if( k == "INJECT" ){
    			    if( Array.isArray(v) ){
        			    for( sk=0; sk<v.length; ++sk ){
        					if( !(v[sk] in injects) )
            			        injects[v[sk]] = v[sk]
        			    }
    			    }else addMerge(injects, v);
    				continue;
    			}
    			if( k == "PROVIDES" ){
    			    addMerge(provides, v);
    				continue;
    			}
			    /* */
    			if( k == "MIXIN" ){
    			    for( sk=0; sk<v.length; ++sk ){
    			        var mix = v[sk];
    			        if( typeof mix == "string" ) mix = resolve(v[sk]);
    			        if(mix.descriptor)
    			            addMerge(desc, mix.descriptor);
    			    }
    			    continue;
    			}
    			if( k == "STATIC" ){
    			    addMerge(ret, v);
    				continue;
    			}

    			var obj = {};
    			if( typeof v == "function" )
    			{
					if( k == "CONSTRUCTOR" )
					{
						v.SUPER = cclazz["EXTENDS"];
						if( typeof v.SUPER == "string" )
							v.SUPER = resolve( v.SUPER );
						continue;
				    }
					if( k == "FUNCTION" ){
						opFunc = v;
						continue;
					}
				    /* FUNCTION SUPER */
    				if( cclazz["EXTENDS"] )
    				{
						var cbase = base;
						while( cbase && cbase.CLAZZ && !cbase.CLAZZ[k] )
						{
							cbase = cbase.CLAZZ["EXTENDS"];
							if( typeof cbase == "string" )
								cbase = resolve(cbase);
						}

						if( cbase && cbase.CLAZZ && cbase.CLAZZ[k] ){
							v.SUPER = cbase.CLAZZ[k];
							v = getWrapper(v);
						}
    				}
    				/* */

    				obj.writable = clazz["DYNAMIC"] == true;
    				methods[k] = v;
    			}
    			/* META * /else if( k.charAt(0) == "@" )
    			{
    				metas[k.substr(1, k.length)] = v;
    				continue;
    			} /* */
    			else
    			{
					obj.writable = true;
					props[k] = v;
{'fraction_non_alphanumeric': 0.15261282660332542, 'fraction_numerical': 0.0022565320665083135, 'mean_word_length': 1.444412191582003, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4061802', 'n_tokens_mistral': 3670, 'n_tokens_neox': 3133, 'n_words': 618}