Prediction and ranking of co-change candidates for clones

Prediction and ranking of co-change candidates for clones
复制标题

克隆共变候选者的预测和排名

DOI:
--
复制
发表时间:
2014
期刊:
IEEE Working Conference on Mining Software Repositories
影响因子:
--
通讯作者:
Kevin A. Schneider
Kevin A. Schneider
中科院分区:
--
文献类型:
--
作者:
Manishankar Mondal;C. Roy;Kevin A. Schneider

文献摘要

被引文献

相似文献

代码克隆是相同的或相似的代码片段,该片段散布在代码库中。一组与彼此相似的代码片段形成了克隆组。特定群体中的克隆通常需要始终如一地将(即共同变换)更改。但是,组中的所有克隆可能不需要一致的更改,因为某些克隆片段可能会独立发展。因此,在更改特定的克隆片段的同时,对于程序员来说,重要的是要知道同一组中哪些其他克隆片段应始终如一地与该特定的克隆片段合作。 在这项研究工作中,我们从经验上研究了我们是否可以自动预测和对这些克隆组的其他克隆片段(即共同变换候选者)进行对,同时更改该组的特定克隆片段。对于预测和排名,我们通过挖掘过去的克隆进化史来自动检索克隆之间的进化耦合。考虑到精确和近乎缺陷的克隆,我们对用两种不同的编程语言(C和Java)编写的六个主题系统的实验结果意味着,我们可以通过分析进化耦合来自动预测和对克隆的共同变换。我们的排名机制可以帮助程序员在更改特定的克隆片段的同时指出可能的共同候选者,因此可以帮助我们更好地管理软件克隆。
Code clones are identical or similar code fragments scattered in a code-base. A group of code fragments that are similar to one another form a clone group. Clones in a particular group often need to be changed together (i.e., co-changed) consistently. However, all clones in a group might not require consistent changes, because some clone fragments might evolve independently. Thus, while changing a particular clone fragment, it is important for a programmer to know which other clone fragments in the same group should be consistently co-changed with that particular clone fragment. In this research work, we empirically investigate whether we can automatically predict and rank these other clone fragments (i.e., the co-change candidates) from a clone group while making changes to a particular clone fragment in this group. For prediction and ranking we automatically retrieve and infer evolutionary coupling among clones by mining the past clone evolution history. Our experimental result on six subject systems written in two different programming languages (C, and Java) considering both exact and near-miss clones implies that we can automatically predict and rank co-change candidates for clones by analyzing evolutionary coupling. Our ranking mechanism can help programmers pinpoint the likely co-change candidates while changing a particular clone fragment and thus, can help us to better manage software clones.