{
if (nodeIndex == 0) {
clearNodes();
}
Node node = nodes.get(nodeIndex);
List<Node> currentNodesReached = nodesReached.get();
if (!node.wasReached() && (nodeIndex == 0 || nodeIndex > previousNodeIndex.get())) {
node.setReached(Boolean.TRUE);
currentNodesReached.add(node);
previousNodeIndex.set(nodeIndex);
}
if (node instanceof Exit) {