private void handleBackEdges(Map<GhidraBundle, Set<GhidraBundle>> newFront) {
			Iterator<Entry<GhidraBundle, Set<GhidraBundle>>> it =
				newFront.entrySet().iterator();
			while (it.hasNext() && !monitor.isCancelled()) {
				Entry<GhidraBundle, Set<GhidraBundle>> entry = it.next();
				GhidraBundle source = entry.getKey();
				if (containsVertex(source)) {
					for (GhidraBundle destination : entry.getValue()) {
						if (source != destination) {
							addEdge(source, destination, new BundleEdge());
						}
					}
					it.remove();
				}
			}
		}
Utility class to build a dependency graph from bundles where capabilities map to 
requirements.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java