Abstract

Formal specifications for APIs help developers correctly use them and enable checker tools automatically verify their uses. However, formal specifications are not always available with released APIs. In this work, we demonstrate an approach for mining API preconditions from a large-scale corpus of open-source software. It considers conditions guarding API calls in client code as potential preconditions of the corresponding APIs. Then it uses consensus among a large number of API usages to keep the ones appearing in the majority. Finally, the mined preconditions are ranked based on their frequencies and reported to users.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call