CORC  > 北京大学  > 信息科学技术学院
Predicting Consistency-Maintenance Requirement of Code Clones at Copy-and-Paste Time
Wang, Xiaoyin ; Dang, Yingnong ; Zhang, Lu ; Zhang, Dongmei ; Lan, Erica ; Mei, Hong
刊名ieee transactions on software engineering
2014
关键词Code cloning consistency maintenance programming aid EVOLVING SOFTWARE DETECTION TOOLS MANAGEMENT SYSTEM
DOI10.1109/TSE.2014.2323972
英文摘要Code clones have always been a double edged sword in software development. On one hand, it is a very convenient way to reuse existing code, and to save coding effort. On the other hand, since developers may need to ensure consistency among cloned code segments, code clones can lead to extra maintenance effort and even bugs. Recently studies on the evolution of code clones show that only some of the code clones experience consistent changes during their evolution history. Therefore, if we can accurately predict whether a code clone will experience consistent changes, we will be able to provide useful recommendations to developers on leveraging the convenience of some code cloning operations, while avoiding other code cloning operations to reduce future consistency maintenance effort. In this paper, we define a code cloning operation as consistency-maintenance-required if its generated code clones experience consistent changes in the software evolution history, and we propose a novel approach that automatically predicts whether a code cloning operation requires consistency maintenance at the time point of performing copy-and-paste operations. Our insight is that whether a code cloning operation requires consistency maintenance may relate to the characteristics of the code to be cloned and the characteristics of its context. Based on a number of attributes extracted from the cloned code and the context of the code cloning operation, we use Bayesian Networks, a machine-learning technique, to predict whether an intended code cloning operation requires consistency maintenance. We evaluated our approach on four subjects-two large-scale Microsoft software projects, and two popular open-source software projects-under two usage scenarios: 1) recommend developers to perform only the cloning operations predicted to be very likely to be consistency-maintenance-free, and 2) recommend developers to perform all cloning operations unless they are predicted very likely to be consistency-maintenance-required. In the first scenario, our approach is able to recommend developers to perform more than 50 percent cloning operations with a precision of at least 94 percent in the four subjects. In the second scenario, our approach is able to avoid 37 to 72 percent consistency-maintenance-required code clones by warning developers on only 13 to 40 percent code clones, in the four subjects.; http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000343898400003&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=8e1609b174ce4e31116a60747a720701 ; Computer Science, Software Engineering; Engineering, Electrical & Electronic; SCI(E); EI; 0; ARTICLE; Xiaoyin.Wang@utsa.edu; Dang.Yingnong@microsoft.com; zhanglu@sei.pku.edu.cn; Zhang.Dongmei@microsoft.com; erical@microsoft.com; meih@sei.pku.edu.cn; 8; 773-794; 40
语种英语
内容类型期刊论文
源URL[http://ir.pku.edu.cn/handle/20.500.11897/210022]  
专题信息科学技术学院
推荐引用方式
GB/T 7714
Wang, Xiaoyin,Dang, Yingnong,Zhang, Lu,et al. Predicting Consistency-Maintenance Requirement of Code Clones at Copy-and-Paste Time[J]. ieee transactions on software engineering,2014.
APA Wang, Xiaoyin,Dang, Yingnong,Zhang, Lu,Zhang, Dongmei,Lan, Erica,&Mei, Hong.(2014).Predicting Consistency-Maintenance Requirement of Code Clones at Copy-and-Paste Time.ieee transactions on software engineering.
MLA Wang, Xiaoyin,et al."Predicting Consistency-Maintenance Requirement of Code Clones at Copy-and-Paste Time".ieee transactions on software engineering (2014).
个性服务
查看访问统计
相关权益政策
暂无数据
收藏/分享
所有评论 (0)
暂无评论
 

除非特别说明,本系统中所有内容都受版权保护,并保留所有权利。


©版权所有 ©2017 CSpace - Powered by CSpace