DiffLog (@NotNull ASTNode oldRoot, @NotNull ASTNode newRoot) { DiffLog diffLog = new DiffLog(); if (oldRoot instanceof CompositeElement) { diffLog.appendReplaceElementWithEvents((CompositeElement)oldRoot, (CompositeElement)newRoot); } else { diffLog.nodeReplaced(oldRoot, newRoot); } return diffLog; }