

My reply to Scott Meyers concerning the detection of Copy-Paste errors - AndreyKarpov
http://www.viva64.com/en/b/0103/

======
zwieback
That's very interesting and ambitious. I just started using Coverity for my
code and find that eliminating false positives trumps all other features of
static code analysis. Sending error reports to third parties that supplied
source means I have to be very precise and absolutely sure that it's really a
defect, otherwise I get no cooperation.

I think it would be really interesting to develop a way of triggering static
analysis rules for case-and-paste errors when the actual pasting is taking
place, e.g. keeping track of what was typed in and what was pasted in. Maybe
that would allow you to do things more aggressively.

------
grandinj
There is an open-source copy paste detector called CPD. It's part of the Java
PMD project (pmd.sf.net), but it should work on C/C++ code.

