views:

120

answers:

3

What is the best tool(s) for tracking down "cut and paste reuse" of code in JavaScript and C#? I've inherited a really big project and the amount of code that is repeated throughout the app is 'epic'. I need some help getting handle on all the stuff that can be refactored to base classes, reusable js libs, etc...

If it can plug into Visual Studio 2010, that would be an added bonus.

+1  A: 

Simian has built in support for C# and JavaScript. There is also a tool called Clone Detective that works as an add-in for Visual Studio, although it doesn't look like it works with JavaScript.

adrianbanks
Nice...........
John Gietzen
A: 

A couple that I know,

And a worthy reading article.

KMan
A: 

The SD CloneDR is a tool that finds exact and near-miss blocks of duplicate code using the language structure to guide the analysis and minimize false positives. It tends to find 10%+ duplicated code in almost anything that human beings write.

CloneDR has compiler-quality langauge front ends for C, C++, Java, COBOL, PHP. Python, Fortran, as well as C# and Javascript.

You can see clone detection reports at the web link report for a variety of systems.

Ira Baxter