question: private void collectTimes ( Tree tree , NodeRef node , Set < NodeRef > excludeNodesBelow , Intervals intervals ) { intervals . addCoalescentEvent ( tree . getNodeHeight ( node ) ) ; for ( int i = 0 ; i < tree . getChildCount ( node ) ; i ++ ) { NodeRef child = tree . getChild ( node , i ) ; boolean include = true ; if ( excludeNodesBelow != null && excludeNodesBelow . contains ( child ) ) { include = false ; } if ( ! include || tree . isExternal ( child ) ) { intervals . addSampleEvent ( tree . getNodeHeight ( child ) ) ; } else { collectTimes ( tree , child , excludeNodesBelow , intervals ) ; } } }
target:  extract coalescent times and tip information into ArrayList times from tree.