public List<Object> applyNewFunctionSignature(Function vfunction, Address vftableAddress)
			throws CancelledException, DuplicateNameException, DataTypeDependencyException,
			InvalidInputException {

		List<Object> changedItems = new ArrayList<Object>();

		Data vftableData = api.getDataAt(vftableAddress);

		Structure vfunctionStructure = getStructureFromData(vftableData);
		if (vfunction == null) {
			return null;
		}

		Category category = getDataTypeCategory(vfunctionStructure);

		if (category == null) {
			return null;
		}

		if (!category.getCategoryPath().getPath().startsWith(DTM_CLASS_DATA_FOLDER_PATH)) {
			return null;
		}

		if (!vfunctionStructure.getName().contains("_vftable")) {
			return null;
		}

		// get the corresponding structure component for the given vfunction in the vftable
		DataTypeComponent structureComponent = getVfunctionComponent(vftableData, vfunction);

		if (structureComponent == null) {
			throw new IllegalArgumentException(
				"Passed in function must be referenced by passed in vftable");
		}

		List<Object> newChangedItems =
			updateCorrespondingFunctionDefinition(vfunction, structureComponent);

		changedItems = updateList(changedItems, newChangedItems);

		return changedItems;
	}
Method to apply the function signature of the given function, if different, to the corresponding
function definition and call the method to update related structure fields and functions
@param vfunction the given function
@param vftableAddress the vftable address of a vftable containing the function
@return a list of changed items
@throws CancelledException if cancelled
@throws DuplicateNameException if duplicate name exception while making changes
@throws DataTypeDependencyException if data type dependency exception while making changes
@throws InvalidInputException if invalid input while making changes
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java