@Override
	public void findAll(Program program, SearchAndReplaceQuery query,
			Accumulator<QuickFix> accumulator, TaskMonitor monitor) throws CancelledException {

		SymbolTable symbolTable = program.getSymbolTable();
		int symbolCount = symbolTable.getNumSymbols();
		monitor.initialize(symbolCount, "Searching Labels...");

		Pattern pattern = query.getSearchPattern();

		Set<SymbolType> selectedSymbolTypes = getSelectedSymbolTypes(query);

		for (Symbol symbol : symbolTable.getDefinedSymbols()) {
			monitor.increment();
			if (symbol.isExternal()) {
				continue;
			}

			SymbolType symbolType = symbol.getSymbolType();

			if (selectedSymbolTypes.contains(symbolType)) {
				if (symbolType == SymbolType.FUNCTION) {
					Function function = (Function) symbol.getObject();
					// Thunks can't be renamed directly
					if (function.isThunk()) {
						continue;
					}
				}
				Matcher matcher = pattern.matcher(symbol.getName());
				if (matcher.find()) {
					String newName = matcher.replaceAll(query.getReplacementText());
					RenameSymbolQuickFix item = new RenameSymbolQuickFix(symbol, newName);
					accumulator.add(item);
				}
			}
		}
	}
{@link SearchAndReplaceHandler} for handling search and replace for symbols. Specifically, it
provides {@link SearchType}s for renaming labels, functions, namespaces, classes, local 
variables, and parameters.
Ghidra/Features/Base/src/main/java/ghidra/features/base/replace/handler/SymbolsSearchAndReplaceHandler.java