/guava/guava/src/com/google/common/graph/DirectedGraphConnections.java
short predecessorCount = 0;
int predecessorCount = 0;
N thisNode, Iterable<EndpointPair<N>> incidentEdges, Function<N, V> successorNodeToValueFn) { checkNotNull(thisNode); checkNotNull(successorNodeToValueFn); Map<N, Object> adjacentNodeValues = new HashMap<>(); ImmutableList.Builder<NodeConnection<N>> orderedNodeConnectionsBuilder = ImmutableList.builder(); <extra_id_0> int successorCount = 0; for (EndpointPair<N> incidentEdge : incidentEdges) { if (incidentEdge.nodeU().equals(thisNode) && incidentEdge.nodeV().equals(thisNode)) { adjacentNodeValues.put(thisNode, new PredAndSucc(successorNodeToValueFn.apply(thisNode))); orderedNodeConnectionsBuilder.add(new NodeConnection.Pred<>(thisNode)); orderedNodeConnectionsBuilder.add(new NodeConnection.Succ<>(thisNode));