Creates the urlset element
772107
private function CreateUrlset()
    {
        $this->urlset = $this->domDoc->createElement("urlset");
        $this->SetAttribute($this->urlset, "xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9");
    }
623639
@Override
    public PmdRuleSet create() {
        final SAXBuilder parser = new SAXBuilder();
        final Document dom;
        try {
            dom = parser.build(source);
        } catch (JDOMException | IOException e) {
            if (messages != null) {
                messages.addErrorText(INVALID_INPUT + " : " + e.getMessage());
            }
            LOG.error(INVALID_INPUT, e);
            return new PmdRuleSet();
        }

        final Element eltResultset = dom.getRootElement();
        final Namespace namespace = eltResultset.getNamespace();
        final PmdRuleSet result = new PmdRuleSet();

        final String name = eltResultset.getAttributeValue("name");
        final Element descriptionElement = getChild(eltResultset, namespace);

        result.setName(name);

        if (descriptionElement != null) {
            result.setDescription(descriptionElement.getValue());
        }

        for (Element eltRule : getChildren(eltResultset, "rule", namespace)) {
            PmdRule pmdRule = new PmdRule(eltRule.getAttributeValue("ref"));
            pmdRule.setClazz(eltRule.getAttributeValue("class"));
            pmdRule.setName(eltRule.getAttributeValue("name"));
            pmdRule.setMessage(eltRule.getAttributeValue("message"));
            parsePmdPriority(eltRule, pmdRule, namespace);
            parsePmdProperties(eltRule, pmdRule, namespace);
            result.addRule(pmdRule);
        }
        return result;
    }
823505
protected Element createExternalLinkElement(final DocBookVersion docBookVersion, final Document document, String title,
            final String url) {
        final Element linkEle;
        if (docBookVersion == DocBookVersion.DOCBOOK_50) {
            linkEle = document.createElement("link");
            linkEle.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", url);
        } else {
            linkEle = document.createElement("ulink");
            linkEle.setAttribute("url", url);
        }
        linkEle.setTextContent(title);
        return linkEle;
    }
1248267
function(url){
			var rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
				urlLower = url.toLowerCase(),
				parts = rurl.exec( urlLower ),
				ajaxLocation,
				ajaxLocParts;

			try {
				ajaxLocation = location.href;
			} catch( e ) {
				// Use the href attribute of an A element
				// since IE will modify it given document.location
				ajaxLocation = document.createElement('a');
				ajaxLocation.href = '';
				ajaxLocation = ajaxLocation.href;
			}

			ajaxLocation = ajaxLocation.toLowerCase();

			// uh oh, the url must be relative
			// make it fully qualified and re-regex url
			if (!parts){
				urlLower = _absolutizeURI(ajaxLocation,urlLower).toLowerCase();
				parts = rurl.exec( urlLower );
			}

			// Segment location into parts
			ajaxLocParts = rurl.exec( ajaxLocation ) || [];

			// do hostname and protocol and port of manifest URL match location.href? (a "local" request on the same domain)
			var matched = !(parts &&
					(parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
						(parts[ 3 ] || (parts[ 1 ] === 'http:' ? '80' : '443')) !==
							(ajaxLocParts[ 3 ] || (ajaxLocParts[ 1 ] === 'http:' ? '80' : '443'))));
		
			return matched;
		}
