Databases Reference
In-Depth Information
TABLE 12.1: Two Sample Projects Used for Evaluation
Project
Language SLOC
Functions
Analysis time
AspectJ 1.5.3
Java
320,906
33,559
2.09
GMyth 0.7.1
C
10,198
444
0.07
Note: Analysis time encompasses the time needed for all the
steps, from parsing to detecting violations of specifications.
is violated in a given way. We can use a parameter called minimum confidence
to cope with the problem of too frequently occurring violations: We simply fil-
ter out all violations whose confidence is below the given minimum confidence
value.
Violations can be detected using Colibri/Java [5]. Detecting violations is
equivalent to detecting \gaps" in the concept analysis matrix [6]. In Figure
12.6 we see that the specification S 1 = fc 2 ;c 4 ;c 5 g is violated by f 3 with the
violation being V 1 = fc 2 ;c 4 g (i.e., c 5 is missing in the sequential constraints ab-
straction of f 3 ; this \gap" is shown in the gure). Condence of this violation
is support (S 1 )=support (V 1 ) = 3=4 = 0:75. Another specication, S 2 = fc 1 ;c 2 g,
is violated by f 2 ;f 4 ;f 6 , and f 7 with the violation being V 2 = fc 2 g. Condence
of this violation is support (S 2 )=support (V 2 ) = 3=7 0:43.
12.7 The Real World
Now that we have shown how we can automatically find specifications
and their violations, let us show some examples of violations, detected in
two different projects written in two different programming languages (see
Table 12.1). These will serve to illustrate the type of specifications that can
be found, as well as potential severity of their violations.
Our first sample project is AspectJ 1.5.3. 5 AspectJ is a compiler for the
AspectJ language, which is an aspect-oriented extension to the Java language.
AspectJ is written in Java, and is a suciently large project to put scalability
of the whole approach to test: It encompasses 320,906 SLOC in .java files.6 6
One sample specification found was the following:
target of next() target of next()
retval of iterator() target of next()
In a nutshell, this specification (with support of 687) says that iterators
5 http://eclipse.org/aspectj/
6 All SLOC counts were generated using David A. Wheeler's \SLOCCount."
 
Search WWH ::




Custom Search