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

面向细粒度源代码变更的缺陷预测方法
引用本文:原子,于莉莉,刘超.面向细粒度源代码变更的缺陷预测方法[J].软件学报,2014,25(11):2499-2517.
作者姓名:原子  于莉莉  刘超
作者单位:1. 北京航空航天大学计算机学院,北京,100191
2. 北京航空航天大学计算机学院,北京 100191; 第二炮兵软件测评中心,北京 100191
基金项目:国家自然科学基金(90718018);国家高技术研究发展计划(863)(2007AA010302)
摘    要:软件在其生命周期中不断地发生变更,以适应需求和环境的变化。为了及时预测每次变更是否引入了缺陷,研究者们提出了面向软件源代码变更的缺陷预测方法。然而现有方法存在以下3点不足:(1)仅实现了较粗粒度(事务级和源文件级变更)的预测;(2)仅采用向量空间模型表征变更,没有充分挖掘蕴藏在软件库中的程序结构、自然语言语义以及历史等信息;(3)仅探讨较短时间范围内的预测,未考虑在长时间软件演化过程中由于新需求或人员重组等外界因素所带来的概念漂移问题。针对现有的不足,提出一种面向源代码变更的缺陷预测方法。该方法将细粒度(语句级)变更作为预测对象,从而有效降低了质量保证成本;采用程序静态分析和自然语言语义主题推断相结合的技术深入挖掘软件库,从变更的上下文、内容、时间以及人员4个方面构建特征集,从而揭示了变更易于引入缺陷的因素;采用特征熵差值矩阵分析了软件演化过程中概念漂移问题的特点,并通过一种伴随概念回顾的动态窗口学习机制实现了长时间的稳定预测。通过6个著名开源软件验证了该方法的有效性。

关 键 词:缺陷预测  软件演化  细粒度变更  概念漂移  成本有效性
收稿时间:2013/10/28 0:00:00
修稿时间:2013/12/26 0:00:00

Bug Prediction Method for Fine-Grained Source Code Changes
YUAN Zi,YU Li-Li and LIU Chao.Bug Prediction Method for Fine-Grained Source Code Changes[J].Journal of Software,2014,25(11):2499-2517.
Authors:YUAN Zi  YU Li-Li and LIU Chao
Affiliation:School of Computer Science and Engineering, BeiHang University, Beijing 100191, China;School of Computer Science and Engineering, BeiHang University, Beijing 100191, China;Software Testing Center, Second Artillery, Beijing 100191, China;School of Computer Science and Engineering, BeiHang University, Beijing 100191, China
Abstract:Software changes constantly in its lifecycle to adapt to the changing requirements and environments. In order to predict whether each change will introduce any bugs timely, various bug prediction methods for software source code changes have been proposed by researchers. However, there are three deficiencies in existing methods: 1) The prediction granularities are limited at the coarse-grained levels (i.e. transaction or file levels); 2) As vector space model is used to represent software changes, abundant information in software repositories, such as program structure, natural language semantic and history information, can not be mined sufficiently; 3) Only short-time prediction is explored without considering the concept drift caused by new requirements, team restructuring or other external factors during the long time software evolution process. In order to overcome the shortcomings of existing methods, a bug prediction method for source code changes is proposed. It makes prediction for fine-grained (i.e. statement level) changes, which reduces the quality assurance cost effectively. By in-depth mining software repositories with static program analysis and natural language semantic inference technologies, feature sets of changes are constructed in four aspects (i.e. context, content, time, and developer) and key factors that lead to bug injection are revealed. Characteristics of concept drift in software evolution process are analyzed by using matrix of feature entropy difference, and an algorithm of adaptive window with concept reviewing is proposed to achieve stability of long-time prediction. Experiments on six famous open source projects demonstrate effectiveness of the proposed method.
Keywords:bug prediction  software evolution  fine-grained change  concept drift  cost effectiveness
本文献已被 CNKI 万方数据 等数据库收录!
点击此处可从《软件学报》浏览原始摘要信息
点击此处可从《软件学报》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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