Databases Reference
In-Depth Information
In fact, much of research done on bug detection so far can be thought of
as focusing on specific classes of bugs pertaining to particular APIs: studies of
operating-system bugs provide synthesized lists of API violations specific to
operating system drivers resulting in rules such as \do not call the interrupt
disabling function cli () twice in a row" [14]. In order to locate common errors,
we mine for frequent usage patterns in revision histories, as justified by the
following observation.
Observation 7.2.2 Method calls that are frequently added to the
source code simultaneously often represent a pattern.
Looking at incremental changes between revisions as opposed to full snap-
shots of the sources allows us to better focus our mining strategy. However, it
is important to notice that not every pattern mined by considering revision
histories is an actual usage pattern.
Example 1. Table 7.2 lists sample method calls that were added to re-
visions of files Foo : java , Bar : java , Baz : java , and Qux : java . All these files
contain a usage pattern that says that methods
f addListener ; removeListener g
must be precisely matched. However, mining these revisions yields addi-
tional patterns like
f addListener ; println g
and
f addListener ; iterator g
that are definitely not usage patterns. Furthermore, we have to take into
account the fact that in reality some patterns may be inserted incompletely,
e.g., by mistake or to fix a previous error. In Table 7.2 this occurs in file
Qux : java , where addListener and removeListener were inserted inde-
pendently in revisions 1.41 and 1.42. 2
The observation that follows gives rise to an effective ranking strategy used
in DynaMine.
Observation 7.2.3 Small changes to the repository such as one-line
additions often represent bug fixes.
 
Search WWH ::




Custom Search