首页 | 官方网站   微博 | 高级检索  
     

基于重子节点抽象语法树的软件缺陷预测
引用本文:黄晓伟,范贵生,虞慧群,杨星光.基于重子节点抽象语法树的软件缺陷预测[J].计算机工程,2021,47(12):230-235,248.
作者姓名:黄晓伟  范贵生  虞慧群  杨星光
作者单位:华东理工大学 计算机科学与工程系,上海 200237;上海市计算机软件测评重点实验室,上海 201112;华东理工大学 计算机科学与工程系,上海 200237
基金项目:国家自然科学基金(61702334,61772200);上海市浦江人才计划(17PJ1401900);上海市自然科学基金(17ZR1406900,17ZR1429700);华东理工大学教育科研基金(ZH1726108)。
摘    要:在实际软件项目开发过程中,软件缺陷预测能辅助测试人员找到项目中可能存在缺陷的位置,并通过抽象语法树(AST)获取项目模块中隐藏的结构和语义信息,此类信息有助于提高缺陷预测精度。提出基于重子节点抽象语法树的缺陷预测方法,在提取节点信息时保留节点的类型信息和对应代码语义的值信息,并使用特殊字符串代替没有值信息的节点。通过树链剖分思想将AST分割为重子节点和轻子节点,优先选择重子节点作为序列化向量中的节点,同时利用深度学习网络学习节点序列中的源代码结构和语言实现软件缺陷预测。实验结果表明,与DFS方法相比,该方法在基于注意力机制的循环神经网络深度学习模型上的F1值和AUC值平均提升约3%和4%,具有更好的缺陷预测效果。

关 键 词:软件质量保障  软件缺陷预测  代码表征  抽象语法树  深度学习
收稿时间:2020-12-24
修稿时间:2021-01-29

Software Defect Prediction via Heavy Son Node-based Abstract Syntax Tree
HUANG Xiaowei,FAN Guisheng,YU Huiqun,YANG Xingguang.Software Defect Prediction via Heavy Son Node-based Abstract Syntax Tree[J].Computer Engineering,2021,47(12):230-235,248.
Authors:HUANG Xiaowei  FAN Guisheng  YU Huiqun  YANG Xingguang
Affiliation:1. Department of Computer Science and Engineering, East China University of Science and Technology, Shanghai 200237, China;2. Key Laboratory of Computer Software Testing and Evaluating, Shanghai 201112, China
Abstract:In the actual software project development, software defect prediction can assist testers to find possible defects in the project.Through the Abstract Syntax Tree(AST), the hidden structure and semantic information in the project module can be obtained, which helps to improve the accuracy of defect prediction.This paper proposes a defect prediction method using Heavy Son(HS) node-based abstract syntax tree.In node information extraction, the type information of the node and the value information of the corresponding code semantics are retained, and the nodes without value information are replaced with a special string.Then by using the idea of tree chain division, the AST is divided into HS nodes and Light Son(LS) nodes.The HS nodes are selected in preference as the nodes in serialized vectors.At the same time, the deep learning network is used to learn the source code structure and language in the node sequence to realize software defect prediction.Experimental results show that compared with the DFS method, the proposed method improves the F1-measure by 3% and the AUC value by 4%, has a better defect prediction effect.
Keywords:software quality assurance  software defect prediction  code representation  Abstract Syntax Tree(AST)  deep learning  
本文献已被 万方数据 等数据库收录!
点击此处可从《计算机工程》浏览原始摘要信息
点击此处可从《计算机工程》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号