A Java trees merger