Bug 315281 update copyrights for 3.6
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/MarkerSortUtil.java
}
		array[first+1].clearCache();
		array[first].clearCache();
	}
	/**
	 * Sorts [from,first+k-1] in the array of [from,to] using a variant of
	 * modified heapsort, such that
	 * array[from]<array[from+1]<...<array[from+k-1] and
	 * array[from+k-1]<arra[from+k||from+k+1||from+k+2|| ....to]
	 * 
	 * Note: if k is greater than a number,the sorting happens in batches of
	 * that number, this for performance reasons.
	 * 
	 * @param entries
	 * @param comparator
	 * @param from
	 * @param to
	 * @param k
	 * @param monitor 
	 */
	public static void sortStartingKElement(MarkerEntry[] entries,
			Comparator comparator, int from, int to, int k,IProgressMonitor monitor) {
		
		int last = from + k-1;
		if (entries.length == 0 || from < 0 || from >= to || last < from
				|| last > to || to > entries.length - 1 || to < 0)
			return;
		int n=to-from+1;
		if (n <= BATCH_SIZE && (((float) n / k) <= MERGE_OR_HEAP_SWITCH)
				) {