code: private EDiff diffAlgorithm(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx,
          final DepthCounter paramDepth) throws TTIOException {
          EDiff diff = null;
  
          // Check if node has been deleted.
          if (paramDepth.getOldDepth() > paramDepth.getNewDepth()) {
              diff = EDiff.DELETED;
          } else if (checkUpdate(paramNewRtx, paramOldRtx)) { // Check if node has
                                                              // been updated.
              diff = EDiff.UPDATED;
          } else {
              // See if one of the right sibling matches.
              EFoundEqualNode found = EFoundEqualNode.FALSE;
              final long key = paramOldRtx.getNode().getDataKey();
  
              while (((ITreeStructData)paramOldRtx.getNode()).hasRightSibling()
                  && paramOldRtx.moveTo(((ITreeStructData)paramOldRtx.getNode()).getRightSiblingKey())
                  && found == EFoundEqualNode.FALSE) {
                  if (checkNodes(paramNewRtx, paramOldRtx)) {
                      found = EFoundEqualNode.TRUE;
                  }
              }
  
              paramOldRtx.moveTo(key);
              diff = found.kindOfDiff();
          }
  
          assert diff != null;
          return diff;
      }
docs: Main algorithm to compute diffs between two nodes.
  
  @param paramNewRtx
  {@link IReadTransaction} on new revision
  @param paramOldRtx
  {@link IReadTransaction} on old revision
  @param paramDepth
  {@link DepthCounter} container for current depths of both
  transaction cursors
  @return kind of diff
  @throws TTIOException