Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Extracting code clones for refactoring using combinations of clone metrics
Choi E., Yoshida N., Ishio T., Inoue K., Sano T.  IWSC 2011 (Proceedings of the 5th International Workshop on Software Clones, Waikiki, Honolulu, HI, May 23, 2011)7-13.2011.Type:Proceedings
Date Reviewed: Feb 16 2012

Many tools to detect code duplication are available. What remains lacking is an understanding of how best to use the results these tools provide. Anecdotal evidence suggests that high values for individual clone metrics are not always indicative of clone sets that can and should be refactored.

An argument is made for using combinations of clone metrics. For example, the size or length of a clone (LEN) can be used in conjunction with the number or population (POP) of clones in a clone set. LEN can be used to eliminate small-sized clone sets with high POP values. A study is reported in which a developer made refactoring decisions on various kinds of clone sets. The first three kinds of sets were based on individual metrics: LEN, ratio of nonrepeated token sequences (RNR), and POP. The second three kinds of sets were based on paired combinations of LEN, RNR, and POP. A seventh kind of set combined all three of these metrics. Tables 2 and 3 clearly show that combined metrics outperform individual metrics in identifying worthwhile refactoring candidates, often by a factor of two.

A rule of thumb for tools providing suggestions or warnings is that the false positive rate should be less than 50 percent. According to Table 2, the individual metric LEN satisfies this criterion. Some readers would disagree with the authors’ conclusion that the use of LEN alone is unacceptable. Despite this criticism, I recommend this paper to those involved in software quality assurance and those researching code duplication.

Reviewer:  Andy Brooks Review #: CR139872 (1208-0824)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Restructuring, Reverse Engineering, And Reengineering (D.2.7 ... )
 
 
Product Metrics (D.2.8 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Restructuring, Reverse Engineering, And Reengineering": Date
Software evolution: the software maintenance challenge
Arthur L., Wiley-Interscience, New York, NY, 1988. Type: Book (9789780471628712)
Mar 1 1989
The year 2000 computing crisis
Murray J., Murray M., McGraw-Hill, Inc., New York, NY, 1996. Type: Book (9780079129451)
Oct 1 1996
Constraint-based design recovery for software reengineering
Woods S., Quilici A., Yang Q., Kluwer Academic Publishers, Norwell, MA, 1998. Type: Book (9780792380672)
Dec 1 1998
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy