code: private void insSortUpdateRecurse_SaBucket(int leftPtr, int rightPtr, int offset,
                                                 int q) {
          int rightTmpPtr = leftPtr + 1;
          while (rightTmpPtr <= rightPtr) {
              int tempValue = suffixArray[rightTmpPtr];
              int tempHashValue = sufPtrMap[suffixArray[rightTmpPtr] + offset];
              int leftTmpPtr = rightTmpPtr;
              while (leftTmpPtr > leftPtr
                  && sufPtrMap[suffixArray[leftTmpPtr - 1] + offset] > tempHashValue) {
                  suffixArray[leftTmpPtr] = suffixArray[leftTmpPtr - 1];
                  leftTmpPtr--;
              }
              suffixArray[leftTmpPtr] = tempValue;
              rightTmpPtr++;
          }
          updatePtrAndRefineBuckets_SaBucket(leftPtr, rightPtr, offset, q);
      }
docs: Stably sorts a bucket at a refinement level regarding sort keys that are bucket
  pointers in sufPtrMap with offset.
  
  @param leftPtr  points to the leftmost suffix of the current bucket.
  @param rightPtr points to the rightmost suffix of the current bucket.
  @param offset   is the length of the common prefix of the suffixes (a multiple of q).
  @param q        is the initial prefix length used for the bucket sort. It also determines
  the increase of offset.