private ProgramNode[] findNodes(Group g) {

		ArrayList<ProgramNode> list = new ArrayList<>();

		for (ProgramNode node : nodeList) {
			Group group = node.getGroup();
			if (group != null && group.equals(g)) {
				list.add(node);
			}
		}
		ProgramNode[] nodes = new ProgramNode[list.size()];
		return list.toArray(nodes);
	}
Find the nodes containing the given Group.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramDnDTree.java