docs: private long findShortcuts(ShortcutHandler sch) {
          int maxVisitedNodes = getMaxVisitedNodesEstimate();
          long degree = 0;
          EdgeIterator incomingEdges = inEdgeExplorer.setBaseNode(sch.getNode());
          // collect outgoing nodes (goal-nodes) only once
          while (incomingEdges.next()) {
              int fromNode = incomingEdges.getAdjNode();
              // accept only not-contracted nodes, do not consider loops at the node that is being contracted
              if (fromNode == sch.getNode() || isContracted(fromNode))
                  continue;
  
              final double incomingEdgeWeight = prepareWeighting.calcWeight(incomingEdges, true, EdgeIterator.NO_EDGE);
              // this check is important to prevent calling calcMillis on inaccessible edges and also allows early exit
              if (Double.isInfinite(incomingEdgeWeight)) {
                  continue;
              }
              final double incomingEdgeDistance = incomingEdges.getDistance();
              int incomingEdge = incomingEdges.getEdge();
              int inOrigEdgeCount = getOrigEdgeCount(incomingEdge);
              // collect outgoing nodes (goal-nodes) only once
              EdgeIterator outgoingEdges = outEdgeExplorer.setBaseNode(sch.getNode());
              // force fresh maps etc as this cannot be determined by from node alone (e.g. same from node but different avoidNode)
              prepareAlgo.clear();
              degree++;
              while (outgoingEdges.next()) {
                  int toNode = outgoingEdges.getAdjNode();
                  // add only not-contracted nodes, do not consider loops at the node that is being contracted
                  if (toNode == sch.getNode() || isContracted(toNode) || fromNode == toNode)
                      continue;
  
                  // Limit weight as ferries or forbidden edges can increase local search too much.
                  // If we decrease the correct weight we only explore less and introduce more shortcuts.
                  // I.e. no change to accuracy is made.
                  double existingDirectWeight = incomingEdgeWeight + prepareWeighting.calcWeight(outgoingEdges, false, incomingEdges.getEdge());
                  if (Double.isNaN(existingDirectWeight))
                      throw new IllegalStateException("Weighting should never return NaN values"
                              + ", in:" + getCoords(incomingEdges, prepareGraph) + ", out:" + getCoords(outgoingEdges, prepareGraph)
                              + ", dist:" + outgoingEdges.getDistance());
  
                  if (Double.isInfinite(existingDirectWeight))
                      continue;
  
                  final double existingDistSum = incomingEdgeDistance + outgoingEdges.getDistance();
                  prepareAlgo.setWeightLimit(existingDirectWeight);
                  prepareAlgo.setMaxVisitedNodes(maxVisitedNodes);
                  prepareAlgo.setEdgeFilter(ignoreNodeFilter.setAvoidNode(sch.getNode()));
  
                  dijkstraSW.start();
                  dijkstraCount++;
                  int endNode = prepareAlgo.findEndNode(fromNode, toNode);
                  dijkstraSW.stop();
  
                  // compare end node as the limit could force dijkstra to finish earlier
                  if (endNode == toNode && prepareAlgo.getWeight(endNode) <= existingDirectWeight)
                      // FOUND witness path, so do not add shortcut
                      continue;
  
                  sch.foundShortcut(fromNode, toNode,
                          existingDirectWeight, existingDistSum,
                          outgoingEdges.getEdge(), getOrigEdgeCount(outgoingEdges.getEdge()),
                          incomingEdge, inOrigEdgeCount);
              }
          }
          return degree;
      }