private void maybeSortSourceData() {
		//
		// Usually the source data is sorted before any filter is applied.  However, this is not
		// the case when a load of new data is followed directly by a filter action.  We rely on
		// the source data being sorted in order to perform fast translations from the table's view
		// to the table's model when it is filtered.  Thus, make sure that any time we are sorting
		// the filtered data, that the source data too is sorted.
		//
		if (sourceData == updatedData) {
			// they are the same dataset; it will be sorted after this call
			return;
		}

		if (sourceData.isSorted()) {
			// this is the typical case
			return;
		}

		doSortData(sourceData.getData());

		if (monitor.isCancelled()) {
			sourceData.setSortContext(null);
		}
		else {
			sourceData.setSortContext(newSortContext);
		}
	}
Work method to sort the data.
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/threaded/TableUpdateJob.java