Carnegie Mellon University
Browse
- No file added yet -

Statically Checking API Protocol Conformance with Mined Multi-Object Specifications

Download (263.77 kB)
journal contribution
posted on 2012-06-01, 00:00 authored by Michael Pradel, Ciera Jaspan, Jonathan Aldrich, Thomas R. Gross

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.

History

Publisher Statement

The final publication is available at Springer via http://dx.doi.org/10.1109/ICSE.2012.6227127

Date

2012-06-01

Usage metrics

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC