DocumentCode
647201
Title
Distilling useful clones by contextual differencing
Author
Zhenchang Xing ; Yinxing Xue ; Jarzabek, Stan
Author_Institution
Nanyang Technol. Univ., Singapore, Singapore
fYear
2013
fDate
14-17 Oct. 2013
Firstpage
102
Lastpage
111
Abstract
Clone detectors find similar code fragments and report large numbers of them for large systems. Textually similar clones may perform different computations, depending on the program context in which clones occur. Understanding these contextual differences is essential to distill useful clones for a specific maintenance task, such as refactoring. Manual analysis of contextual differences is time consuming and error-prone. To mitigate this problem, we present an automated approach to helping developers find and analyze contextual differences of clones. Our approach represents context of clones as program dependence graphs, and applies a graph differencing technique to identify required contextual differences of clones. We implemented a tool called CloneDifferentiator that identifies contextual differences of clones and allows developers to formulate queries to distill candidate clones that are useful for a given refactoring task. Two empirical studies show that CloneDifferentiator can reduce the efforts of post-detection analysis of clones for refactorings.
Keywords
program diagnostics; software maintenance; CloneDifferentiator tool; clone detectors; clones distillation; code fragments; contextual differencing; graph differencing technique; maintenance task; program context; program dependence graphs; refactoring task; Arrays; Cloning; Context; Detectors; Java; Libraries; Syntactics; Clone analysis; graph matching; program dependence graph;
fLanguage
English
Publisher
ieee
Conference_Titel
Reverse Engineering (WCRE), 2013 20th Working Conference on
Conference_Location
Koblenz
Type
conf
DOI
10.1109/WCRE.2013.6671285
Filename
6671285
Link To Document