boolean (OT oldChild, NT newChild) { int oldStart = myOldTree.getStartOffset(oldChild) - myOldTreeStart; int oldEnd = myOldTree.getEndOffset(oldChild) - myOldTreeStart; int newStart = myNewTree.getStartOffset(newChild) - myNewTreeStart; int newEnd = myNewTree.getEndOffset(newChild) - myNewTreeStart; // drill down only if node texts match, but when they do, match all the way down unconditionally return CharArrayUtil.regionMatches(myOldText, oldStart, oldEnd, myNewText, newStart, newEnd); }