code: @Pure
  	public static URL join(URL urlBase, String... elements) {
  		if (urlBase == null) {
  			return null;
  		}
  		final StringBuilder buf = new StringBuilder(decodeHTMLEntities(urlBase.getPath().replaceFirst(
  				Pattern.quote(URL_PATH_SEPARATOR) + "+$", "")));  //$NON-NLS-1$//$NON-NLS-2$
  		boolean empty;
  		for (final String elt : elements) {
  			empty = elt == null || elt.length() == 0;
  			if (!empty) {
  				assert elt != null;
  				if (!elt.startsWith(File.separator)
  						&& (buf.length() == 0
  						|| buf.charAt(buf.length() - 1) != URL_PATH_SEPARATOR_CHAR)) {
  					buf.append(URL_PATH_SEPARATOR_CHAR);
  				}
  				buf.append(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(),
  					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;
  		}
  	}
docs: Join the parts of a path and append them to the given URL.
  
  @param urlBase is the url to put as prefix.
  @param elements are the path's elements to join.
  @return the result of the join of the path's elements.