public List<Object> updateList(List<Object> mainList, List<Object> itemsToAdd)
			throws CancelledException {

		if (itemsToAdd == null) {
			return mainList;
		}
		if (itemsToAdd.isEmpty()) {
			return mainList;
		}

		for (Object item : itemsToAdd) {
			monitor.checkCancelled();
			if (!mainList.contains(item)) {
				mainList.add(item);
			}
		}
		return mainList;
	}
Method to update the given function definition with the new function definition
@param functionDefinition the given function definition
@param newFunctionDefinition the new function definition
@return the new function definition or null if not changed
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java