Sort via insertion sort.

@param keys Keys
@param vals Values
@param start Interval start
@param end Interval end
493018
private static void insertionSortReverse(double[] keys, int[] vals, final int start, final int end) {
    // Classic insertion sort.
    for(int i = start + 1; i < end; i++) {
      for(int j = i; j > start; j--) {
        if(keys[j] <= keys[j - 1]) {
          break;
        }
        swap(keys, vals, j, j - 1);
      }
    }
  }
1085007
public void pressKey(final Keys keys) {
        if (keys == null) return;

        runWithRetries(() -> {
            elementImpl.locateElement().sendKeys(keys);
        });
    }
232035
protected void append(RoaringArray sa, int startingIndex, int end) {
    extendArray(end - startingIndex);
    for (int i = startingIndex; i < end; ++i) {
      this.keys[this.size] = sa.keys[i];
      this.values[this.size] = sa.values[i];
      this.size++;
    }
  }
1333138
public static void bubbleSort(int[] arrays) {
        for (int i = 0; i < arrays.length - 1; i++) {
            for (int j = 0; j < arrays.length - 1 - i; j++) {
                if (arrays[j] > arrays[j + 1]) {
                    switchNumber(arrays, j, j + 1);
                }
            }
        }
    }
182544
public void computeRange( SortableParameter_F32 input[] , int start , int length ) {
		if( length == 0 ) {
			divisor = 0;
			return;
		}

		float min,max;

		min = max = input[start].sortValue;

		for( int i = 1; i < length; i++ ) {
			float val = input[start+i].sortValue;
			if( val < min )
				min = val;
			else if( val > max )
				max = val;
		}

		setRange(min,max);
	}
1090666
private static void insertionSort(int array[], int offset, int end) {
		for (int x=offset; x<end; ++x) {
			for (int y=x; y>offset && array[y-1]>array[y]; y--) {
				int temp = array[y];
				array[y] = array[y-1];
				array[y-1] = temp;
			}
		}
	}
1305905
public final void addString(String key, String... values) {
        if (values == null || Array.getLength(values) == 0) {
            return;
        }
        List<String> list = parameters.get(key);
        if (list == null) {
            list = new ArrayList<>();
        }
        list.addAll(Arrays.asList(values));
        parameters.put(key, list);
    }
658402
private static void sort1(Quicksortable q, int off, int k, int len) {
        // we don't care about anything >= to k
        if (off >= k)
            return;
        // Insertion sort on smallest arrays
        if (len < 7) {
            for (int i = off; i < len + off; i++)
                for (int j = i; j > off && q.compare(j, j - 1) < 0; j--)
                    q.swap(j, j - 1);
            return;
        }

        // Choose a partition element, v
        int m = off + (len >> 1);       // Small arrays, middle element
        if (len > 7) {
            int l = off;
            int n = off + len - 1;
            if (len > 40) {        // Big arrays, pseudomedian of 9
                int s = len / 8;
                l = med3(q, l, l + s, l + 2 * s);
                m = med3(q, m - s, m, m + s);
                n = med3(q, n - 2 * s, n - s, n);
            }
            m = med3(q, l, m, n); // Mid-size, med of 3
        }
        // move the pivot element to to the front
        q.swap(off, m);
        m = off;

        // Establish Invariant: m* (<m)* (>m)* m*
        int a = off+1, b = a, c = off + len - 1, d = c;
        int cmp;
        while (true) {
            while (b <= c && (cmp = q.compare(b, off)) <= 0) {
                if (cmp == 0)
                    q.swap(a++, b);
                b++;
            }
            while (c >= b && (cmp = q.compare(c, off)) >= 0) {
                if (cmp == 0)
                    q.swap(c, d--);
                c--;
            }
            if (b > c)
                break;
            q.swap(b++, c--);
        }

        // Swap partition elements back to middle
        int s, n = off + len;
        s = Math.min(a - off, b - a);
        vecswap(q, off, b - s, s);
        s = Math.min(d - c, n - d - 1);
        vecswap(q, b, n - s, s);

        // Recursively sort non-partition-elements
        if ((s = b - a) > 1)
            sort1(q, off, k, s);
        if ((s = d - c) > 1)
            sort1(q, n - s, k, s);
    }
