private static InspectionTreeNode next(InspectionTreeNode node) {
      InspectionTreeNode.Children children = node.myChildren;
      // if node has children: take first child
      if (children != null && children.myChildren.length > 0) return children.myChildren[0];
      
      while (true) {
        // otherwise: take next sibling (or next sibling of parent (or next sibling of parent))
        InspectionTreeNode parent = node.myParent;
        if (parent == null) return TreeUtil.isCyclicScrollingAllowed() ? node : null;
        InspectionTreeNode.Children siblings = parent.myChildren;
        assert siblings != null;
        int index = Arrays.binarySearch(siblings.myChildren, node, InspectionResultsViewComparator.INSTANCE);
        assert index >= 0;
        index++;
        if (siblings.myChildren.length > index) return siblings.myChildren[index];
        node = parent;
      }
    }
private static InspectionTreeNode next(InspectionTreeNode node)