An empirical study on clone stability

An empirical study on clone stability
复制标题

克隆稳定性的实证研究

DOI:
10.1145/2387358.2387360
复制
发表时间:
2012
期刊:
ACM Sigapp Applied Computing Review
影响因子:
--
通讯作者:
Kevin A. Schneider
Kevin A. Schneider
中科院分区:
--
文献类型:
--
作者:
Manishankar Mondal;C. Roy;Kevin A. Schneider

文献摘要

被引文献

相似文献

代码克隆是一种有争议的软件工程实践,因为关于它对软件维护的影响的说法相互矛盾。代码稳定性是最近引入的一种测量技术,已用于通过量化代码区域的可变性来确定代码克隆的影响。虽然大多数现有的稳定性分析研究都同意克隆代码比非克隆代码更稳定,但这些研究有两个主要缺陷:(I)每个研究只考虑单一的稳定性测量(例如,代码更改的行数、更改的频率、更改的年龄);以及(Ii)只分析了少量的主题系统,并且这些系统的种类有限。 本文使用四种不同的稳定性度量方法对代码稳定性进行了全面的实证研究。我们使用最新推出的混合克隆检测工具NiCad来检测克隆,并从不同的维度分析它们的稳定性:按克隆类型、按测量方法、按编程语言、按系统规模和年龄。考虑到三种类型的克隆,我们对用三种编程语言编写的12个不同的主题系统进行了深入的调查,发现:(I)克隆代码通常不如非克隆代码稳定,更具体地说,类型1和类型2克隆都表现出比类型3克隆更高的不稳定性;(Ii)与C#系统中的克隆相比,Java和C系统中的克隆表现出更高的不稳定性;(Iii)系统的开发策略可能在定义其相对代码稳定性场景中发挥关键作用;以及,(Iv)主题系统的克隆和非克隆区域不遵循任何一致的变化模式。
Code cloning is a controversial software engineering practice due to contradictory claims regarding its effect on software maintenance. Code stability is a recently introduced measurement technique that has been used to determine the impact of code cloning by quantifying the changeability of a code region. Although most existing stability analysis studies agree that cloned code is more stable than non-cloned code, the studies have two major flaws: (i) each study only considered a single stability measurement (e.g., lines of code changed, frequency of change, age of change); and, (ii) only a small number of subject systems were analyzed and these were of limited variety. In this paper, we present a comprehensive empirical study on code stability using four different stability measuring methods. We use a recently introduced hybrid clone detection tool, NiCAD, to detect the clones and analyze their stability in different dimensions: by clone type, by measuring method, by programming language, and by system size and age. Our in-depth investigation on 12 diverse subject systems written in three programming languages considering three types of clones reveals that: (i) cloned code is generally less stable than non-cloned code, and more specifically both Type-1 and Type-2 clones show higher instability than Type-3 clones; (ii) clones in both Java and C systems exhibit higher instability compared to the clones in C# systems; (iii) a system's development strategy might play a key role in defining its comparative code stability scenario; and, (iv) cloned and non-cloned regions of a subject system do not follow any consistent change pattern.