<commit_before>(function(){
	//* @protected
	enyo.global = this;

    //*@protected
    /**
        Used internally by the enyo.uid method to be able to produce
        a runtime unique identifier.
    */
    var uidCounter = 0;

    //*@public
    /**
        An IE8 compatible polyfill-replacement for the String object's
        indexOf method. If that method exists it will be used instead.
        Accepts the string to search and the needle (string) to search
        for within that string. Returns the index at which the needle
        was first encountered and -1 if it could not be found.
    */
    var stringIndexOf = enyo.stringIndexOf = function (haystack, needle) {
        var idx = -1;
        if ("string" === typeof haystack) {
            if (haystack.indexOf) return haystack.indexOf(needle);
            else {
                // TODO: need to test the performance of a string
                // brute-force walk/search versus a regular expression
                // test/fallback
            }
        }

        return -1;
    };
    
    //*@public
    /**
        Simple test condition to determine if a target is undefined.
    */
    var exists = enyo.exists = function (target) {
        return !(undefined === target);
    };
    
    //*@protected
    /**
        Internally used method to strip leading '.' from string paths.
    */
    var preparePath = function (path) {
        var idx = 0;
        while ("." === path[idx]) ++idx;
        if (0 !== idx) path = path.slice(idx);
        return path;
    };
    
    //*@protected
    /**
        Internally used method to detect if the given value exists,
        is a function and a computed property. Returns true if these
        tests are successful false otherwise.
    */
    var isComputed = function (target) {
        return target && "function" === typeof target && true === target.isProperty;
    };
    
    //*@protected
    /**
        Internally used method to detect if the given value exists,
        is a function and an overloaded getter. Returns true if these
        tests are successful false otherwise.
    */
    var isOverloaded = function (target) {
        return target && "function" === typeof target && true === target.overloaded;
    };

    //*@public
    /**
        A fast-path enabled global getter that takes a string path that
        can be a full-path (from context window/enyo) or a relative path
        (to the execution context of the method). It knows how to check for
        and call the backwards-compatible generated getters as well as
        handle computed properties. This is an optimized recursive-search.
        Will return undefined if the object at the given path could not be
        found. Can safely be called on non-existent paths.
    */
    enyo.getPath = function (path, recursive) {
        // if we don't have a path or it isn't a string we can't do anything
        if (!exists(path) || "string" !== typeof path) return undefined;
        // on rare occasions this method would be called under the context
        // of enyo itself, the problem is detecting when this is intended since
        // under normal circumstances a general call would assume a window
        // context - here we see the _recursive_ parameter taking a double
        // meaning as enyo should _never be used as a reference on another object_
        // and as long as that is true this will never fail - so if enyo is to be
        // used as the context root and not window pass the second parameter as true
        // knowing during recursion enyo should never be the context and its normal
        // use case would prevail
        var cur = this === enyo && true !== recursive? window: this;
        var idx = 0;
        var val;
        var part;
        var fn;
        // clear any leading periods
        path = preparePath(path);
        // find the initial period if any from our ie8 safe polyfill
        idx = stringIndexOf(path, ".");
        // if there isn't any try and find the path relative to our
        // current context, this is the fast path
        if (-1 === idx) {
            // figure out what our default/backwards-compatible getter
            // function would be
            fn = "get" + enyo.cap(path);
            // if that path exists relative to our context check to see
            // if it is an overloaded getter and call that if it is otherwise
            // just grab that path knowing if we get undefined that is ok
            val = isOverloaded(cur[fn])? cur[fn].call(this): cur[path];
        } else {
            // begin our recursive search
            part = path.substring(0, idx);
            path = path.slice(idx);
            if ("object" === typeof cur[part]) {
                // if we can find the given part of the string path
                // we recursively call the getPath method using that
                // as the new context
                val = enyo.getPath.call(cur[part], path, true);
            } else {
                // we have no idea what we could do because we can't find
                // anything useful
                return undefined;
            }
        }
        // if the return value is a function check to see if it is
        // a computed property and if this is _not a recursive search_
        // go ahead and call it, otherwise return it as a function
        if ("function" === typeof val && true === val.isProperty) {
            if (true !== recursive) return val.call(this);
        }
        // otherwise we've reached the end so return whatever we have
        return val;
    };
    
    //*@public
    /**
        A global setter that takes a string path (relative to the methods
        execution context) or a full-path (relative to window). It attempts
        to automatically retrieve any previous value if it exists to supply
        to any observers. If the context is an enyo.Object or subkind it will
        use the notifyObservers method to trigger listeners for the path
        being set. If the previous value is the equivalent of the newly set<commit_msg>clarify parameter<commit_after>(function(){
	//* @protected
	enyo.global = this;

    //*@protected
    /**
        Used internally by the enyo.uid method to be able to produce
        a runtime unique identifier.
    */
    var uidCounter = 0;

    //*@public
    /**
        An IE8 compatible polyfill-replacement for the String object's
        indexOf method. If that method exists it will be used instead.
        Accepts the string to search and the needle (string) to search
        for within that string. Returns the index at which the needle
        was first encountered and -1 if it could not be found.
    */
    var stringIndexOf = enyo.stringIndexOf = function (haystack, needle) {
        var idx = -1;
        if ("string" === typeof haystack) {
            if (haystack.indexOf) return haystack.indexOf(needle);
            else {
                // TODO: need to test the performance of a string
                // brute-force walk/search versus a regular expression
                // test/fallback
            }
        }

        return -1;
    };
    
    //*@public
    /**
        Simple test condition to determine if a target is undefined.
    */
    var exists = enyo.exists = function (target) {
        return !(undefined === target);
    };
    
    //*@protected
    /**
        Internally used method to strip leading '.' from string paths.
    */
    var preparePath = function (path) {
        var idx = 0;
        while ("." === path[idx]) ++idx;
        if (0 !== idx) path = path.slice(idx);
        return path;
    };
    
    //*@protected
    /**
        Internally used method to detect if the given value exists,
        is a function and a computed property. Returns true if these
        tests are successful false otherwise.
    */
    var isComputed = function (target) {
        return target && "function" === typeof target && true === target.isProperty;
    };
    
    //*@protected
    /**
        Internally used method to detect if the given value exists,
        is a function and an overloaded getter. Returns true if these
        tests are successful false otherwise.
    */
    var isOverloaded = function (target) {
        return target && "function" === typeof target && true === target.overloaded;
    };

    //*@public
    /**
        A fast-path enabled global getter that takes a string path that
        can be a full-path (from context window/enyo) or a relative path
        (to the execution context of the method). It knows how to check for
        and call the backwards-compatible generated getters as well as
        handle computed properties. This is an optimized recursive-search.
        Will return undefined if the object at the given path could not be
        found. Can safely be called on non-existent paths.
    */
    enyo.getPath = function (path, recursing) {
        // if we don't have a path or it isn't a string we can't do anything
        if (!exists(path) || "string" !== typeof path) return undefined;
        // on rare occasions this method would be called under the context
        // of enyo itself, the problem is detecting when this is intended since
        // under normal circumstances a general call would assume a window
        // context - here we see the _recursing_ parameter taking a double
        // meaning as enyo should _never be used as a reference on another object_
        // and as long as that is true this will never fail - so if enyo is to be
        // used as the context root and not window pass the second parameter as true
        // knowing during recursion enyo should never be the context and its normal
        // use case would prevail
        var cur = this === enyo && true !== recursing? window: this;
        var idx = 0;
        var val;
        var part;
        var fn;
        // clear any leading periods
        path = preparePath(path);
        // find the initial period if any from our ie8 safe polyfill
        idx = stringIndexOf(path, ".");
        // if there isn't any try and find the path relative to our
        // current context, this is the fast path
        if (-1 === idx) {
            // figure out what our default/backwards-compatible getter
            // function would be
            fn = "get" + enyo.cap(path);
            // if that path exists relative to our context check to see
            // if it is an overloaded getter and call that if it is otherwise
            // just grab that path knowing if we get undefined that is ok
            val = isOverloaded(cur[fn])? cur[fn].call(this): cur[path];
        } else {
            // begin our recursive search
            part = path.substring(0, idx);
            path = path.slice(idx);
            if ("object" === typeof cur[part]) {
                // if we can find the given part of the string path
                // we recursively call the getPath method using that
                // as the new context
                val = enyo.getPath.call(cur[part], path, true);
            } else {
                // we have no idea what we could do because we can't find
                // anything useful
                return undefined;
            }
        }
        // if the return value is a function check to see if it is
        // a computed property and if this is _not a recursive search_
        // go ahead and call it, otherwise return it as a function
        if ("function" === typeof val && true === val.isProperty) {
            if (true !== recursing) return val.call(this);
        }
        // otherwise we've reached the end so return whatever we have
        return val;
    };
    
    //*@public
    /**
        A global setter that takes a string path (relative to the methods
        execution context) or a full-path (relative to window). It attempts
        to automatically retrieve any previous value if it exists to supply
        to any observers. If the context is an enyo.Object or subkind it will
        use the notifyObservers method to trigger listeners for the path
        being set. If the previous value is the equivalent of the newly set
{'fraction_non_alphanumeric': 0.07775413324603045, 'fraction_numerical': 0.0018006220330659681, 'mean_word_length': 1.8791234684260132, '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': '6235512', 'n_tokens_mistral': 3032, 'n_tokens_neox': 2955, 'n_words': 1466}