[darcs-devel] Duplicated code in Darcs

Iago Abal iago.abal at gmail.com
Sat Jan 15 11:55:55 UTC 2011


Hi all,

I was trying to detect code duplication in Darcs, so maybe you will want to
know some results (please correct me if I made some mistake):

   - strReplace definition is duplicated in both Darcs.Patch.Info and
   Darcs.Patch.Viewing. There is a comment indicating that it is duplicated
   code, maybe for some good reason.
   - ct is duplicated in Darcs.Patch.TouchesFiles
   - startit is 4-duplicated in Darcs.ProgressPatches and Progress
   - pair2m is duplicated in Darcs.Test.Patch.Unit
   - withRepoLock and withReadRepoLock share most part of their code
   - In Darcs.IO mRename is the same for both TolerantIO and SilentIO
   - Darcs.Patch.OldDate and IsoDate share lot of code... clearly a
   copy&pasted module I know, maybe for some good reason.

There are more duplicated code blocks, though I just reported the clear
ones. I'm aware that duplicated code detection for functional languages may
need different approaches, and perhaps there is much more duplication in
Darcs!

Regards,

-- 
Iago Abal Rivas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20110115/20ac4f06/attachment.html>


More information about the darcs-devel mailing list