引用本文:申宗汶,牛菲菲,李传艺,陈翔,李奇,葛季栋,骆斌.融合信息检索和深度模型特征的软件缺陷定位方法.软件学报,2024,35(7):3245-3264
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 2032次   下载 5361 本文二维码信息
码上扫一扫!
分享到: 微信 更多
融合信息检索和深度模型特征的软件缺陷定位方法
申宗汶1, 牛菲菲1, 李传艺1, 陈翔2, 李奇1, 葛季栋1, 骆斌1
1.计算机软件新技术国家重点实验室(南京大学), 江苏 南京 210023;2.南通大学 信息科学技术学院, 江苏 南通 226019
摘要:
构建自动化的缺陷定位方法能够加快程序员利用缺陷报告定位到复杂软件系统缺陷代码的过程. 早期相关研究人员将缺陷定位视为检索任务, 通过分析缺陷报告和相关代码构造缺陷特征, 并结合信息检索的方法实现缺陷定位. 随着深度学习的发展, 利用深度模型特征的缺陷定位方法也取得了一定效果. 然而, 由于深度模型训练的时间成本和耗费资源相对较高, 现有基于深度模型的缺陷定位研究方法存在实验搜索空间和真实情况不符的情况. 这些研究方法在测试时并没有将项目下的所有代码作为搜索空间, 而仅仅搜索了与已有缺陷相关的代码, 例如DNNLOC方法、DeepLocator方法、DreamLoc方法. 这种做法和现实中程序员进行缺陷定位的搜索场景是不一致的. 致力于模拟缺陷定位的真实场景, 提出了一种融合信息检索和深度模型特征的TosLoc方法进行缺陷定位. TosLoc方法首先通过信息检索的方式检索真实项目的所有源代码, 确保已有特征的充分利用; 再利用深度模型挖掘源代码和缺陷报告的语义, 获取最终定位结果. 通过两阶段的检索, TosLoc方法能够对单个项目的所有代码实现快速缺陷定位. 通过在4个常用的真实Java项目上进行实验, TosLoc方法能够在检索速度和准确性上超越已有基准方法. 与最优基准方法DreamLoc相比, TosLoc方法在消耗DreamLoc方法35%的检索时间下, 平均MRR值比DreamLoc方法提高了2.5%, 平均MAP值提高了6.0%.
关键词:  缺陷定位  缺陷报告  信息检索  深度学习  检索空间
DOI:10.13328/j.cnki.jos.007111
分类号:
基金项目:国家重点研发计划(2022YFF0711404);江苏省第六期“333工程”领军型人才团队项目;江苏省自然科学基金(BK20201250)
Software Bug Location Method Combining Information Retrieval and Deep Model Features
SHEN Zong-Wen1, NIU Fei-Fei1, LI Chuan-Yi1, CHEN Xiang2, LI Qi1, GE Ji-Dong1, LUO Bin1
1.National Key Laboratory for Novel Software Technology (Nanjing University), Nanjing 210023, China;2.School of Information Science and Technology, Nantong University, Nantong 226019, China
Abstract:
Automated bug localization methods can accelerate the process of programmers locating complex software system defects using bug reports. Early researchers treated bug localization as a retrieval task, constructing defect features by analyzing bug reports and related code, and applying information retrieval techniques for bug localization. With the development of deep learning, bug localization methods utilizing deep model features have also achieved certain effectiveness. Nevertheless, existing deep learning-based bug localization research methods suffer from experimental search space mismatching real-world scenarios due to the high time and resource costs of deep model training. These research methods do not consider all the files in the project as the search space during testing; they only search for code related to marked defects, such as the DNNLOC method, DreamLoc method, and DeepLocator method. This approach is inconsistent with the actual search scenario for programmers to localize real bug. In order to simulate the real-world scenario of bug localization, this study proposes the TosLoc method, which combines information retrieval and deep model features for bug localization. Firstly, information retrieval is employed to retrieve all source codes of real projects to ensure comprehensive utilization of existing features. Subsequently, deep models are utilized to extract semantics from source codes and bug reports. The TosLoc method achieves rapid localization of all code in a single project through two-stage retrieval. Experimental results conducted on four popular Java projects demonstrate that the proposed TosLoc method outperforms existing benchmark methods in terms of retrieval speed and accuracy. Compared to the best method called DreamLoc, the TosLoc method achieves an average MRR improvement of 2.5% and an average MAP improvement of 6.0% while only requiring 35% of the retrieval time of the DreamLoc method.
Key words:  bug location  bug report  informational retrieval  deep learning  search space

引用本文:
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览次   下载  
分享到: 微信 更多
摘要:
关键词:  
DOI:
分类号:
基金项目:
Abstract:
Key words: