Mining Exception-Handling Rules as Sequence Association Rules

被引:72
作者
Thummalapenta, Suresh [1 ]
Xie, Tao [1 ]
机构
[1] N Carolina State Univ, Dept Comp Sci, Raleigh, NC 27695 USA
来源
2009 31ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS | 2009年
关键词
D O I
10.1109/ICSE.2009.5070548
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Programming languages such as Java and C++ provide exception-handling constructs to handle exception conditions. Applications are expected to handle these exception conditions and take necessary recovery actions such as releasing opened database connections. However exception-handling rules that describe these necessary recovery actions are often not available in practice. To address this issue, we develop a novel approach that mine's exception-handling rules as sequence association rules of the form "(FCc1 ... FCcn) boolean AND FCa double right arrow (FCe1 ... FCem)". This rule describes that function call FCa should be followed by a sequence of function calls (FCe1 ... FCem) when FCa is preceded by a sequence of function calls (FCc1 ... FCcn). Such form of rules is required to characterize common exception-handling rules. We show the usefulness of these mined rules by applying them on five real-world applications (including 285 KLOC) to detect violations in our evaluation. Our empirical results show that our approach mines 294 real exception-handling rides in these five applications and also detects 160 defects, where 87 defects are new defets that are not found by a previous related approach.
引用
收藏
页码:496 / 506
页数:11
相关论文
共 23 条
[1]  
ACHARYA M, 2009, P FASE
[2]  
Agrawal R., 1994, P 20 INT C VER LARG, V1215, P487, DOI DOI 10.5555/645920.672836
[3]  
Chang R.-Y., 2007, P 2007 INT S SOFTWAR, P163, DOI DOI 10.1145/1273463.1273486
[4]  
DeLine Robert., 2001, Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation, P59, DOI [10.1145/378795.378811, DOI 10.1145/378795.378811]
[5]  
Engler Dawson R., 2001, Proceedings of the 18th ACM Symposium on Operating Systems Principles, P57
[6]  
FU C, 2004, P ACM SIGSOFT INT S, P23
[7]  
Fu C, 2007, PROC INT CONF SOFTW, P230
[8]  
Gabel Mark., 2008, P 16 INT S FDN SOFTW, P339, DOI [10.1145/1453101.1453150, DOI 10.1145/1453101.1453150]
[9]  
*GOOGL, 2006, GOOGL COD SEARCH ENG
[10]   How software engineers use documentation: The state of the practice [J].
Lethbridge, TC ;
Singer, J ;
Forward, A .
IEEE SOFTWARE, 2003, 20 (06) :35-+