anchor.diff:      (first (helper tree))))
   
   (defun rewrite-adds-and-deletes (tree)
  -  "Rewrite the Markup trees so that :add and :delete tags "
  +  "Rewrite the Markup tree so that :add and :delete tags are moved out
  +as far as possible. E.g. given (:p (:add something)) we tranform it
  +to: (:add (:p something))."
     (cond
       ((consp tree)
        (let ((add-or-delete (has-nested-add-or-delete-p tree)))
  -       (when add-or-delete
  -         (setf tree (promote-tag add-or-delete tree)))
  -       (mapcar #'rewrite-adds-and-deletes tree)))
  +       (mapcar
  +        #'rewrite-adds-and-deletes
  +        (if add-or-delete (promote-tag add-or-delete tree) tree))))
       (t tree)))
   
   (defun has-nested-add-or-delete-p (tree)
  
positive.code:                   (mapcar #'remove-empties (detextify-markup diff)))))
  
  (defun remove-empties (tree)
    (labels ((helper (x)
               (cond
                 ((and (consp x) (null (rest x))) nil)
  
negative.code:               (one-way-similarity ta tb)))))
  
  (defun finer-grained-p (new-diff orig-diff)
    "Is the new-diff finer-grained than the original?"
    (< (length (remove-if-not #'part-of-diff-p new-diff)) (length orig-diff)))
  
  (defun part-of-diff-p (text)
    (or (has-property-p :add text) (has-property-p :delete text)))
  
  (defun pair-adds-and-deletes (original-file edited-file)
    (let ((markup (foo-diff-to-markup original-file edited-file)))
      (flet ((chunkify (things)
  