Distilling useful clones by contextual differencing

Zhenchang Xing, Yinxing Xue, Stan Jarzabek

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

3 Citations (Scopus)

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.

Original languageEnglish
Title of host publicationProceedings - 20th Working Conference on Reverse Engineering, WCRE 2013
Pages102-111
Number of pages10
DOIs
Publication statusPublished - 2013
Externally publishedYes
Event20th Working Conference on Reverse Engineering, WCRE 2013 - Koblenz, Germany
Duration: 14 Oct 201317 Oct 2013

Publication series

NameProceedings - Working Conference on Reverse Engineering, WCRE
ISSN (Print)1095-1350

Conference

Conference20th Working Conference on Reverse Engineering, WCRE 2013
Country/TerritoryGermany
CityKoblenz
Period14/10/1317/10/13

Fingerprint

Dive into the research topics of 'Distilling useful clones by contextual differencing'. Together they form a unique fingerprint.

Cite this