首页 | 本学科首页   官方微博 | 高级检索  
     

基于贝叶斯网络的克隆代码有害性预测
引用本文:张丽萍,张瑞霞,王欢,闫盛.基于贝叶斯网络的克隆代码有害性预测[J].计算机应用,2016,36(1):260-265.
作者姓名:张丽萍  张瑞霞  王欢  闫盛
作者单位:内蒙古师范大学 计算机与信息工程学院, 呼和浩特 010022
基金项目:国家自然科学基金资助项目(61363017,61462071);内蒙古自然科学基金资助项目(2014MS0613)。
摘    要:在软件开发过程中,程序员的复制、粘贴活动会产生大量的克隆代码,而那些发生不一致变化的克隆代码往往对程序是有害的。为了解决该问题,有效地发现程序中的有害克隆代码,提出一种基于贝叶斯网络的克隆有害性预测方法。首先,结合软件缺陷研究领域与克隆演化领域的相关研究成果,提出了两大类表征克隆代码信息的特征,分别是静态特征和演化特征;其次,通过贝叶斯网络核心算法来构建克隆有害性预测模型;最后,预测有害克隆代码发生的可能性。在5款C语言开源软件共99个版本上对克隆有害性预测模型的性能进行评估,实验结果表明该方法能够有效地实现对克隆代码有害性的预测,降低有害克隆代码对软件的威胁,提高软件质量。

关 键 词:克隆代码    有害性预测    贝叶斯网络    克隆演化    机器学习
收稿时间:2015-07-07
修稿时间:2015-09-22

Harmfulness prediction of clone code based on Bayesian network
ZHANG Liping,ZHANG Ruixia,WANG Huan,YAN Sheng.Harmfulness prediction of clone code based on Bayesian network[J].journal of Computer Applications,2016,36(1):260-265.
Authors:ZHANG Liping  ZHANG Ruixia  WANG Huan  YAN Sheng
Affiliation:College of Computer and Information Engineering, Inner Mongolia Normal University, Hohhot Nei Mongol 010022, China
Abstract:During the process of software development, activities of programmers including copy and paste result in a lot of code clones. However, the inconsistent code changes are always harmful to the programs. To solve this problem, and find harmful code clones in programs effectively, a method was proposed to predict harmful code clones by using Bayesian network. First, referring to correlation research on software defects prediction and clone evolution, two software metrics including static metrics and evolution metrics were proposed to characterize the features of clone codes. Then the prediction model was constructed by using core algorithm of Bayesian network. Finally, the probability of harmful code clones occurrence was predicted. Five different types of open-source software system containing 99 versions written in C languages were tested to evaluate the prediction model. The experimental results show that the proposed method can predict harmfulness for clones with better applicability and higher accuracy, and further reduce the threat of harmful code clones while improving software quality.
Keywords:clone code                                                                                                                        harmfulness prediction                                                                                                                        Bayesian network                                                                                                                        clone evolution                                                                                                                        machine learning
本文献已被 万方数据 等数据库收录!
点击此处可从《计算机应用》浏览原始摘要信息
点击此处可从《计算机应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号