DocumentCode
2441952
Title
Statically checking API protocol conformance with mined multi-object specifications
Author
Pradel, Michael ; Jaspan, Ciera ; Aldrich, Jonathan ; Gross, Thomas R.
Author_Institution
Dept. of Comput. Sci., ETH Zurich, Zurich, Switzerland
fYear
2012
fDate
2-9 June 2012
Firstpage
925
Lastpage
935
Abstract
Programmers using an API often must follow protocols that specify when it is legal to call particular methods. Several techniques have been proposed to find violations of such protocols based on mined specifications. However, existing techniques either focus on single-object protocols or on particular kinds of bugs, such as missing method calls. There is no practical technique to find multi-object protocol bugs without a priori known specifications. In this paper, we combine a dynamic analysis that infers multi-object protocols and a static checker of API usage constraints into a fully automatic protocol conformance checker. The combined system statically detects illegal uses of an API without human-written specifications. Our approach finds 41 bugs and code smells in mature, real-world Java programs with a true positive rate of 51%. Furthermore, we show that the analysis reveals bugs not found by state of the art approaches.
Keywords
Java; application program interfaces; formal specification; program debugging; Java programs; dynamic analysis; human written specifications; mined multiobject specifications; multiobject protocol bugs; single object protocols; statically checking API protocol conformance; Computer bugs; Error analysis; Java; Law; Protocols; Training; Specification mining; Static analysis; Typestate;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Engineering (ICSE), 2012 34th International Conference on
Conference_Location
Zurich
ISSN
0270-5257
Print_ISBN
978-1-4673-1066-6
Electronic_ISBN
0270-5257
Type
conf
DOI
10.1109/ICSE.2012.6227127
Filename
6227127
Link To Document