Databases Reference
In-Depth Information
FIGURE 10.6: Illustrative examples of general algorithm. (From S. Thum-
malapenta and T. Xie, Mining exception-handling rules as sequence associa-
tion rules, International Conference on Software Engineering (ICSE)
c 2009
IEEE.)
Condence (X)Y) = Support (XY) / Support (X)
Although we explain our algorithm using two sequence databases SDB 1
and SDB 2 , our algorithm can be applied to multiple sequence databases as
well. These multiple sequence databases can also be combined into a single
sequence database using the similar mechanism illustrated in Figure 10.6.
For mining exception-handling rules for our example SE task, we consider
two sequence databases for each method call FC a : a normal method-call-
sequence (NFCS) database and an exception method-call-sequence (EFCS)
database. We apply our mining algorithm to generate sequence association
rules of the form FC 1 c ...FC n c ) FC 1 e ...FC m e , where FC 1 c ...FC n c v S i 2 NFCS
and FC 1 e ...FC m e v S j 2 EFCS.
10.7 Apply Phase
The apply phase next uses mined API usage specifications for achieving
the SE task. These mined specifications can be used for improving software
productivity via assisting programmers or software quality by using mined
specifications as programming rules for verification tools. We next explain
how we achieve the example SE task of detecting exception-handling defects
using mined specifications.
Initially, from each call site of FC a in the application under analysis, we
extract the normal method-call sequence, say C 1 c C 2 c :::C a c , from the begin-
ning of the body of enclosing method of FC a to the call site of FC a . If
FC 1 c :::FC n c v C 1 c C 2 c :::C a c , then we extract the exception method-call se-
quence, say C 1 e C 2 e :::C b e , from the call site of FC a to the end of the enclosing
method body or to a node (in the EFG) whose outgoing edges are all normal
 
Search WWH ::




Custom Search