摘要
提出一种空指针异常自动定位方法。该方法首先结合程序的静态分析技术,利用程序运行时的堆栈信息指导程序切片,然后对得到的切片进行空指针分析及别名分析,得出引发空指针异常的可疑语句集合,最终给出错误定位报告。实验结果表明,所提方法虽然因收集堆栈信息和别名分析增加了时间开销,但是利用堆栈信息可以缩小问题搜索空间,别名分析可以发现隐含的值传递过程,从而克服单独使用静态方法分析结果引起误报和漏报的缺陷,使最终的错误定位结果更精确。
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.
出处
《通信学报》
EI
CSCD
北大核心
2015年第1期18-29,共12页
Journal on Communications
基金
国家自然科学基金资助项目(60970032
61202006)
江苏省"333"基金资助项目
中央高校基本科研业务费专项基金资助项目(2013QNB17)
江苏省高校自然科学研究基金资助项目(12KJB520014)
江苏省研究生培养创新工程基金资助项目(CXZZ12-0935)
南京大学计算机软件新技术国家重点实验(KFKT2014B19)~~
关键词
自动故障定位
空指针异常
实时堆栈
程序切片
别名分析
automatic fault localization
null pointer exception
runtime stack
program slicing
alias analysis