private boolean updateFunctionSignature(Function function,
			FunctionDefinition newFunctionDefinition) {

		// need to make sure the name on the function is the same as the function definition
		// or the follow-on apply cmd will not apply the signature. It only does so for functions
		// matching the function definition name
		if (!newFunctionDefinition.getName().equals(function.getName())) {
			try {
				function.setName(newFunctionDefinition.getName(), SourceType.USER_DEFINED);
			}
			catch (DuplicateNameException e) {
				// shouldn't get here with above check but if so, still need to continue on to
				// below to update the function signature
			}
			catch (InvalidInputException e) {
				return false;
			}
		}

		// update function signature at vfunction address with the function signature in the structure
		ApplyFunctionSignatureCmd cmd = new ApplyFunctionSignatureCmd(function.getEntryPoint(),
			newFunctionDefinition, SourceType.USER_DEFINED);
		cmd.applyTo(program);
		return true;
	}
Method to update the given function's signature with the given function definition
@param function the given function
@param newFunctionDefinition the new function definition
@return true if the update worked, false otherwise
Ghidra/Features/Decompiler/ghidra_scripts/classrecovery/RecoveredClassHelper.java