public boolean applyParameterNames(Function toFunction, ToolOptions markupOptions,
			boolean doNotReplaceWithDefaultNames, int originalToParamCount)
			throws VersionTrackingApplyException {

		// See what options the user has specified when applying parameter names.
		VTMatchApplyChoices.SourcePriorityChoices parameterNamesChoice = markupOptions
				.getEnum(VTOptionDefines.PARAMETER_NAMES, DEFAULT_OPTION_FOR_PARAMETER_NAMES);
		VTMatchApplyChoices.HighestSourcePriorityChoices highestPriorityChoice =
			markupOptions.getEnum(VTOptionDefines.HIGHEST_NAME_PRIORITY,
				DEFAULT_OPTION_FOR_HIGHEST_NAME_PRIORITY);
		boolean replaceSamePriorityNames =
			markupOptions.getBoolean(PARAMETER_NAMES_REPLACE_IF_SAME_PRIORITY,
				DEFAULT_OPTION_FOR_PARAMETER_NAMES_REPLACE_IF_SAME_PRIORITY);

		int fromParameterCount = parameterInfos.size();
		int minParameterCount = Math.min(fromParameterCount, originalToParamCount);
		boolean duplicateNameOccurred =
			tryToSetNames(toFunction, doNotReplaceWithDefaultNames, parameterNamesChoice,
				highestPriorityChoice, replaceSamePriorityNames, minParameterCount);
		// If a duplicate name was created, then try applying again to see if it can now be set
		// to the desired name. A duplicate may have occurred due to changing order of parameters.
		if (duplicateNameOccurred) {
			tryToSetNames(toFunction, doNotReplaceWithDefaultNames, parameterNamesChoice,
				highestPriorityChoice, replaceSamePriorityNames, minParameterCount);
		}

		return true;
	}
@param toFunction the function whose parameter names we are setting.
@param markupOptions
@param doNotReplaceWithDefaultNames flag indicating whether or not a parameter name can be
replaced with a default name.
@param originalToParamCount original number of parameters in toFunction
@throws VersionTrackingApplyException
Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/api/stringable/FunctionSignatureStringable.java