698883
function makeSet( length ) {
    var res = new Array( length );
    var i = -1;

    while( ++i < length ) {
        res[i] = i;
    }

    return new _set2.default( res );
}
929701
private SortedSet<String> requestRepresentativeDomains(String url) {
		try {

			//System.out.println(url);

			final SortedSet<String> results = new TreeSet<String>();
			DefaultHandler handler = new DefaultHandler() {
				@Override
				public void startElement(String uri, String localName,String qName,
						Attributes attributes) throws SAXException {

					//System.out.println("Start Element :" + qName);

					if (qName.equalsIgnoreCase("representative")) {
						String name = attributes.getValue("name");
						results.add(name);
					}
				}
			};
			handleRestRequest(url,handler);
			return results;
		} catch (MalformedURLException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (SAXException e) {
			e.printStackTrace();
		} catch (ParserConfigurationException e) {
			e.printStackTrace();
		}
		return null;
	}
1268524
private Url parseUrl(Node el) {
        return new Url(
                nodeAttribute(el, TAG_VAR_ATTR_NAME, Url.DEFAULT_NAME),
                nodeAttribute(el, TAG_ATTR_GHOST, PatternElement.DEFAULT_GHOST_VALUE),
                nodeAttribute(el, TAG_URL_ATTR_LOCAL, Url.DEFAULT_LOCAL),
                nodeAttribute(el, TAG_URL_ATTR_SCHEMALESS, Url.DEFAULT_SCHEMALESS)
        );
    }
1343643
private String urlencode(String data, String charset) {
        try {
            return URLEncoder.encode(String.valueOf(data), charset);
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
    }
1227957
private static JSONObject parseStencilSet(StencilSet stencilSet) throws JSONException {
        if (stencilSet != null) {
            JSONObject stencilSetObject = new JSONObject();

            stencilSetObject.put("url",
                                 stencilSet.getUrl().toString());
            stencilSetObject.put("namespace",
                                 stencilSet.getNamespace().toString());

            return stencilSetObject;
        }

        return new JSONObject();
    }
988382
private Element createElement(final Document theTargetDocument, final String theName) {
        final Element indexEntryNode = theTargetDocument.createElementNS(this.namespace_url, theName);
        indexEntryNode.setPrefix(this.prefix);
        return indexEntryNode;
    }
632408
@Pure
	public static URL join(URL urlBase, File... elements) {
		if (urlBase == null) {
			return null;
		}
		final StringBuilder buf = new StringBuilder(urlBase.getPath());
		for (final File elt : elements) {
			if (!elt.isAbsolute() && (buf.length() == 0 || buf.charAt(buf.length() - 1) != URL_PATH_SEPARATOR_CHAR)) {
				buf.append(URL_PATH_SEPARATOR_CHAR);
			}
			buf.append(fromFileStandardToURLStandard(elt));
		}
		try {
			if (isJarURL(urlBase)) {
				return new URL(
						urlBase.getProtocol(),
						urlBase.getHost(),
						urlBase.getPort(),
						buf.toString());
			}
			return new URI(
					urlBase.getProtocol(),
					urlBase.getUserInfo(),
					urlBase.getHost(),
					urlBase.getPort(),
					decodeHTMLEntities(buf.toString()),
					decodeHTMLEntities(urlBase.getQuery()),
					urlBase.getRef()).toURL();
		} catch (Throwable exception) {
			//
		}
		try {
			return new URL(
					urlBase.getProtocol(),
					urlBase.getHost(),
					buf.toString());
		} catch (Throwable exception) {
			return null;
		}
	}
1233791
public void setUrl(String url) {
        this.url = url;
        
        if (clazz == null && url != null) {
            setClazz(ElementPlugin.class);
        }
    }
785198
function create(content, url) {
  url = url || '<source>';
  const map = new SourceMapGenerator({ file: url });
  const lines = content.split('\n');

  for (let l = 1, n = lines.length; l <= n; l++) {
    // Skip empty
    if (lines[l - 1]) {
      map.addMapping({
        source: url,
        original: { line: l, column: 0 },
        generated: { line: l, column: 0 }
      });
    }
  }

  map.setSourceContent(url, content);
  return map;
}
444679
def create(self, set):
        
        target_url = self.client.get_url('SET', 'POST', 'create')
        r = self.client.request('POST', target_url, json=set._serialize())
        return set._deserialize(r.json(), self)
87650
def element_for_url(cls, url):
        """"""
        response = cls.http_request(url)
        if response.status != 200:
            cls.raise_http_error(response)

        assert response.getheader('Content-Type').startswith('application/xml')

        response_xml = response.read()
        logging.getLogger('recurly.http.response').debug(response_xml)
        response_doc = ElementTree.fromstring(response_xml)

        return response, response_doc
653243
public void createShellStreamSet()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "createShellStreamSet");

        StreamSet streamSet = null;

        synchronized (streamSets)
        {
            streamSet = new StreamSet(null,
                            targetMEUuid,
                            0,
                            isLink ? StreamSet.Type.LINK_INTERNAL_OUTPUT : StreamSet.Type.INTERNAL_OUTPUT);
            streamSets.put(null, streamSet);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createShellStreamSet", streamSet);
    }
1150153
function makeUrl(name, data) {

        if (! data['summary']){
            data['summary'] = data['description'];
        }

        return templates[name].replace(/\{\{(\w)(\w*)\}\}/g, function (m, fix, key) {
            var nameKey = name + fix + key.toLowerCase();
            key = (fix + key).toLowerCase();

            return encodeURIComponent((data[nameKey] === undefined ? data[key] : data[nameKey]) || '');
        });
    }