code: private void calculateConnectionIDs() {
  
  		final Set<ExecutionGroupVertex> alreadyVisited = new HashSet<ExecutionGroupVertex>();
  		final ExecutionStage lastStage = getStage(getNumberOfStages() - 1);
  
  		for (int i = 0; i < lastStage.getNumberOfStageMembers(); ++i) {
  
  			final ExecutionGroupVertex groupVertex = lastStage.getStageMember(i);
  			
  			int currentConnectionID = 0;
  			
  			if (groupVertex.isOutputVertex()) {
  			currentConnectionID = groupVertex.calculateConnectionID(currentConnectionID, alreadyVisited);
  			}
  		}
  	}
docs: Calculates the connection IDs of the graph to avoid deadlocks in the data flow at runtime.