code: EDiff diff(final INodeReadTrx paramNewRtx, final INodeReadTrx paramOldRtx, final DepthCounter paramDepth,
          final EFireDiff paramFireDiff) throws TTIOException {
          assert paramNewRtx != null;
          assert paramOldRtx != null;
          assert paramDepth != null;
  
          EDiff diff = EDiff.SAME;
  
          // Check for modifications.
          switch (paramNewRtx.getNode().getKind()) {
          case ROOT:
          case TEXT:
          case ELEMENT:
              if (!checkNodes(paramNewRtx, paramOldRtx)) {
                  diff = diffAlgorithm(paramNewRtx, paramOldRtx, paramDepth);
              }
              break;
          default:
              // Do nothing.
          }
  
          if (paramFireDiff == EFireDiff.TRUE) {
              fireDiff(diff, ((ITreeStructData)paramNewRtx.getNode()), ((ITreeStructData)paramOldRtx.getNode()),
                  new DiffDepth(paramDepth.getNewDepth(), paramDepth.getOldDepth()));
          }
          return diff;
      }
docs: Diff of 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
  @param paramFireDiff
  determines if a diff should be fired
  @return kind of difference
  @throws TTIOException