Presenter Information

Zhiyuan ChenFollow

Advisor Information

Myoungkyu Song

Location

Dr. C.C. and Mabel L. Criss Library

Presentation Type

Poster

Start Date

3-3-2017 12:30 PM

End Date

3-3-2017 1:45 PM

Abstract

Developers often conduct copy-and-paste activities, which 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. However demonstrated by recent research, it is often difficult for developers 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 clone instances. To address such problem, we present a technique for managing clone refactorings, Pattern-based clone Refactoring Inspection (PRI), using refactoring pattern templates. By matching the refactoring pattern templates, it summarizes refactoring changes of clones, and detects clone instances not consistently factored out as refactoring anomalies. PRI also provides novel visualization user interfaces designed for inspecting clone refactoring edits and anomalies. 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 can help developers effectively inspect evolving clones and correctly apply refactorings to clone groups.

Files over 3MB may be slow to open. For best results, right-click and select "save as..."

COinS
 
Mar 3rd, 12:30 PM Mar 3rd, 1:45 PM

Tool Support for Managing Clone Refactorings to Facilitate Code Review in Evolving Software

Dr. C.C. and Mabel L. Criss Library

Developers often conduct copy-and-paste activities, which 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. However demonstrated by recent research, it is often difficult for developers 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 clone instances. To address such problem, we present a technique for managing clone refactorings, Pattern-based clone Refactoring Inspection (PRI), using refactoring pattern templates. By matching the refactoring pattern templates, it summarizes refactoring changes of clones, and detects clone instances not consistently factored out as refactoring anomalies. PRI also provides novel visualization user interfaces designed for inspecting clone refactoring edits and anomalies. 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 can help developers effectively inspect evolving clones and correctly apply refactorings to clone groups.