DirectedGraph dependencyGraph = _dependencyGraph;
// Note we can not use iterator here because the edges() method
// returns an unmodifiableList. The removeEdge() method will cause
// a concurrentModification exception.
Object[] edges = dependencyGraph.edges().toArray();
for (int i = 0; i < edges.length; i++) {
Edge edge = (Edge) edges[i];
if (edge.source().getWeight().equals(inputPort)