code: private static boolean isWHQ(Tree t, Tree parent) {
      if (t == null) {
        return false;
      }
      boolean toReturn = false;
      if (t.value().startsWith("SQ")) {
        if (parent != null && parent.value().equals("SBARQ")) {
          Tree[] kids = parent.children();
          for (Tree kid : kids) {
            // looks for a WH.*
            if (kid.value().startsWith("WH")) {
              toReturn = true;
            }
          }
        }
      }
  
      if (DEBUG) {
        System.err.println("in isWH, decision: " + toReturn + " for node " + t);
      }
  
      return toReturn;
    }
docs: /* Is the tree t a WH-question?
  At present this is only true if the tree t is a SQ having a WH.* sister
  and headed by a SBARQ.
  (It was changed to looser definition in Feb 2006.)