Update TreeFunctionsImpl.java