通信学报 ›› 2015, Vol. 36 ›› Issue (1): 18-29.doi: 10.11959/j.issn.1000-436x.2015003

• 学术论文 • 上一篇    下一篇

空指针异常的自动故障定位方法

姜淑娟1,王兴亚1,张艳梅1,李威1,鞠小林1,2,刘颖祺1   

  1. 1 中国矿业大学 计算机科学与技术学院,江苏 徐州 221116
    2 南通大学 计算机科学与技术学院,江苏 南通 226019
  • 出版日期:2015-01-25 发布日期:2017-06-21
  • 基金资助:
    国家自然科学基金资助项目;国家自然科学基金资助项目;江苏省“333”基金资助项目;中央高校基本科研业务费专项基金资助项目;江苏省高校自然科学研究基金资助项目;江苏省研究生培养创新工程基金资助项目;南京大学计算机软件新技术国家重点实验

Fault localization approach for null pointer exception

Shu-juan JIANG1,Xing-ya WANG1,Yan-mei ZHANG1,Wei LI1,Xiao-lin JU1,2,IUYing-qi L1   

  1. 1 School of Computer Science and Technology, China University of Mining and Technology, Xuzhou 221116, China
    2 School of Computer Science and Technology, Nantong University, Nantong 226019, China
  • Online:2015-01-25 Published:2017-06-21
  • Supported by:
    The National Natural Science Foundation of China;The National Natural Science Foundation of China;333 Project of Jiangsu Province; The Fundamental Research Funds for the Central Universities;The University Natural Science Research Projects of Jiangsu Province;The Graduate Training Innovative Projects Foundation of Jiangsu Province;State Key Laboratory for Movel Software Technology at Nanjing University

摘要:

提出一种空指针异常自动定位方法。该方法首先结合程序的静态分析技术,利用程序运行时的堆栈信息指导程序切片,然后对得到的切片进行空指针分析及别名分析,得出引发空指针异常的可疑语句集合,最终给出错误定位报告。实验结果表明,所提方法虽然因收集堆栈信息和别名分析增加了时间开销,但是利用堆栈信息可以缩小问题搜索空间,别名分析可以发现隐含的值传递过程,从而克服单独使用静态方法分析结果引起误报和漏报的缺陷,使最终的错误定位结果更精确。

关键词: 自动故障定位, 空指针异常, 实时堆栈, 程序切片, 别名分析

Abstract:

A novel approach to locate the fault for null pointer exception is presented.The approach first computes the static slice guided by the runtime stack,then conducts a null-pointer analysis and aliases analysis on the sliced program and obtains the suspicious statements that throw null-pointer exceptions,and finally generates a fault localization report.The experimental study indicates that,although time spent in runtime stack information collecting and aliases transferring,the proposed approach can narrow the searching space of the problem with runtime stack,and discover the value transfer process with aliases analysis,thereby eliminating false negative and false positive,and improving the effectiveness of fault localization.

Key words: automatic fault localization, null pointer exception, runtime stack, program slicing, alias analysis

No Suggested Reading articles found!