docs: final UpdateReturnState enhancedHashInsert(final long[] hashTable, final long hash) {
      final int arrayMask = (1 << lgArrLongs_) - 1; // arrayLongs -1
      // make odd and independent of curProbe:
      final int stride = (2 * (int) ((hash >>> lgArrLongs_) & STRIDE_MASK)) + 1;
      int curProbe = (int) (hash & arrayMask);
      long curTableHash = hashTable[curProbe];
      final int loopIndex = curProbe;
  
      // This is the enhanced part
      // Search for duplicate or zero, or opportunity to replace garbage.
      while ((curTableHash != hash) && (curTableHash != 0)) {
        // curHash is not a duplicate and not zero
  
        if (curTableHash >= thetaLong_) { // curTableHash is garbage, do enhanced insert
          final int rememberPos = curProbe; // remember its position.
          // Now we must make sure there are no duplicates in this search path,
          //   so we keep searching
          curProbe = (curProbe + stride) & arrayMask; // move forward
          curTableHash = hashTable[curProbe];
          while ((curTableHash != hash) && (curTableHash != 0)) {
            curProbe = (curProbe + stride) & arrayMask;
            curTableHash = hashTable[curProbe];
          }
          // curTableHash is a duplicate or zero
          if (curTableHash == hash) {
            return RejectedDuplicate; // duplicate, just return
          }
          assert (curTableHash == 0); // must be zero
          // Now that we know there are no duplicates we can
          // go back and insert at first garbage value position
          hashTable[rememberPos] = hash;
          thetaLong_ = (long) (thetaLong_ * alpha_); //decrement theta
          dirty_ = true; //the decremented theta could have produced a new dirty value
          return InsertedCountNotIncremented;
        }
  
        // curTableHash was not a duplicate, not zero, and NOT garbage,
        // so we keep searching
        assert (curTableHash < thetaLong_);
        curProbe = (curProbe + stride) & arrayMask;
        curTableHash = hashTable[curProbe];
  
        // ensure no infinite loop
        if (curProbe == loopIndex) {
          throw new SketchesArgumentException("No empty slot in table!");
        }
        // end of Enhanced insert
      } // end while and search
  
      // curTableHash is a duplicate or zero and NOT garbage
      if (curTableHash == hash) {
        return RejectedDuplicate; // duplicate, just return
      }
      // must be zero, so insert and increment
      assert (curTableHash == 0);
      hashTable[curProbe] = hash;
      thetaLong_ = (long) (thetaLong_ * alpha_); //decrement theta
      dirty_ = true; //the decremented theta could have produced a new dirty value
      if (++curCount_ > hashTableThreshold_) {
        rebuildDirty(); //at tgt size and maybe dirty
      }
      return InsertedCountIncremented;
    }