TY - GEN
T1 - Tool Support for Managing Clone Refactorings to Facilitate Code Review in Evolving Software
AU - Chen, Zhiyuan
AU - Mohanavilasam, Maneesh
AU - Kwon, Young Woo
AU - Song, Myoungkyu
N1 - Publisher Copyright:
© 2017 IEEE.
PY - 2017/9/7
Y1 - 2017/9/7
N2 - Developers often perform copy-and-paste activities. This practice causes the similar code fragment (aka code clones) to be scattered throughout a code base. Refactoring for clone removal is beneficial, preventing clones from having negative effects on software quality, such as hidden bug propagation and unintentional inconsistent changes. However, recent research has provided evidence that factoring out clones is not always to reduce the risk of introducing defects, and it is often difficult or impossible to remove clones using standard refactoring techniques. To investigate which or how clones can be refactored, developers typically spend a significant amount of their time managing individual clone instances or clone groups scattered across a large code base. To address the problem, this paper presents a technique for managing clone refactorings, Pattern-based clone Refactoring Inspection (PRI), using refactoring pattern templates. By matching the refactoring pattern templates against a code base, it summarizes refactoring changes of clones, and detects the clone instances not consistently factored out as potential anomalies. PRI also provides novel visualization user interfaces specifically designed for inspecting clone refactorings. In the evaluation, PRI analyzes clone instances in six open source projects. It identifies clone refactorings with 94.1% accuracy and detects inconsistent refactorings with 98.4% accuracy. Our results show that PRI should help developers effectively inspect evolving clones and correctly apply refactorings to clone groups.
AB - Developers often perform copy-and-paste activities. This practice causes the similar code fragment (aka code clones) to be scattered throughout a code base. Refactoring for clone removal is beneficial, preventing clones from having negative effects on software quality, such as hidden bug propagation and unintentional inconsistent changes. However, recent research has provided evidence that factoring out clones is not always to reduce the risk of introducing defects, and it is often difficult or impossible to remove clones using standard refactoring techniques. To investigate which or how clones can be refactored, developers typically spend a significant amount of their time managing individual clone instances or clone groups scattered across a large code base. To address the problem, this paper presents a technique for managing clone refactorings, Pattern-based clone Refactoring Inspection (PRI), using refactoring pattern templates. By matching the refactoring pattern templates against a code base, it summarizes refactoring changes of clones, and detects the clone instances not consistently factored out as potential anomalies. PRI also provides novel visualization user interfaces specifically designed for inspecting clone refactorings. In the evaluation, PRI analyzes clone instances in six open source projects. It identifies clone refactorings with 94.1% accuracy and detects inconsistent refactorings with 98.4% accuracy. Our results show that PRI should help developers effectively inspect evolving clones and correctly apply refactorings to clone groups.
KW - Code clones
KW - maintenance
KW - refactorings
KW - software evolution
UR - http://www.scopus.com/inward/record.url?scp=85031938842&partnerID=8YFLogxK
U2 - 10.1109/COMPSAC.2017.242
DO - 10.1109/COMPSAC.2017.242
M3 - Conference contribution
AN - SCOPUS:85031938842
T3 - Proceedings - International Computer Software and Applications Conference
SP - 288
EP - 297
BT - Proceedings - 2017 IEEE 41st Annual Computer Software and Applications Conference, COMPSAC 2017
A2 - Demartini, Claudio
A2 - Conte, Thomas
A2 - Nakamura, Motonori
A2 - Lung, Chung-Horng
A2 - Zhang, Zhiyong
A2 - Hasan, Kamrul
A2 - Reisman, Sorel
A2 - Liu, Ling
A2 - Claycomb, William
A2 - Takakura, Hiroki
A2 - Yang, Ji-Jiang
A2 - Tovar, Edmundo
A2 - Cimato, Stelvio
A2 - Ahamed, Sheikh Iqbal
A2 - Akiyama, Toyokazu
PB - IEEE Computer Society
T2 - 41st IEEE Annual Computer Software and Applications Conference, COMPSAC 2017
Y2 - 4 July 2017 through 8 July 2017
ER -