private static String nodeDigest(ParseTreeNode node){
  StringBuilder sb=new StringBuilder();
  nodeDigest(node,sb);
  return sb.toString();
}

private static String nodeDigest ( ParseTreeNode node ) { StringBuilder sb = new StringBuilder ( ) ; nodeDigest ( node , sb ) ; return sb . toString ( ) ; }
a node digest is a string that describes a js parse tree , but which , unlike the rendered form , can be efficiently composed from the digests of the children . < p > this allows us to efficiently walk a tree finding structural matches without incurring an o ( n * * 2 ) overhead of repeatedly rendering parse trees . < p > node digests cannot be serialized . < p > the digest consists of an open parenthesis , followed by the digests of any children , followed by a key which identifies the class , and finally followed by a string form of the value finished by a close parenthesis .
