private void applyFunctionDefinitions(TaskMonitor monitor, Map<String, List<Symbol>> symbolMap)
			throws CancelledException {

		Map<String, FunctionDefinition> functionNameMap = new HashMap<>();
		for (Category cat : sourceCategories) {
			collectFunctionDefinitions(cat, monitor, functionNameMap);
		}

		monitor.initialize(functionNameMap.size());
		for (String functionName : functionNameMap.keySet()) {
			monitor.checkCancelled();

			FunctionDefinition fdef = functionNameMap.get(functionName);
			checkForSymbol(monitor, functionName, fdef, symbolMap, null);

			// do any thunks too
			checkForSymbol(monitor, functionName, fdef, symbolMap, "thunk");

			monitor.incrementProgress(1);
		}

	}
Apply all descendants starting at each category node.
@param monitor task monitor
@param symbolMap symbol map where possible function definitions may be applied
@throws CancelledException if task cancelled
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/ApplyFunctionDataTypesCmd.java