A tool to find copied / pasted code?

Today I discovered a ton of copy / paste code inside one or two word if statements. I changed the beast 35line to a 5-line understandable code.

I'm sure I'll find some more in the codebase. Is there a tool I can use to find them? Its all in .NET written in C #

+3


source to share


1 answer


I am having the same problems and I am using Visual Studio 2012 "Analyze Solution for Code Clones" from the Analyze menu. Often this doesn't even "cut and paste" work, and people add their own methods to the code base without first checking to see if the code has already been written. Sometimes this is a bunch of boilerplate code that can be abstracted using a generic or functional approach. (So ​​you have my sympathy!) Click here to read more about MSDN .



+8


source







All Articles