public Set<Vertex> getVerticesInContainingComponent(Vertex v) {
		Set<Vertex> verticesInComponent = new HashSet<>();
		Set<Vertex> toDo = new HashSet<>();
		Set<Vertex> toDoNext = new HashSet<>();
		Set<Vertex> neighborhood;
		Iterator<Vertex> i;
		Vertex u;

		toDo.add(v);
		while (!toDo.isEmpty()) {
			neighborhood = this.getNeighborhood(toDo);
			i = neighborhood.iterator();
			while (i.hasNext()) {
				u = i.next();
				if ((!verticesInComponent.contains(u)) && (!toDo.contains(u))) {
					toDoNext.add(u);
					verticesInComponent.add(u);
				}
			}
			toDo.clear();
			toDo.addAll(toDoNext);
			toDoNext.clear();
		}
		return verticesInComponent;
	}
Returns a java.util.Set containing all of the vertices within the
 same component a the given vertex.
Ghidra/Framework/Generic/src/main/java/ghidra/util/graph/DirectedGraph.java