融合信息检索和深度模型特征的软件缺陷定位方法
作者:
作者单位:

作者简介:

申宗汶(2000—),男,硕士生,CCF学生会员,主要研究领域为软件缺陷定位;牛菲菲(1995—),女,博士,CCF学生会员,主要研究领域为缺陷定位,用户特征请求分析;李传艺(1991—),男,博士,准聘助理教授,博士生导师,CCF专业会员,主要研究领域为软件工程,业务过程管理,自然语言处理;陈翔(1980—),男,博士,副教授,CCF高级会员,主要研究领域为智能软件工程,软件仓库挖掘,经验软件工程;李奇(1998—),男,硕士生,主要研究领域为自然语言处理,智能软件工程;葛季栋(1978—),男,博士,副教授,博士生导师,CCF高级会员,主要研究领域为自然语言处理,智能软件工程,分布式计算,边缘计算,服务计算,业务过程管理;骆斌(1967—),男,博士,教授,博士生导师,CCF杰出会员,主要研究领域为分布式计算,边缘计算,自然语言处理,智能软件工程.

通讯作者:

葛季栋,E-mail:gjd@nju.edu.cn

中图分类号:

TP311

基金项目:

国家重点研发计划(2022YFF0711404);江苏省第六期“333工程”领军型人才团队项目;江苏省自然科学基金(BK20201250)


Software Bug Location Method Combining Information Retrieval and Deep Model Features
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    构建自动化的缺陷定位方法能够加快程序员利用缺陷报告定位到复杂软件系统缺陷代码的过程. 早期相关研究人员将缺陷定位视为检索任务, 通过分析缺陷报告和相关代码构造缺陷特征, 并结合信息检索的方法实现缺陷定位. 随着深度学习的发展, 利用深度模型特征的缺陷定位方法也取得了一定效果. 然而, 由于深度模型训练的时间成本和耗费资源相对较高, 现有基于深度模型的缺陷定位研究方法存在实验搜索空间和真实情况不符的情况. 这些研究方法在测试时并没有将项目下的所有代码作为搜索空间, 而仅仅搜索了与已有缺陷相关的代码, 例如DNNLOC方法、DeepLocator方法、DreamLoc方法. 这种做法和现实中程序员进行缺陷定位的搜索场景是不一致的. 致力于模拟缺陷定位的真实场景, 提出了一种融合信息检索和深度模型特征的TosLoc方法进行缺陷定位. TosLoc方法首先通过信息检索的方式检索真实项目的所有源代码, 确保已有特征的充分利用; 再利用深度模型挖掘源代码和缺陷报告的语义, 获取最终定位结果. 通过两阶段的检索, TosLoc方法能够对单个项目的所有代码实现快速缺陷定位. 通过在4个常用的真实Java项目上进行实验, TosLoc方法能够在检索速度和准确性上超越已有基准方法. 与最优基准方法DreamLoc相比, TosLoc方法在消耗DreamLoc方法35%的检索时间下, 平均MRR值比DreamLoc方法提高了2.5%, 平均MAP值提高了6.0%.

    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.

    参考文献
    相似文献
    引证文献
引用本文

申宗汶,牛菲菲,李传艺,陈翔,李奇,葛季栋,骆斌.融合信息检索和深度模型特征的软件缺陷定位方法.软件学报,2024,35(7):3245-3264

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2023-09-11
  • 最后修改日期:2023-10-30
  • 录用日期:
  • 在线发布日期: 2024-01-05
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号