private int getOtherNonDuplicateRowIndex(int dup1Index,
			AbstractSortedTableModel<StringRowObject> tableModel) {
		int otherRow = dup1Index;
		while (otherRow == dup1Index) {
			otherRow = getRandomInt(0, table.getRowCount() - 1);
		}

		StringRowObject currentRowObject = tableModel.getRowObject(dup1Index);
		StringRowObject newRowObject = tableModel.getRowObject(otherRow);
		if (currentRowObject.equals(newRowObject)) {
			// try again--we want the new index to be for a row that is NOT a duplicate
			return getOtherNonDuplicateRowIndex(dup1Index, tableModel);
		}

		return otherRow;
	}
Make sure that either the two given rows are an exact match, or that the row objects that
represent each row are equal()
Ghidra/Features/Base/src/test.slow/java/docking/widgets/table/SelectionManagerTest.java