@SuppressWarnings("DuplicatedCode")
  private static int processRoot(String path, StringBuilder result) {
    if (!path.isEmpty() && path.charAt(0) == '/') {
      result.append('/');
      return 1;
    }

    if (path.length() > 2 && path.charAt(1) == ':' && path.charAt(2) == '/') {
      result.append(path, 0, 3);
      return 3;
    }

    return 0;
  }
@SuppressWarnings("DuplicatedCode")
  private static int processRoot(String path, StringBuilder result)