1098903
private static void insertionSort(final int off, final int len, int[] order, IndirectComparator intComparator) {
    for (int i = off + 1; i < off + len; i++) {
      final int v = order[i];
      int j = i, t;
      while (j > off && intComparator.compare(t = order[j - 1], v) > 0) {
        order[j--] = t;
      }
      order[j] = v;
    }
  }
440705
public void sort( float[] values, float[] valuesToFollow ) {
        this.valuesToSortFloat = values;
        this.valuesToFollowFloat = valuesToFollow;
        
        number = values.length;
        
        monitor.beginTask("Sorting...", -1);
        
        monitor.worked(1);
        quicksortFloat(0, number - 1);
        
        monitor.done();
    }
9852
public static void insertSort(int[] arrays) {
        for (int i = 1; i < arrays.length; i++) {
            int currentNumber = arrays[i];
            int j = i - 1;
            while (j >= 0 && arrays[j] > currentNumber) {
                arrays[j + 1] = arrays[j--];
            }
            arrays[j + 1] = currentNumber;
        }
    }
824266
private void querySortedEndPointIndices_(AttributeStreamOfInt32 end_indices) {
		int size = (!m_b_envelopes_ref ? m_intervals.size() : m_envelopes_ref.size());

		for (int i = 0; i < 2 * size; i++)
			end_indices.add(i);

		sortEndIndices_(end_indices, 0, 2 * size);
	}
934144
public static <T extends Comparable<? super T>> 
    void insertionSort( T[] arr, int start, int end )
    {
        int i;
        for ( int j = start + 1; j <= end; j++ ) {
            T tmp = arr[j];
            for ( i = j; i > start && tmp.compareTo( arr[i - 1] ) < 0; i-- ) {
                arr[ i ] = arr[ i - 1 ];
            }
            if ( i < j ) arr[ i ] = tmp;
        }
    }
50316
public void sortbyselection(List<String> sortFlds, List<Integer> sortDirs) {
		moveToId(-1);
		int i = 0;
		while (super.next()) {
			int minId = findSmallestFrom(i, sortFlds, sortDirs);
			if (minId != i) {
				swapRecords(i, minId);
			}
			moveToId(i);
			i++;
		}
	}
496842
function insertionSort(d, axis, start, end, boxes, ids) {
  var elemSize = 2 * d
  var boxPtr = elemSize * (start+1) + axis
  for(var i=start+1; i<end; ++i, boxPtr+=elemSize) {
    var x = boxes[boxPtr]
    for(var j=i, ptr=elemSize*(i-1); 
        j>start && boxes[ptr+axis] > x; 
        --j, ptr-=elemSize) {
      //Swap
      var aPtr = ptr
      var bPtr = ptr+elemSize
      for(var k=0; k<elemSize; ++k, ++aPtr, ++bPtr) {
        var y = boxes[aPtr]
        boxes[aPtr] = boxes[bPtr]
        boxes[bPtr] = y
      }
      var tmp = ids[j]
      ids[j] = ids[j-1]
      ids[j-1] = tmp
    }
  }
}
603573
public static void arrangeKeys(ArrayList<String> keys) {
    move(keys, "timestamp", 0);
    move(keys, "hostname", 1);
    move(keys, "type", 2);
  }
222110
@SuppressWarnings("WeakerAccess")
    public static void sort(int[] order, double[] values, int start, int n) {
        for (int i = start; i < start + n; i++) {
            order[i] = i;
        }
        quickSort(order, values, start, start + n, 64);
        insertionSort(order, values, start, start + n, 64);
    }