I am managing a group of three interns working on a php project. They seem to be not good at refactoring and are using duplicat开发者_开发百科e code in multiple places. I am looking for a tool which I can use to find this duplicate code so I can show them.
This would make my job easier, and the project more elegant and less prone to errors. Any leads?
PMD is a good tool to find code duplication. Here is a link to the site.
See our CloneDR tool. It finds duplicate code across large software systems, using compiler-accurate parsing to find matches guided by the language syntax (AST matching), ignoring changes in whitespace and linebreaks. It will find exact duplicates, and near-miss duplicates. For near-duplicates, its reports the differences in the near-misses as parameters; it almost tells you how to code a replacement subroutine for the clones.
CloneDR operates on a variety of languages: C, C++, C#, COBOL, EGL, Java, JavaScript, PHP, Python and many more. Example detection reports for each of these can be found at the link.
I like CCFinderX a lot, but it is abandonware.
精彩评论