code: public String generateGerritGitwebLogUrl(@NotNull String gerritUrl, String ref) throws GerritException {
  
          String host = getHost(gerritUrl);
          String project = getProject(gerritUrl);
  
          if (ref == null || ref.isEmpty()) {
              return MessageFormat.format(GERRIT_GITWEB_URL_TEMPLATE, host, project);
          } else {
              return MessageFormat.format(GERRIT_GITWEB_SHORTLOG_URL_TEMPLATE, host, project, ref);
          }
      }
docs: Generate an https URL generated from the 'git clone' Gerrit url. If ref is specified, URL will point to it
  The url generated points to the git log based on the ref
  
  Useful to list the repository's Gerrit gitweb if we don't know the ref
  
  @param gerritUrl 'git clone' gerrit url. Can be http or git+ssh
  
  @param ref if not null or empty, this is used to generate a Gerrit gitweb url to the ref
  
  @return Gerrit Gitweb URL