Wednesday, September 28, 2011

PMD - Copy Paste Checks

In addition to all the Rule validation done by PMD, PMD also checks for copy paste occurrences in the code. This is by far one of the most important checks that PMD does. More the occurrences of Copy-Paste more the likelihood of errors in the code. More the occurrences of Copy Paste the more the possibility of creating errors. One would change in one place and forget in another. Also it leads to code bloat and inefficient memory usage.

One should pay close attention to these results and read Refactoring by Martin Fowler to solve the copy paste problems.

No comments: