一种基于关联分析与N-Gram的错误参数检测方法
作者:
作者单位:

作者简介:

李超(1992-),男,河南商丘人,硕士,主要研究领域为软件工程;刘辉(1978-),男,博士,教授,博士生导师,CCF高级会员,主要研究领域为软件工程.

通讯作者:

刘辉,E-mail:liuhui08@bit.edu.cn

中图分类号:

基金项目:

国家重点研发计划(2016YFB1000801);国家自然科学基金(61472034,61772071,61690205)


Association Analysis and N-Gram Based Detection of Incorrect Arguments
Author:
Affiliation:

Fund Project:

National Key Research and Development Program of China (2016YFB1000801); National Natural Science Foundation of China (61472034, 61772071, 61690205)

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

    为了检测软件系统中存在错误参数的函数调用,提出了一种基于关联分析和N-Gram语言模型的静态检测方法(ANiaD).基于海量开源代码,构建了关联分析模型以挖掘参数间存在的强关联规则.针对参数间存在强关联规则的函数调用构建N-Gram语言模型.基于训练过的N-Gram模型,计算给定函数调用语句正确的概率.低概率的函数调用被报告为异常函数调用.基于10个开源Java项目对该方法进行实验验证.实验结果表明,该方法检测的查准率约43.40%,显著高于现有的基于相似度的检测方法(查准率25%).

    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).

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

李超,刘辉.一种基于关联分析与N-Gram的错误参数检测方法.软件学报,2018,29(8):2243-2257

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

京公网安备 11040202500063号