Do tools exist which automatically find copy-and-paste code? [closed]

倖福魔咒の 提交于 2019-11-30 03:05:50
msalib

Yes, try the Copy Paste Detector.

Our CloneDR is a tool for finding exact and near-miss blocks of code constructed by copy and paste activities. It can handle systems of millions of lines of code.

It uses precise language grammars to pick out language structures (identifiers, expressions, statements, blocks, functions, classes, packages, ...) that have been copied, and to determine the points of variation across the sets of clones (any of those structures can be parameters!)

CloneDR operates on a wide variety of languages: C, C++, C#, Java, PHP, COBOL, Python, Ada, Fortran, EGL and visual basic (VBScript, VB6, VB.net).

The website has a number of sample clone detection reports from a variety of those languages.

This product is available for evaluation on http://www.semanticdesigns.com. Other open source alternatives are Simian and PMD CPD

CloneDigger for Python and Java.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!