code: static String clientNameForURI(URI uri) {
      String host = uri.getHost();
      return (host == null) ? DEFAULT : clientNameForHost(host);
    }
docs: Extract a client name based on the uri host. See {@link #clientNameForHost(String)}
  for more details.