code: public void indexInsert(int index, KType key) {
      assert index < 0 : "The index must not point at an existing key.";
  
      index = ~index;
      if (Intrinsics.isEmpty(key)) {
        assert index == mask + 1;
        assert Intrinsics.isEmpty(keys[index]);
        hasEmptyKey = true;
      } else {
        assert Intrinsics.isEmpty(keys[index]);
  
        if (assigned == resizeAt) {
          allocateThenInsertThenRehash(index, key);
        } else {
          keys[index] = key;
        }
  
        assigned++;
      }
    }
docs: Inserts a key for an index that is not present in the set. This method
  may help in avoiding double recalculation of the key's hash.
  
  @see #indexOf
  
  @param index The index of a previously non-existing key, as returned from
  {@link #indexOf}.
  @throws AssertionError If assertions are enabled and the index does
  not correspond to an existing key.