code: private String getDefaultSiteRoot(List<CmsSiteSelectorOption> options) {
  
          if (m_startSite != null) {
              return m_startSite;
          } else if ((options != null) && (!options.isEmpty())) {
              String defaultOption = options.get(0).getSiteRoot();
              for (CmsSiteSelectorOption option : options) {
                  if (option.getType().equals(CmsSiteSelectorOption.Type.currentSubsite)) {
                      return option.getSiteRoot();
                  }
                  if (option.isCurrentSite()) {
                      defaultOption = option.getSiteRoot();
                  }
              }
              return defaultOption;
          } else {
              return CmsCoreProvider.get().getSiteRoot();
          }
      }
docs: Helper method for getting the default (sub)site root for a list of site selector options.<p>
  
  @param options the list of options
  
  @return the default (sub)site root