figshare
Browse

Coverage of API Code Examples (APIExCov)

Download (2.94 MB) This item is shared privately
software
modified on 2025-05-01, 19:03
<p dir="ltr">To alleviate the API developers’ burden of writing API code examples for API documentation and empower them to produce more usage examples that can promote API learnability, we propose a tool to measure and report the coverage of API usage examples. In a similar manner to unit test coverage, e.g. Java code coverage library (JaCoCo), this coverage analysis tool measures the percentage of the API elements (e.g. methods and classes) that are illustrated in examples and highlights any instances that are not yet used in any examples. This tool aims to help API developers define their intended APIs and ensure that most of their components are demonstrated in examples. This is particularly crucial because research shows that producing a large number of API code examples does not necessarily ensure high API coverage, as these examples may contain significant repetition.</p>