Menu

#48 copy and paste detection

open
nobody
None
5
2005-05-26
2005-05-26
Anaris
No

Metrics is one of the four way to detect duplicated
code at a method scope.
Using structural metrics (number of line of code,
number of local/non local variable, number of line of
comment, cyclomatique/esssential complexity,...) we can
compute the %-age of similarity between methods.
This method is a really flexible (and sound) way to
detect duplicated/redondant method (antipattern
copy&paste). Being on a method scope, it lead to easy
refactoring.
The drawback is false positive.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB