- 48 views
- 67 downloads
Improving API Documentation Quality Through Identifying Missing Code Examples
-
- Author / Creator
- Sarah, Afiya Fahmida
-
Software libraries often provide documentation to describe the Application Programming Interfaces (APIs) they offer. Such API documentation helps potential users understand how to use the library. Studies have shown that having code examples is one of the key criteria of good software documentation quality and that lack of examples is one of the reasons why API documentation becomes difficult to understand for library users. Thus, in this thesis, our goal is to improve API documentation quality by identifying missed opportunities for code examples.
Specifically, we propose a methodology to identify APIs from library API documentation websites that require code examples for improving documentation quality. We use web scraping and heuristics to identify APIs with missing code examples (APIsnoeg) from a library’s documentation website. We then look for Stack Overflow questions about the APIsnoeg. Next, we use a large language model (LLM) to determine if the post discusses the author’s struggle with using those APIsnoeg. If it does, then we mark that apinoeg as a potential API that may need a code example. Finally, we identify a list of APIs, for which, adding code examples can improve the documentation quality. We can then encourage library authors to add code examples for the APIs in this list.
Based on our methodology, we create a prototype tool. We evaluate the intermediate steps of our tool for the API documentation of 3 libraries and then analyze the API documentation of 12 libraries using the tool. We find that although there are Stack Overflow posts where authors discuss an apinoeg, it is not always an indicator that having code examples would resolve the authors’ issues. -
- Subjects / Keywords
-
- Graduation date
- Fall 2024
-
- Type of Item
- Thesis
-
- Degree
- Master of Science
-
- License
- This thesis is made available by the University of Alberta Library with permission of the copyright owner solely for non-commercial purposes. This thesis, or any portion thereof, may not otherwise be copied or reproduced without the written consent of the copyright owner, except to the extent permitted by Canadian copyright law.