引用本文:李超,刘辉.一种基于关联分析与N-Gram的错误参数检测方法.软件学报,2018,29(8):2243-2257
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 4393次   下载 8086 本文二维码信息
码上扫一扫!
分享到: 微信 更多
一种基于关联分析与N-Gram的错误参数检测方法
李超, 刘辉
北京理工大学 计算机学院, 北京 100081
摘要:
为了检测软件系统中存在错误参数的函数调用,提出了一种基于关联分析和N-Gram语言模型的静态检测方法(ANiaD).基于海量开源代码,构建了关联分析模型以挖掘参数间存在的强关联规则.针对参数间存在强关联规则的函数调用构建N-Gram语言模型.基于训练过的N-Gram模型,计算给定函数调用语句正确的概率.低概率的函数调用被报告为异常函数调用.基于10个开源Java项目对该方法进行实验验证.实验结果表明,该方法检测的查准率约43.40%,显著高于现有的基于相似度的检测方法(查准率25%).
关键词:  参数  异常检测  缺陷  语言模型  关联分析
DOI:10.13328/j.cnki.jos.005531
分类号:
基金项目:国家重点研发计划(2016YFB1000801);国家自然科学基金(61472034,61772071,61690205)
Association Analysis and N-Gram Based Detection of Incorrect Arguments
LI Chao, LIU Hui
School of Computer Science and Technology, Beijing Institute of Technolog, Beijing 100081, China
Abstract:
To detect the method calls with incorrect arguments in software systems, an association analysis and N-Gram based static anomaly detection approach (ANiaD) is proposed. Based on the massive open source code, an association analysis model is constructed to mine the strong association rules between arguments. An N-Gram model is constructed for method calls with strong association rules between arguments. Using the trained N-Gram model, the probability of a given method call statement is calculated. Low probability method calls are reported as potential bugs. The proposed approach is evaluated based on 10 open-source Java projects. The results show that the accuracy of the proposed approach is about 43.40%, significantly greater than that of similarity-based approach (25% accuracy).
Key words:  argument  anomaly detection  bug  language model  association analysis

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