private void mergeHigh(int idxA, int lenA, int idxB, int lenB) {
        

        lengthA = lenA;
        lengthB = lenB;
        iterA = idxA + lengthA - 1;
        iterB = lengthB - 1;
        dest = idxB + lengthB - 1;
        Comparator<T> comp = this.comparator; 
        
        T[] arr = this.array;
        T[] tempArray = tmpArray;
        System.arraycopy(arr, idxB, tempArray, 0, lengthB);

        arr[dest] = arr[iterA];
        dest--;
        iterA--;
        innerMergeHigh(comp, tempArray, arr, idxA);
        //minGallop shouldn't be < 1;
        minGallop = minGallop < 1 ? 1 : minGallop; 

        if (lengthB == 1) {//CopyA label            
            dest -= lengthA;
            iterA -= lengthA;
            System.arraycopy(arr, iterA + 1, arr, dest + 1, lengthA);
            // The first element of run B belongs at the front of the merge. 
            arr[dest] = tempArray[iterB];  
        } else if (lengthB == 0) {
              throw new UnsupportedOperationException("Compare function result changed! " +
                                                      "Make sure you do not modify the scene from another thread!");
        } else {//Fail label                        
            System.arraycopy(tempArray, 0, arr, dest - (lengthB - 1), lengthB);
        }
    }
Merge the lenA elements starting at idxA with the lenB elements starting
at idxB in a stable way, in-place. lenA and lenBb must be > 0, and idxA +
lenAa == idxB. Must also have that array[idxB] < array[idxA], that
array[idxA + Len1 - 1] belongs at the end of the merge, and should have
lenA >= lenB. See listsort.txt for more info.

@param idxA index of first element in run A
@param lenA length of run A
@param idxB index of first element in run B
@param lenB length of run B
jme3-core/src/main/java/com/jme3/util/ListSort.java