[cfe-dev] CopyPaste detection clang static analyzer
Richard
legalize at xmission.com
Mon Feb 3 14:08:28 PST 2014
In article <CAENS6EsgzhXWfANFze8VAp68qDGHnrHNZJaaLmi28YJtnQwOmw at mail.gmail.com>,
David Blaikie <dblaikie at gmail.com> writes:
> On Mon, Feb 3, 2014 at 3:06 AM, Vassil Vassilev <vvasilev at cern.ch> wrote:
>
> > A few months ago I was looking for a copy-paste detector for a C++
> > project. I didn't find such a feature of clang's static analyzer. Is this
> > the case?
>
> copy-paste detector? As in plagarism detection?
I don't think plagiarism is the concern. The conern is that
copy/paste of blocks of code where the pasted block needs to be
updated in several places, but not all of the updates were performed.
Coverity can detect such instances, for instance.
Here is an article from 2006 describing such a tool:
<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.123.113>
Wikipedia says PMD has a copy/paste detector that works with C++:
<http://en.wikipedia.org/wiki/PMD_(software)#Copy.2FPaste_Detector_.28CPD.29>
"Note that CPD works with Java, JSP, C, C++, C#, Fortran and PHP code.
Your own language is missing ? See how to add it here"
<http://pmd.sourceforge.net/snapshot/cpd-usage.html>
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
More information about the cfe-dev
mailing list