code: private void runDepthFirstScan(final Kam kam,
              final KamNode cnode,
              final KamNode source,
              int depth,
              final SetStack<KamNode> nodeStack,
              final SetStack<KamEdge> edgeStack,
              final List<SimplePath> pathResults) {
  
          depth += 1;
  
          final Set<KamEdge> edges = kam.getAdjacentEdges(cnode, BOTH);
          for (final KamEdge edge : edges) {
              if (pushEdge(edge, nodeStack, edgeStack)) {
  
                  if (depth == maxSearchDepth) {
                      final SimplePath newPath =
                              new SimplePath(kam, source, nodeStack.peek(),
                                      edgeStack.toStack());
                      pathResults.add(newPath);
                  } else {
                      // continue depth first scan
                      runDepthFirstScan(kam, nodeStack.peek(), source, depth,
                              nodeStack,
                              edgeStack, pathResults);
                  }
  
                  edgeStack.pop();
                  nodeStack.pop();
              } else if (endOfBranch(edgeStack, edge, edges.size())) {
                  final SimplePath newPath =
                          new SimplePath(kam, source, nodeStack.peek(),
                                  edgeStack.toStack());
                  pathResults.add(newPath);
              }
          }
      }
docs: Runs a recursive depth-first scan from a {@link KamNode} source until a
  max search depth ({@link BasicPathFinder#maxSearchDepth}) is reached.
  When the max search depth is reached a {@link SimplePath} is added,
  containing the {@link Stack} of {@link KamEdge}, and the algorithm continues.
  
  @param kam {@link Kam}, the kam to traverse
  @param cnode {@link KamNode}, the current node to evaluate
  @param source {@link KamNode}, the node to search from
  @param depth <tt>int</tt>, the current depth of this scan recursion
  @param nodeStack {@link Stack} of {@link KamNode}, the nodes on the
  current scan from the <tt>source</tt>
  @param edgeStack {@link Stack} of {@link KamEdge}, the edges on the
  current scan from the <tt>source</tt>
  @param pathResults the resulting paths scanned from source