引用本文:李晓卓,卿笃军,贺也平,马恒太.基于源代码扩展信息的细粒度缺陷定位方法.软件学报,2022,33(11):4008-4026
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 2553次   下载 5053 本文二维码信息
码上扫一扫!
分享到: 微信 更多
基于源代码扩展信息的细粒度缺陷定位方法
李晓卓1,2, 卿笃军1,2, 贺也平1,2,3, 马恒太1,2
1.基础软件国家工程研究中心(中国科学院 软件研究所), 北京 100190;2.中国科学院大学, 北京 100049;3.计算机科学国家重点实验室(中国科学院 软件研究所), 北京 100190
摘要:
基于信息检索的缺陷定位技术,利用跨语言的语义相似性构造检索模型,通过缺陷报告定位源代码错误,具有方法直观、通用性强的特点.但是由于传统基于信息检索的缺陷定位方法将代码作为纯文本进行处理,只利用了源代码的词汇语义信息,导致在细粒度缺陷定位中面临候选代码语义匮乏产生的准确性低的问题,其结果有用性还有待改进.通过分析程序演化场景下代码改动与缺陷产生间的关系,提出一种基于源代码扩展信息的细粒度缺陷定位方法,以代码词汇语义显性信息及代码执行隐性信息共同丰富源代码语义实现细粒度缺陷定位.利用定位候选点的语义相关上下文丰富代码量,以代码执行中间形式的结构语义实现细粒度代码的可区分,同时以自然语言语义指导基于注意力机制的代码语言表征生成,实现细粒度代码与自然语言间的语义映射,从而实现细粒度缺陷定位方法FlowLocator.实验分析结果表明:与经典的IR缺陷定位方法相比,该方法定位准确性在Top-N排名、平均准确率及平均倒数排名上都有显著提高.
关键词:  缺陷定位  演化程序  信息检索  语义信息  伪孪生网络
DOI:10.13328/j.cnki.jos.006339
分类号:TP311
基金项目:核高基国家科技重大专项(2014ZX01029101);中国科学院战略性先导科技专项(XDA-Y01-01)
Fine-grained Bug Location Method Based on Source Code Extension Information
LI Xiao-Zhuo1,2, QING Du-Jun1,2, HE Ye-Ping1,2,3, MA Heng-Tai1,2
1.National Engineering Research Center of Fundamental Software (Institute of Software, Chinese Academy of Sciences), Beijing 100190, China;2.University of Chinese Academy of Sciences, Beijing 100049, China;3.State Key Laboratory of Computer Science (Institute of Software, Chinese Academy of Sciences), Beijing 100190, China
Abstract:
Bug location based on information retrieval (IR) uses cross language semantic similarity to construct a retrieval model to locate source code errors through bug report. However, the traditional method of bug location based on IR treats the code as pure text and only uses the lexical semantic information of source code, which leads to the problem of low accuracy caused by the lack of candidate code semantics in fine-grained bug location, and the usefulness of the results needs to be improved. By analyzing the relationship between code change and bug generation in the scenario of program evolution, this study proposes a fine-grained bug location method based on source code extension information, the explicit semantic information of code vocabulary and implicit information of code execution are used to enrich source code semantics to realize fine-grained bug location. Based on the location candidate points, the semantic context is used to enrich the code quantity, and the structural semantics of code execution intermediate language is used to realize fine-grained code distinguishability. Meanwhile, natural language semantics is used to guide the generation of code language representation based on attention mechanism, the semantic mapping between fine-grained code and natural language is implemented to implement fine-grained bug location method FlowLocator. The experimental results show that compared with the classical IR bug location method, the location accuracy of this method is significantly improved in the Top-N rank, mean average precision (MAP) and mean reciprocal rank (MRR).
Key words:  bug location  evolution program  information retrieval  semantic information  pseudo-siamese network

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