docs: private int[][] computeSortAndUniqueMapping(String[] keyList, int size)
        throws IOException {
      if (!closed) {
        if (size > 0) {
          SortedMap<String, int[]> sortedMap = new TreeMap<>();
          for (int i = 0; i < size; i++) {
            if (sortedMap.containsKey(keyList[i])) {
              int[] previousList = sortedMap.get(keyList[i]);
              int[] newList = new int[previousList.length + 1];
              System.arraycopy(previousList, 0, newList, 0, previousList.length);
              newList[previousList.length] = i;
              sortedMap.put(keyList[i], newList);
            } else {
              sortedMap.put(keyList[i], new int[] { i });
            }
          }
          Collection<int[]> values = sortedMap.values();
          int[][] result = new int[sortedMap.size()][];
          return values.toArray(result);
        } else {
          return null;
        }
      } else {
        throw new IOException("already closed");
      }
    }