You can never find a good Ukkonen Generalized Suffix Tree with Lowest Common Ancestor implementation when you need one. (hmm, biojava.org seems to have one, but it's LGPL :( )