Tree[] kids = t.children();
for (int i = 0, n = kids.length; i < n; i++) {
fixEmptyTreeLeafs(kids[i], newToOld, oldToNew);
}
if (t instanceof EmptyTreeLeaf) {
EmptyTreeLeaf oldT = (EmptyTreeLeaf) newToOld.get(t);
((EmptyTreeLeaf) t).setEmptyType(oldT.emptyType());
Tree oldTraceTo = oldT.traceTo();
Tree newTraceTo = oldToNew.get(oldTraceTo);
if (newTraceTo != null)
((EmptyTreeLeaf) t).setTraceTo(newTraceTo);
else
((EmptyTreeLeaf) t).setTraceTo(oldTraceTo);