Understanding API Usage and Testing: An Empirical Study of C Libraries
Ahmed Zaki, Cristian Cadar

TL;DR
This study analyzes API usage and testing in 21 popular C libraries, revealing that developers often do not prioritize based on usage patterns and that client test suites can enhance library testing coverage.
Contribution
First large-scale empirical comparison of API usage and testing in C libraries, introducing LibProbe for analyzing client usage and test coverage.
Findings
Popular APIs are often poorly tested by library test suites.
Client test suites can significantly improve library testing coverage.
Developers do not prioritize testing based on API usage patterns.
Abstract
For library developers, understanding how their Application Programming Interfaces (APIs) are used in the field can be invaluable. Knowing how clients are using their APIs allows for data-driven decisions on prioritising bug reports, feature requests, and testing activities. For example, the priority of a bug report concerning an API can be partly determined by how widely that API is used. In this paper, we present an empirical study in which we analyse API usage across 21 popular open-source C libraries, such as OpenSSL and SQLite, with a combined total of 3,061 C/C++ clients. We compare API usage by clients with how well library test suites exercise the APIs to offer actionable insights for library developers. To our knowledge, this is the first study that compares API usage and API testing at scale for the C/C++ ecosystem. Our study shows that library developers do not prioritise…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsWeb Data Mining and Analysis · Web Application Security Vulnerabilities · Scientific Computing and Data Management
