private void findAll(Program program, String treeName, SearchAndReplaceQuery query,
			Accumulator<QuickFix> accumulator, TaskMonitor monitor) throws CancelledException {

		Set<Group> set = gatherProgramTreeGroups(program, treeName, monitor);
		Pattern pattern = query.getSearchPattern();

		/**
		 * Check all the modules and fragments in the tree
		 */
		for (Group group : set) {
			String name = group.getName();
			Matcher matcher = pattern.matcher(name);
			if (matcher.find()) {
				String newName = matcher.replaceAll(query.getReplacementText());
				QuickFix item = new RenameProgramTreeGroupQuickFix(program, group, newName);
				accumulator.add(item);
			}
		}

	}
{@link SearchAndReplaceHandler} for handling search and replace for program tree modules and
fragments.
Ghidra/Features/Base/src/main/java/ghidra/features/base/replace/handler/ProgramTreeSearchAndReplaceHandler.java