Detecting Code Smells

I sometimes come across code that I consider posting to The Daily WTF, but I find the old career preservation instincts usually kick in. One of the most common problems occur when code is copy/pasted into lots of places. Tonight I accidentally stumbled upon this little tool for java - the copy/paste detector. Nice - the web site has links to the algorithims that are used. If I had the spare time I might get this working against C# code, but I have too many sourceforge projects open at the moment. Thinking about it, another great tool would be a plugin to word that could scan a document and hook into the google web api to find where sections had been lifted from - might have helped with 'that' dossier...

Archives

Creative Commons License
This blog is licensed under a Creative Commons License.