function processURL()
This will process the URL and extract the parameters from it.
178828
private function processURL(): void
    {
        $defaultPath = '';
        $basePath = explode('?', urldecode($_SERVER['REQUEST_URI']));
        $requestURI = explode('/', rtrim($basePath[0], '/'));
        $requestURI[0] = strtoupper($_SERVER['REQUEST_METHOD']);
        $scriptName = explode('/', $_SERVER['SCRIPT_NAME']);
        $sizeofRequestURI = sizeof($requestURI);
        $sizeofScriptName = sizeof($scriptName);
        for ($x = 0; $x < $sizeofRequestURI && $x < $sizeofScriptName; $x++) {
            if (strtolower($requestURI[$x]) == strtolower($scriptName[$x])) {
                $defaultPath .= '/' . $requestURI[$x];
                unset($requestURI[$x]);
            }
        }
        $this->default = $defaultPath . $this->default;
        if (!$this->isFullUrl($this->defaultMobileApp)) {
            $this->defaultMobileApp = $defaultPath . $this->defaultMobileApp;
        }
        $this->parameters = array_values($requestURI);
    }
987919
function parseUrls(text, options, callback) {
	var urls = [],
		words,
		x = 0,
		i;

	// is a text string
	if (text && utils.isString(text) && text !== '') {

		// break texts into words
		words = [text];
		if (text.indexOf(' ') > -1) {
			words = text.split(' ');
		}

		// finds urls in text
		i = words.length;
		while (x < i) {
			var word = utils.trim(words[x]);

			if (word.indexOf('http:') === 0 || word.indexOf('https:') === 0) {
				urls.push({
					match: word,
					url: word
				});

			} else if (word.indexOf('pic.twitter.com/') === 0) {
				urls.push({
					match: word,
					url: 'https://' + word
				});

			} else if (word.indexOf('vine.co/v/') === 0) {
				urls.push({
					match: word,
					url: 'https://' + word
				});

			}
			x++;
		}

	}
	callback(null, urls);
}
1074426
function processRequest()
    {
        $namespaceURI = 'unknown_namespace_uri';

        /// @todo dechunk, correct encoding, check for supported
        /// http features of the client, etc...
        $data = $this->RawPostData;

        $data = $this->inflateRequest( $data );
        if ( $data === false )
        {
            $this->showResponse(
                'unknown_function_name',
                $namespaceURI,
                new ggWebservicesFault( self::INVALIDCOMPRESSIONERROR, self::INVALIDCOMPRESSIONSTRING ) );
        }

        $request = $this->parseRequest( $data );

        if ( !is_object( $request ) ) /// @todo use is_a instead
        {
            $this->showResponse(
                'unknown_function_name',
                $namespaceURI,
                new ggWebservicesFault( self::INVALIDREQUESTERROR, self::INVALIDREQUESTSTRING ) );
        }
        else
        {
            $this->processRequestObj( $request );
        }
    }
460189
def _parse_url(url=None):
    """"""
    if url is None:
        return ('', '')

    scheme, netloc, path, _, _ = parse.urlsplit(url)

    if scheme != 's3':
        raise InvalidURL(url, "URL scheme must be s3://")

    if path and not netloc:
        raise InvalidURL(url)

    return netloc, path[1:]
1174648
def process(input)
			# get current_url source
			doc = get(@current_url)
			
			if input.is_a?(Hash)
				result = Hash.new
				input.each{|k,v| result[k] = process_appropriate(doc,v)}
				return result
			else
				return process_appropriate(doc,input)
			end

			nil
		end
503143
function(url, decode) {

      // If we're passed an object, convert it to a string
      if (typeof url === 'object') url = url.toString();

      // Default decode to true
      if (typeof decode === 'undefined') decode = true;

      // Extract query string from url
      var query_string = this.search(url);

      // Replace the starting ?, if it is there
      query_string = query_string.replace(/^\?/, '');

      var parts;

      // If query string is blank, parts should be blank
      if (query_string === '') {
        parts = [];
      } else {
        // Split the query string into key value parts
        parts = query_string.split('&');
      }

      // Iniate the return value
      var query = {};

      // Loop through each other the parts, splitting it into keys and values
      for (var i = 0, l = parts.length; i < l; i++) {
        var part = parts[i];
        var key;
        var val = '';

        if (part.match('=')) {
          // If it is in the format key=val

          // Split into the key and value by the = symbol
          var part_parts = part.split('=');

          // Assign key and value
          key = part_parts[0];
          val = part_parts[1];
        } else {
          // If there is no value, just set the key to the full part
          key = part;
        }

        // If we actually have a value, URI decode it
        if (val !== '' && decode) {
          val = decodeURIComponent(val);
        }

        // Assign to the return value
        query[key] = val;
      }

      return query;
    }
