question: private void mergeHi ( int base1 , int len1 , int base2 , int len2 ) { assert len1 > 0 && len2 > 0 && base1 + len1 == base2 ; Object [ ] a = this . a ; Object [ ] tmp = ensureCapacity ( len2 ) ; System . arraycopy ( a , base2 , tmp , 0 , len2 ) ; int cursor1 = base1 + len1 - 1 ; int cursor2 = len2 - 1 ; int dest = base2 + len2 - 1 ; a [ dest -- ] = a [ cursor1 -- ] ; if ( -- len1 == 0 ) { System . arraycopy ( tmp , 0 , a , dest - ( len2 - 1 ) , len2 ) ; return ; } if ( len2 == 1 ) { dest -= len1 ; cursor1 -= len1 ; System . arraycopy ( a , cursor1 + 1 , a , dest + 1 , len1 ) ; a [ dest ] = tmp [ cursor2 ] ; return ; } Comparator c = this . c ; int minGallop = this . minGallop ; { outer : while ( true ) { int count1 = 0 ; int count2 = 0 ; do { assert len1 > 0 && len2 > 1 ; if ( c . compare ( tmp [ cursor2 ] , a [ cursor1 ] ) < 0 ) { a [ dest -- ] = a [ cursor1 -- ] ; count1 ++ ; count2 = 0 ; if ( -- len1 == 0 ) break outer ; } else { a [ dest -- ] = tmp [ cursor2 -- ] ; count2 ++ ; count1 = 0 ; if ( -- len2 == 1 ) break outer ; } } while ( ( count1 | count2 ) < minGallop ) ; do { assert len1 > 0 && len2 > 1 ; count1 = len1 - gallopRight ( tmp [ cursor2 ] , a , base1 , len1 , len1 - 1 , c ) ; if ( count1 != 0 ) { dest -= count1 ; cursor1 -= count1 ; len1 -= count1 ; System . arraycopy ( a , cursor1 + 1 , a , dest + 1 , count1 ) ; if ( len1 == 0 ) break outer ; } a [ dest -- ] = tmp [ cursor2 -- ] ; if ( -- len2 == 1 ) break outer ; count2 = len2 - gallopLeft ( a [ cursor1 ] , tmp , 0 , len2 , len2 - 1 , c ) ; if ( count2 != 0 ) { dest -= count2 ; cursor2 -= count2 ; len2 -= count2 ; System . arraycopy ( tmp , cursor2 + 1 , a , dest + 1 , count2 ) ; if ( len2 <= 1 ) break outer ; } a [ dest -- ] = a [ cursor1 -- ] ; if ( -- len1 == 0 ) break outer ; minGallop -- ; } while ( count1 >= MIN_GALLOP | count2 >= MIN_GALLOP ) ; if ( minGallop < 0 ) minGallop = 0 ; minGallop += 2 ; } } { this . minGallop = minGallop < 1 ? 1 : minGallop ; } { if ( len2 == 1 ) { assert len1 > 0 ; dest -= len1 ; cursor1 -= len1 ; System . arraycopy ( a , cursor1 + 1 , a , dest + 1 , len1 ) ; a [ dest ] = tmp [ cursor2 ] ; } else if ( len2 == 0 ) { } else { assert len1 == 0 ; assert len2 > 0 ; System . arraycopy ( tmp , 0 , a , dest - ( len2 - 1 ) , len2 ) ; } } }
target:  Like mergeLo, except that this method should be called only if len1 >= len2; mergeLo should be called if len1 <= len2.  (Either method may be called if len1 == len2.)