{@inheritDoc} This implementation scans the children in left to right order.

@param node  {@inheritDoc}
@param p  {@inheritDoc}
@return the result of scanning
181234
@Override
    public R visitValue(ValueTree node, P p) {
        return scan(node.getReference(), p);
    }
108088
@Override public JCTree visitVariable(VariableTree node, Void p) {
		JCVariableDecl original = node instanceof JCVariableDecl ? (JCVariableDecl) node : null;
		JCVariableDecl copy = (JCVariableDecl) super.visitVariable(node, p);
		if (original == null) return copy;
		copy.sym = original.sym;
		if (copy.sym != null) copy.type = original.type;
		if (copy.type != null) {
			boolean wipeSymAndType = copy.type.isErroneous();
			if (!wipeSymAndType) {
				TypeTag typeTag = TypeTag.typeTag(copy.type);
				wipeSymAndType = (CTC_NONE.equals(typeTag) || CTC_ERROR.equals(typeTag) || CTC_UNKNOWN.equals(typeTag) || CTC_UNDETVAR.equals(typeTag));
			}
			
			if (wipeSymAndType) {
				copy.sym = null;
				copy.type = null;
			}
		}
		
		return copy;
	}
1341546
private Node getFirstChild(Node node) {

		if (node == null)
			return null;

		Node newNode = node.getFirstChild();
		if (newNode == null)
			return null;

		int accept = acceptNode(newNode);
		if (accept == NodeFilter.FILTER_ACCEPT)
			return newNode;
		else if (accept == NodeFilter.FILTER_SKIP && newNode.hasChildNodes())
			return getFirstChild(newNode);

		// if (accept == NodeFilter.REJECT_NODE)
		return getNextSibling(newNode);
	}
1074790
public Node<T> getPrevious(Node<T> node) {
    	if (node.left != null) {
    		node = node.left;
    		while (node.right != null) node = node.right;
    		return node;
    	}
    	// nothing at left, it may be the parent node if the node is at the right
    	if (node == first) return null;
    	return getPrevious(root, node.value);
    }
745412
@Override
    public R visitSerial(SerialTree node, P p) {
        return scan(node.getDescription(), p);
    }
1027596
public boolean contains(Node node) {
    if (node == null) return false;
    netlock.readLock().lock();
    try {
      Node parent = node.getParent();
      for(int level=node.getLevel(); parent!=null&&level>0;
          parent=parent.getParent(), level--) {
        if (parent == clusterMap)
          return true;
      }
    } finally {
      netlock.readLock().unlock();
    }
    return false; 
  }
1251883
public static void scanForLeaves(List<RPNode> nodes,RPTree scan) {
        scanForLeaves(nodes,scan.getRoot());
    }
782935
public static void slimNode(RPNode node) {
        if(node.getRight() != null && node.getLeft() != null) {
            node.getIndices().clear();
        }

    }
1261377
final Node<E> succ(Node<E> p) {
        Node<E> next = p.next;
        return (sentinel() == next) ? head : next;
    }
323210
@Override
    public R visitLambdaExpression(LambdaExpressionTree node, P p) {
        R r = scan(node.getParameters(), p);
        r = scanAndReduce(node.getBody(), p, r);
        return r;
    }
1214378
private void processNode(final Node node) {
        processNode(node.getPath(), node);

        Set<Node> children = node.getChildren();
        for (Node child : children) {
            processNode(child);
        }
    }
154983
final Node<E> pred(Node<E> p) {
        Node<E> q = p.prev;
        // j2objc: q == p.prev == sentinel means node GC-unlinked
        return (sentinel() == q) ? last() : q;
    }
698317
@Override
    public R visitIndex(IndexTree node, P p) {
        R r = scan(node.getSearchTerm(), p);
        r = scanAndReduce(node.getDescription(), p, r);
        return r;
    }
33657
function(node) {
    var index = '';
    do {
      if (node.id) index = '[' + node.position + ']' + index;
    } while ((node = node.parent) != null);
    return index;
  }
303312
@Override
    public R visitIndex(IndexTree node, P p) {
        return defaultAction(node, p);
    }
501361
public final R visit(DocTree node, P p) {
        return (node == null) ? null : node.accept(this, p);
    }
786100
@Override
    public Void visitClass(ClassTree node, Set<String> p) {
        scan(node.getModifiers(), p);
        scan(node.getTypeParameters(), p);
        scan(node.getExtendsClause(), p);
        scan(node.getImplementsClause(), p);
        scan(node.getMembers(), body);
        return null;
    }