Detecting differences across multiple instances of code clones

Clone detectors find similar code fragments (i.e., instances of code clones) and report large numbers of them for industrial systems. To maintain or manage code clones, developers often have to investigate differences of multiple cloned code fragments. However,existing program differencing technique...

Full description

Saved in:
Bibliographic Details
Main Authors: LIN, Yun, XING, Zhenchang, XUE, Yinxing, LIU, Yang, PENG, Xin, SUN, Jun, ZHAO, Wenyun
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2014
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/4989
https://ink.library.smu.edu.sg/context/sis_research/article/5992/viewcontent/2568225.2568298.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-5992
record_format dspace
spelling sg-smu-ink.sis_research-59922020-03-12T09:43:42Z Detecting differences across multiple instances of code clones LIN, Yun XING, Zhenchang XUE, Yinxing LIU, Yang PENG, Xin SUN, Jun ZHAO, Wenyun Clone detectors find similar code fragments (i.e., instances of code clones) and report large numbers of them for industrial systems. To maintain or manage code clones, developers often have to investigate differences of multiple cloned code fragments. However,existing program differencing techniques compare only two code fragments at a time. Developers then have to manually combine several pairwise differencing results. In this paper, we present an approach to automatically detecting differences across multiple clone instances. We have implemented our approach as an Eclipse plugin and evaluated its accuracy with three Java software systems. Our evaluation shows that our algorithm has precision over 97.66% and recall over 95.63% in three open source Java projects. We also conducted a user study of 18 developers to evaluate the usefulness of our approach for eight clone-related refactoring tasks. Our study shows that our approach can significantly improve developers’performance in refactoring decisions, refactoring details, and task completion time on clone-related refactoring tasks. Automatically detecting differences across multiple clone instances also opens opportunities for building practical applications of code clones in software maintenance, such as auto-generation of application skeleton, intelligent simultaneous code editing. 2014-07-06T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/4989 info:doi/10.1145/2568225.2568298 https://ink.library.smu.edu.sg/context/sis_research/article/5992/viewcontent/2568225.2568298.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Code clone Program differencing Human study Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Code clone
Program differencing
Human study
Software Engineering
spellingShingle Code clone
Program differencing
Human study
Software Engineering
LIN, Yun
XING, Zhenchang
XUE, Yinxing
LIU, Yang
PENG, Xin
SUN, Jun
ZHAO, Wenyun
Detecting differences across multiple instances of code clones
description Clone detectors find similar code fragments (i.e., instances of code clones) and report large numbers of them for industrial systems. To maintain or manage code clones, developers often have to investigate differences of multiple cloned code fragments. However,existing program differencing techniques compare only two code fragments at a time. Developers then have to manually combine several pairwise differencing results. In this paper, we present an approach to automatically detecting differences across multiple clone instances. We have implemented our approach as an Eclipse plugin and evaluated its accuracy with three Java software systems. Our evaluation shows that our algorithm has precision over 97.66% and recall over 95.63% in three open source Java projects. We also conducted a user study of 18 developers to evaluate the usefulness of our approach for eight clone-related refactoring tasks. Our study shows that our approach can significantly improve developers’performance in refactoring decisions, refactoring details, and task completion time on clone-related refactoring tasks. Automatically detecting differences across multiple clone instances also opens opportunities for building practical applications of code clones in software maintenance, such as auto-generation of application skeleton, intelligent simultaneous code editing.
format text
author LIN, Yun
XING, Zhenchang
XUE, Yinxing
LIU, Yang
PENG, Xin
SUN, Jun
ZHAO, Wenyun
author_facet LIN, Yun
XING, Zhenchang
XUE, Yinxing
LIU, Yang
PENG, Xin
SUN, Jun
ZHAO, Wenyun
author_sort LIN, Yun
title Detecting differences across multiple instances of code clones
title_short Detecting differences across multiple instances of code clones
title_full Detecting differences across multiple instances of code clones
title_fullStr Detecting differences across multiple instances of code clones
title_full_unstemmed Detecting differences across multiple instances of code clones
title_sort detecting differences across multiple instances of code clones
publisher Institutional Knowledge at Singapore Management University
publishDate 2014
url https://ink.library.smu.edu.sg/sis_research/4989
https://ink.library.smu.edu.sg/context/sis_research/article/5992/viewcontent/2568225.2568298.pdf
_version_ 1770575185582227456