613916
function processUrls(code)
    {
        var gt = /(.*)((&gt;|&lt;).*)/;

        return code.replace(sh.regexLib.url, function(m)
        {
            var suffix = '',
                match = null
                ;

            // We include &lt; and &gt; in the URL for the common cases like <http://google.com>
            // The problem is that they get transformed into &lt;http://google.com&gt;
            // Where as &gt; easily looks like part of the URL string.

            if (match = gt.exec(m))
            {
                m = match[1];
                suffix = match[2];
            }

            return '<a href="' + m + '">' + m + '</a>' + suffix;
        });
    }
760178
function splitURL(url) {
    var method, path, match = /^([A-Z]+)(?:\s+|$)/.exec(url);
    if (match) {
        method = match[1];
        path = /^[A-Z]+\s+(.*)$/.exec(url);
        url = path ? path[1]: '';
    }
    return {url: url, method: method};
}
250754
def process_index(self, url, page):
        """"""

        def scan(link):
            # Process a URL to see if it's for a package page
            if link.startswith(self.index_url):
                parts = list(map(
                    urllib.parse.unquote, link[len(self.index_url):].split('/')
                ))
                if len(parts) == 2 and '#' not in parts[1]:
                    # it's a package page, sanitize and index it
                    pkg = safe_name(parts[0])
                    ver = safe_version(parts[1])
                    self.package_pages.setdefault(pkg.lower(), {})[link] = True
                    return to_filename(pkg), to_filename(ver)
            return None, None

        # process an index page into the package-page index
        for match in HREF.finditer(page):
            try:
                scan(urllib.parse.urljoin(url, htmldecode(match.group(1))))
            except ValueError:
                pass

        pkg, ver = scan(url)  # ensure this page is in the page index
        if pkg:
            # process individual package page
            for new_url in find_external_links(url, page):
                # Process the found URL
                base, frag = egg_info_for_url(new_url)
                if base.endswith('.py') and not frag:
                    if ver:
                        new_url += '#egg=%s-%s' % (pkg, ver)
                    else:
                        self.need_version_info(url)
                self.scan_url(new_url)

            return PYPI_MD5.sub(
                lambda m: '<a href="%s#md5=%s">%s</a>' % m.group(1, 3, 2), page
            )
        else:
            return ""
1351371
function buildUrl(urlPattern, customParams) {
    var url = formatUrl.apply(null, urlPattern);

    url = appendParams(url, customParams);
    return url;
  }
1144661
function(url, processRes){
                var self = this;

                //iterators
                var key, header;

                var method      = data.method || 'get';
                var async       = data.sync !== true;
                var request     = new XMLHttpRequest();
                var _data       = data.data;
                var body        = data.body;
                var contentType = this.header('Content-Type');
                var timeout     = data.timeout;
                var timeoutId;
                var isUrlEncoded;
                var openParams;

                //guess content type
                if(!contentType && _data && _dataInBody()){
                    this.header('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8');
                    contentType = this.header('Content-Type');
                }

                //if data is used in body, it needs some modifications regarding the content type
                if(_data && _dataInBody()){
                    if(typeof body !== 'string'){
                        body = '';
                    }

                    if(contentType.indexOf('json') > -1){
                        try {
                            body = JSON.stringify(_data);
                        } catch(e){
                            throw new TypeError('Unable to stringify body\'s content : ' + e.name);
                        }
                    } else {
                        isUrlEncoded = contentType && contentType.indexOf('x-www-form-urlencoded') > 1;
                        for(key in _data){
                            if(isUrlEncoded){
                                body += encodeURIComponent(key) + '=' + encodeURIComponent(_data[key]) + '&';
                            } else {
                                body += key + '=' + _data[key] + '\n\r';
                            }
                        }
                    }
                }

                //open the XHR request
                openParams = [method, url, async];
                if(data.auth){
                    openParams.push(data.auth.user);
                    openParams.push(data.auth.passwd);
                }
                request.open.apply(request, openParams);

                //set the headers
                for(header in data.headers){
                    request.setRequestHeader(header, data.headers[header]);
                }

                //bind events
                request.onprogress = function(e){
                    if (e.lengthComputable) {
                        self.trigger('progress', e.loaded / e.total);
                    }
                };

                request.onload = function onRequestLoad(){
                    var response = request.responseText;

                    if (timeoutId) {
                        clearTimeout(timeoutId);
                    }
                    if(this.status >= 200 && this.status < 300){
                        if(typeof processRes === 'function'){
                            response = processRes(response);
                        }
                        self.trigger('success', response);
                    }

                    self.trigger(this.status, response);

                    self.trigger('end', response);
                };

                request.onerror = function onRequestError (err){
                    if (timeoutId) {
                        clearTimeout(timeoutId);
                    }
                    self.trigger('error', err, arguments);
                };

                //sets the timeout
                if (timeout) {
                    timeoutId = setTimeout(function() {
                        self.trigger('timeout', {
                            type: 'timeout',
                            expiredAfter: timeout
                        }, request, arguments);
                        request.abort();
                    }, timeout);
                }

                //send the request
                request.send(body);
            }
