No surprise, when it comes to diff on modified AST, straightforward diff algorithm performs poorly even for small code modifications, i.e. when two statements are exchanged in order. Here are some references for future investigations into a subject.