Today I found tons of copy/paste code inside of if statements with one or two words changed. I changed the 35line beast into a 5 line easy to understand code.
I'm sure I'll find more of that in the codebase. Is there a tool I can use to find them? Its all in .NET written in C#
I have run into the same issues and I use Visual Studio 2012's "Analyze Solution for Code Clones" in the "Analyze" menu. Often times it's not even a "cut and paste" job, but people adding their own methods to the code base without first checking to see if that code was already written. Sometimes it's a bunch of boilerplate code that could be abstracted with a generic or functional approach, too. (So, you have my sympathy!) Click here for more information on MSDN.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With