question: private static void renderTree ( Tree tree , int indent , boolean parentLabelNull , boolean firstSibling , boolean leftSiblingPreTerminal , boolean topLevel , StringBuilder sb ) { boolean suppressIndent = ( parentLabelNull || ( firstSibling && tree . isPreTerminal ( ) ) || ( leftSiblingPreTerminal && tree . isPreTerminal ( ) ) ) ; if ( suppressIndent ) { sb . append ( ' ' ) ; } else { if ( ! topLevel ) { sb . append ( '\n' ) ; } for ( int i = 0 ; i < indent ; i ++ ) { sb . append ( "  " ) ; } } if ( tree . isLeaf ( ) || tree . isPreTerminal ( ) ) { renderFlat ( tree , sb ) ; return ; } sb . append ( '(' ) ; sb . append ( tree . getLabel ( ) ) ; renderChildren ( tree . getChildren ( ) , indent + 1 , false , sb ) ; sb . append ( ')' ) ; }
target:  Display a node, implementing Penn Treebank style layout