code: private static int normalizedHash(int hash, String s) {
      int nextHash = 0;
      for (int index = 0; index < s.length(); index++) {
        char ch = s.charAt(index);
        nextHash = 31 * nextHash + ch;
        if (ch == '%') {
          // hash next 2 characters
          index++;
          nextHash = 31 * nextHash + URIUtils.toLower(s.charAt(index));
          index++;
          nextHash = 31 * nextHash + URIUtils.toLower(s.charAt(index));
        }
      }
      // similar to Arrays.hashCode
      return hash * 31 + nextHash;
    }
docs: Hashes a string (which includes octets) for a URI hash.
  
  @param hash the input hash
  @param s the string to hash and combine with the input hash
  @return the resulting hash