docs: private void ensureCapacity(int index)
    {
      int capacity = words == null ? 0 : words.length;
      if (capacity > index) {
        return;
      }
      capacity = Math.max(capacity << 1, index + 1);
  
      if (words == null) {
        // nothing to copy
        words = new int[capacity];
        return;
      }
      words = Arrays.copyOf(words, capacity);
    }