private int[] findViewedIndexes(String oldParentName, String childName) {

		List<TreePath> viewList = tree.getViewList();
		int[] indexes = new int[viewList.size()];
		int idx = 0;

		for (int i = 0; i < viewList.size(); i++) {
			TreePath path = viewList.get(i);
			String[] names = getNames(path);
			for (int j = 0; j < names.length; j++) {
				if (names[j].equals(childName) && j > 0 && names[j - 1].equals(oldParentName)) {
					indexes[idx] = i;
					++idx;
					break;
				}
			}
		}
		if (idx <= indexes.length - 1) {
			int[] temp = new int[idx];
			for (int i = 0; i < idx; i++) {
				temp[i] = indexes[i];
			}
			indexes = temp;
		}
		return indexes;
	}
A Module or Fragment was renamed, so find all nodes with oldName and update them
with the new name and new Group object.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramListener.java