To Do or Not to Do: Distill Crowdsourced Negative Caveats to Augment Api Documentation

Jing Li,Aixin Sun,Zhenchang Xing
DOI: https://doi.org/10.1002/asi.24067
2018-01-01
Journal of the Association for Information Science and Technology
Abstract:Negative caveats of application programming interfaces (APIs) are about “how not to use an API,” which are often absent from the official API documentation. When these caveats are overlooked, programming errors may emerge from misusing APIs, leading to heavy discussions on Q&A websites like Stack Overflow. If the overlooked caveats could be mined from these discussions, they would be beneficial for programmers to avoid misuse of APIs. However, it is challenging because the discussions are informal, redundant, and diverse. For this, for example, we propose D isca , a novel approach for automatically D is tilling desirable API negative ca veats from unstructured Q&A discussions. Through sentence selection and prominent term clustering, D isca ensures that distilled caveats are context‐independent, prominent, semantically diverse, and nonredundant. Quantitative evaluation in our experiments shows that the proposed D isca significantly outperforms four text‐summarization techniques. We also show that the distilled API negative caveats could greatly augment API documentation through qualitative analysis.
What problem does this paper attempt to address?