Databases Reference
In-Depth Information
describes how to read the entries of a ZipFile using an Enumeration. Infor-
mation about each entry is added to a collection, which is initialized at the
beginning of the protocol. After reading all entries, the ZipFile is closed.
4.4.3 Number and Size of Inferred Protocols
To assess whether the inferred API usage protocols are of a manageable
number and size, we measure how many protocols the analysis infers and how
many states and transitions each protocol contains. Table 4.1 shows the num-
ber of collaborations and protocols inferred for the Java standard library. The
number of collaborations is measured after applying transformers and after
removing trivial collaborations with less than two calls. The results show that
extracting and filtering object collaborations significantly reduce the amount
of data to analyze compared with the number of analyzed runtime events.
Furthermore, the analysis mines a reasonably small number of FSMs from
each program (between 3 and 133).
Figure 4.9 illustrates the number of states and transitions of the inferred
protocols. Most protocols have less than 10 states and less than 10 transitions.
The largest protocol contains 25 states and 53 transitions. We conclude from
the results that most protocols are small enough to be understandable for
humans.
4.4.4 Influence of Coverage
An obvious question is how the coverage of the API by the method traces
influences the number of usage protocols that our analysis infers. To answer
it, we measure the overall number of calls to API classes c all within the an-
alyzed traces and the number of distinct API methods called c distinct . Then,
we compute the correlation of c all and c distinct with the number of inferred
80
80
70
70
60
60
50
50
40
40
30
30
20
20
10
10
0
0
0
5
10 15 20 25
30 35
0
10
20
30
40
50
Number of states
Number of transitions
FIGURE 4.9: Distribution of number of states and number of transitions of
the inferred protocols.
 
Search WWH ::




Custom Search