/ <param name="old" type="Function" />
546519
function () {
            var args = [];
            for (var i = 0, len = arguments.length; i < len; i++) {
                args.push(makeAllEnumerable(arguments[i]));
            }
            return old.apply(this, args);
        }
904823
function replaceParams(ast, keys) {
  Object.keys(ast)
    .filter(key => {
      const value = ast[key]
      return Array.isArray(value) || (typeof value === 'object' && value !== null)
    })
    .forEach(key => {
      const expr = ast[key]

      if (!(typeof expr === 'object' && expr.type === 'param')) return replaceParams(expr, keys)

      if (typeof keys[expr.value] === 'undefined') throw new Error(`no value for parameter :${expr.value} found`)
      ast[key] = createValueExpr(keys[expr.value])
      return null
    })

  return ast
}
1008701
function (oldPath, newPath, callback) {
	fs.rename( oldPath, newPath, function (err) {
		if (err) {
			callback( err );
		} else {
			callback( null, {
				filename: newPath.split( '/' ).pop(),
				filepath: newPath
			});
		}
	});
}
979021
def _wrap_define_function(original_function):
    """"""

    def wrapper(*args, **kwargs):
        """Wrapper function that turns old keyword names to new ones."""
        has_old_names = False
        for old_name, new_name in _six.iteritems(_RENAMED_ARGUMENTS):
            if old_name in kwargs:
                has_old_names = True
                value = kwargs.pop(old_name)
                kwargs[new_name] = value
        if has_old_names:
            _logging.warning(
                "Use of the keyword argument names (flag_name, default_value, "
                "docstring) is deprecated, please use (name, default, help) instead."
            )
        return original_function(*args, **kwargs)

    return wrapper
588404
function reduceFunctionCall(string, functionRE, callback) {
  var call = string
  return getFunctionCalls(string, functionRE).reduce(function(string, obj) {
    return string.replace(obj.functionIdentifier + "(" + obj.matches.body + ")", evalFunctionCall(obj.matches.body, obj.functionIdentifier, callback, call, functionRE))
  }, string)
}
196180
function(inParams, inCallbackFunctionName) {
		if (enyo.isString(inParams)) {
			return inParams.replace("=?", "=" + inCallbackFunctionName);
		} else {
			var params = enyo.mixin({}, inParams);
			params[this.callbackName] = inCallbackFunctionName;
			return enyo.Ajax.objectToQuery(params);
		}
	}
590133
function ( o, knew, old ) {
		if ( o[ knew ] !== undefined ) {
			o[ old ] = o[ knew ];
		}
	}
217615
function (originalMethod) {
            var oSelf = this;
            var callRefreshInfos = function () {
                try {
                    oSelf.refreshInformations();
                } catch (e) {
                    // the function in the setTimeout must never fail
                    // (especially needed in IE)
                }
            };
            return function (arg1, arg2, arg3) {
                // var res = originalMethod.call(this, arg1, arg2, arg3);
                var res = originalMethod.call(this, arg1, arg2, arg3);
                // Note: IE does not support having apply with the arguments array here:
                // var res = originalMethod.apply(this, arguments);
                setTimeout(callRefreshInfos);
                return res;
            };
        }
82194
function isComponentWillChange(oldValue, newValue) {
    const oldType = getObjectType(oldValue);
    const newType = getObjectType(newValue);
    return ((oldType === 'Function' || newType === 'Function') && newType !== oldType);
}
1070092
function (name, value, oldValue) {
                this.$Element.onbind.apply(this, arguments);
                this.onDisabledBind(name, value, oldValue);
            }
