Any tools to check for duplicate VB.NET code?

陌路散爱 提交于 2019-12-03 05:43:34

CodeRush 11.2 introduced a new feature called Duplicate Detection and Consolidation (DDC)

http://community.devexpress.com/blogs/markmiller/archive/2011/11/29/duplicate-detection-and-consolidation-in-coderush-for-visual-studio.aspx

Make sure to check out the options for it as well, as you can have it run when so many lines are changed, certainly time has passed, etc.

They've posted some decent videos on the DevExpress site too.

Ira Baxter

[I'm the author of CloneDR ("Clone Doctor").]

CloneDR is parameterized by a full grammar for the programming language in question. So it doesn't just match lines. Rather, it can find clones which are syntactically well-formed, with variations that are more than just identifier changes, regardless of where they stop or start in a line.

The engine on which CloneDR rests, The DMS Software Reengineering Toolkit" is a tool for analyzing large scale systems in any programming language, and uses language descriptions to drive the analysis. DMS has a wide variety of language front ends already available.

Presently it has VBScript and VB6 (as dialects of "Visual Basic"). It doesn't have VB.net, but that would be pretty straightforward to do given the DMS infrastructure and our experience with lots of other languages.

So, CloneDR could do this just fine, with a small bit of effort on our part.

EDIT October 2010: VB.net added as a language CloneDR can process.

Atomiq supports vb.net amongst other languages, and the results are nicely presented.

JetBrains published console tool set Resharper Console Tools to run duplication analysis. Once installed it allows you to do the same analysis as TeamCity does and generate duplicates report locally and even include duplicates search into custom build process with MSBuild. This tool does exactly what you need. More details you can find here at JetBrains blog post

Try Simian:

Simian (Similarity Analyser) identifies duplication in Java, C#, C, C++, COBOL, Ruby, JSP, ASP, HTML, XML, Visual Basic, Groovy source code and even plain text files.

I once saw an impressive demo of Pattern Insight; its CP Miner may be what you’re looking for: http://patterninsight.com/products/cp-miner.php. It seems to be language-independent, though I couldn’t find anything explicit about languages other than C/C++.

Roll up your sleeves and write your own parser to use it with CPD?

See the question for the tools I found.

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