code: private ExecutionGroupVertex getCandidateVertex(final TraversalEntry te, final boolean forward) {
  
  		while (true) {
  
  			if (forward) {
  				// No more outgoing links to consider
  				if (te.getCurrentLink() >= te.getGroupVertex().getNumberOfForwardLinks()) {
  					break;
  				}
  			} else {
  				// No more outgoing links to consider
  				if (te.getCurrentLink() >= te.getGroupVertex().getNumberOfBackwardLinks()) {
  					break;
  				}
  			}
  
  			ExecutionGroupVertex tmp = null;
  			if (forward) {
  				tmp = te.getGroupVertex().getForwardEdge(te.getCurrentLink()).getTargetVertex();
  			} else {
  				tmp = te.getGroupVertex().getBackwardEdge(te.getCurrentLink()).getSourceVertex();
  			}
  
  			// Increase the current link index by one
  			te.increaseCurrentLink();
  
  			// If stage >= 0, tmp must be in the same stage as te.getGroupVertex()
  			if (this.stage >= 0) {
  				if (tmp.getStageNumber() != this.stage) {
  					continue;
  				}
  			}
  
  			if (!this.alreadyVisited.contains(tmp)) {
  				return tmp;
  			}
  		}
  
  		return null;
  	}
docs: Returns a candidate group vertex which could potentially be visited next because it is reachable from the
  currently considered group vertex.
  
  @param te
  the traversal entry for the current source group vertex
  @param forward
  <code>true</code> if the graph should be traversed in correct order, <code>false</code> to traverse it in
  reverse order
  @return a candidate group vertex which could potentially be visited next