code: private static boolean isControlDependentChild(Node child) {
      Node parent = child.getParent();
  
      if (parent == null) {
        return false;
      }
  
      ArrayList<Node> siblings = new ArrayList<>();
      Iterables.addAll(siblings, parent.children());
  
      int indexOfChildInParent = siblings.indexOf(child);
  
      switch (parent.getToken()) {
        case IF:
        case HOOK:
          return (indexOfChildInParent == 1 || indexOfChildInParent == 2);
        case FOR:
        case FOR_IN:
          // Only initializer is not control dependent
          return indexOfChildInParent != 0;
        case SWITCH:
          return indexOfChildInParent > 0;
        case WHILE:
        case DO:
        case AND:
        case OR:
        case FUNCTION:
          return true;
  
        default:
          return false;
      }
    }
docs: Returns true if the number of times the child executes depends on the
  parent.
  
  For example, the guard of an IF is not control dependent on the
  IF, but its two THEN/ELSE blocks are.
  
  Also, the guard of WHILE and DO are control dependent on the parent
  since the number of times it executes depends on the parent.