563309
function funcType (funcname) {
  if (funcname === 'reduce' || funcname === 'vars' || funcname === 'math' || funcname === 'parse' || funcname === 'placeholder' || funcname === 'reveal' || funcname === 'layout')
    return funcname
  if (funcname === 'link')
    return 'link'
  if (funcname === 'call' || funcname === 'xcall')
    return 'call'
  if (binaryFunction[funcname] || funcname === 'apply' || funcname === 'xapply')
    return 'apply'
  if (varFunction[funcname])
    return 'push'
  if (regexFunction[funcname])
    return 'match'
  if (funcname === 'map' || funcname === 'filter' || funcname === 'numsort' || funcname === 'lexsort')
    return 'map'
  if (funcname === 'strictquote' || funcname === 'quote' || funcname === 'unquote')
    return 'quote'
  return 'list'
}
569705
function paramify(fn){
  //get arguments to function as array of strings
  var args=fn.args=fn.args||      //cache result in args property of function
      fn.toString()               //get string version of function
      .replace(/\/\/.*$|\/\*[\s\S]*?\*\//mg, '')   //strip comments
      .match(/\(.*?\)/m)[0]       //find argument list, including parens
      .match(/[^\s(),]+/g)        //find arguments
  ;
  return args; // or fn?
}
340148
def deprecated(func):
    '''
    '''
    def new_func(*args, **kwargs):
        warn("Call to deprecated function {}.".format(func.__name__),
                      category=DeprecationWarning)
        return func(*args, **kwargs)
    new_func.__name__ = func.__name__
    new_func.__doc__ = func.__doc__
    new_func.__dict__.update(func.__dict__)
    return new_func
1249588
function queryfn(query, oldscope, cb, A, B) {
	var aaa = query.sources.length;

	var ms;
	query.sourceslen = query.sources.length;
	var slen = query.sourceslen;
	query.query = query; // TODO Remove to prevent memory leaks
	query.A = A;
	query.B = B;
	query.cb = cb;
	query.oldscope = oldscope;

	// Run all subqueries before main statement
	if (query.queriesfn) {
		query.sourceslen += query.queriesfn.length;
		slen += query.queriesfn.length;

		query.queriesdata = [];

		//		console.log(8);
		query.queriesfn.forEach(function(q, idx) {
			//			if(query.explain) ms = Date.now();
			//console.log(18,idx);
			//			var res = flatArray(q(query.params,null,queryfn2,(-idx-1),query));

			//			var res = flatArray(queryfn(q.query,null,queryfn2,(-idx-1),query));
			//			console.log(A,B);
			// console.log(q);
			q.query.params = query.params;
			//			query.queriesdata[idx] =

			//	if(false) {
			//			queryfn(q.query,query.oldscope,queryfn2,(-idx-1),query);
			//	} else {
			queryfn2([], -idx - 1, query);
			//	}

			//			console.log(27,q);

			//			query.explaination.push({explid: query.explid++, description:'Query '+idx,ms:Date.now()-ms});
			//			query.queriesdata[idx] = res;
			//			return res;
		});
		//		console.log(9,query.queriesdata.length);
		//		console.log(query.queriesdata[0]);
	}

	var scope;
	if (!oldscope) scope = {};
	else scope = cloneDeep(oldscope);
	query.scope = scope;

	// First - refresh data sources

	var result;
	query.sources.forEach(function(source, idx) {
		//		source.data = query.database.tables[source.tableid].data;
		//		console.log(666,idx);
		source.query = query;
		var rs = source.datafn(query, query.params, queryfn2, idx, alasql);
		//		console.log(333,rs);
		if (typeof rs !== 'undefined') {
			// TODO - this is a hack: check if result is array - check all cases and
			// make it more logical
			if ((query.intofn || query.intoallfn) && Array.isArray(rs)) rs = rs.length;
			result = rs;
		}
		//
		// Ugly hack to use in query.wherefn and source.srcwherefns functions
		// constructions like this.queriesdata['test'].
		// I can elimite it with source.srcwherefn.bind(this)()
		// but it may be slow.
		//
		source.queriesdata = query.queriesdata;
	});
	if (query.sources.length == 0 || 0 === slen) result = queryfn3(query);
	//	console.log(82,aaa,slen,query.sourceslen, query.sources.length);
	return result;
}
372520
function(fun /*, defaults */) {
      var defaults = _.rest(arguments);

      return function(/*args*/) {
        var args = _.toArray(arguments);
        var sz = _.size(defaults);

        for(var i = 0; i < sz; i++) {
          if (!existy(args[i]))
            args[i] = defaults[i];
        }

        return fun.apply(this, args);
      };
    }
389619
def _pycall_path_old(x1: int, y1: int, x2: int, y2: int, handle: Any) -> float:
    """"""
    func, userData = ffi.from_handle(handle)
    return func(x1, y1, x2, y2, userData)
827719
function(param) {
  var str = param.typeExpression;
  var type = param.type;
  if (!type) {
    return escape(str);
  }

  var replaceWithLinkIfPresent = function(type) {
    if (type.name) {
      str = str.replace(type.name, toMarkdownLinkFormat(type.name));
    }
  };

  if (type.type === 'FunctionType') {
    _.each(type.params, replaceWithLinkIfPresent);
  } else if (type.type === 'TypeApplication') {
    // Is this an Array.<type>?
    var match = str.match(/Array\.<(.*)>/);
    if (match) {
      var typeInsideArray = match[1];
      str = str.replace(typeInsideArray, toMarkdownLinkFormat(typeInsideArray));
    }
  } else if (type.type === 'NameExpression') {
    replaceWithLinkIfPresent(type);
  }

  return escape(str);
}