998614
function parseUrl(url) {
        if (Core.isBlank(url)) {
            return null;
        }
        var matches = url.match(httpRegex);
        if (matches === null) {
            return null;
        }
        //log.debug("matches: ", matches);
        var scheme = matches[1];
        var host = matches[3];
        var port = matches[4];
        var parts = null;
        if (!Core.isBlank(port)) {
            parts = url.split(port);
        }
        else {
            parts = url.split(host);
        }
        // make sure we use port as a number
        var portNum = Core.parseIntValue(port);
        var path = parts[1];
        if (path && _.startsWith(path, '/')) {
            path = path.slice(1, path.length);
        }
        //log.debug("parts: ", parts);
        return {
            scheme: scheme,
            host: host,
            port: portNum,
            path: path
        };
    }
135574
function setURLParameter(url, key, value) {
  if(typeof url !== 'string') {
    throw new Error('URLs must be a string');
  }

  if(urlUtils) {
    //node.js
    url = urlUtils.parse(url);

    url.search = ((url.search) ? url.search + '&' : '?') + key + '=' + value;

    url = urlUtils.format(url);
  }
  else {
    //browser
    url = url.split('?');

    url[1] = ((url[1]) ? url[1] + '&' : '') + key + '=' + value;

    url = url.join('?');
  }

  return url;
}
1337595
protected function process()
    {

        // prepare the URL rewrites
        $this->prepareUrlRewrites();

        // iterate over the categories and create the URL rewrites
        foreach ($this->urlRewrites as $categoryId => $urlRewrite) {
            // initialize and persist the URL rewrite
            if ($urlRewrite = $this->initializeUrlRewrite($urlRewrite)) {
                // initialize URL rewrite and catagory ID
                $this->categoryId = $categoryId;

                try {
                    // persist the URL rewrite
                    $this->urlRewriteId = $this->persistUrlRewrite($urlRewrite);

                    /*
                     * Attention! Stop processing, if this is a root category, because Magento needs explicitly
                     * NO URL rewrite product category relation to render canonical and meta og:url tag!
                     */
                    if ($this->isRootCategory($this->getCategory($categoryId))) {
                        continue;
                    }

                    // initialize and persist the URL rewrite product => category relation
                    $urlRewriteProductCategory = $this->initializeUrlRewriteProductCategory(
                        $this->prepareUrlRewriteProductCategoryAttributes()
                    );

                    // persist the URL rewrite product category relation
                    $this->persistUrlRewriteProductCategory($urlRewriteProductCategory);
                } catch (\Exception $e) {
                    // query whether or not debug mode has been enabled
                    if ($this->getSubject()->isDebugMode()) {
                        $this->getSubject()
                             ->getSystemLogger()
                             ->warning($this->getSubject()->appendExceptionSuffix($e->getMessage()));
                    } else {
                        throw $e;
                    }
                }
            }
        }
    }
845530
function(url){

	var retlist = [];

	// Pull parameters.
	var tmp = url.split('?');
	var path = '';
	var parms = [];
	if( ! tmp[1] ){ // catch bad url--nothing before '?'
	    parms = tmp[0].split('&');
	}else{ // normal structure
	    path = tmp[0];
	    parms = tmp[1].split('&');
	}

	// Decompose parameters.
	each(parms, function(p){
	    var c = _first_split('=', p);
	    if( ! c[0] && ! c[1] ){
		retlist.push([p]);
	    }else{
		retlist.push(c);		  
	    }
	});
	
	return retlist;
    }
245343
function getPage(url, cb) {

    var page = generator.page$[u.urlPath(url)];
    var getFn = page && page.get && generator['get'+page.get];

    if (getFn) {
      getFn(page, function() { cb(null, page); });
    }
    else {
      process.nextTick(function() { cb(null, page); });
    }
  }
701598
function(url, callback) {
        var parsedUrl = urlparse(url, true);
        var method = this._normalizeSpecMethod(this.spec, {
            base_url: parsedUrl.protocol +'//' + parsedUrl.hostname,
            headers: {},
            method: 'GET',
            path: parsedUrl.pathname + parsedUrl.search
        });
        var request = this._createRequest(method, {}, null);
        this._callRequestMiddlewares(this.middlewares.slice(0), method, request, [], callback);
    }