Auto-documentation for stack overflow
Tan, Ri Sheng
Date of Issue2017-04-18
School of Computer Science and Engineering
In the field of software engineering, people often visit forums to exchange information, to seek or give advice. The provision of such rich and meaningful content allows software developers to understand the use of Application Programming Interface (API) but many of these developers may find the content insufficient and require additional explanation from the API documentation. Fortunately, for some of the APIs mentioned in forum posts, it is manually linked by forum users, readers can click on the links to visit its official API documentations for explanation and save themselves from performing a manual search on search engines for the API documentations. However, for those APIs that are mentioned but are not manually linked by forum users, readers will need to perform a manual search on search engines for the API documentation, wasting time and resources which can be avoided by automatically linking the sentence that contains an API mention to its API documentation. The prerequisite to linking a sentence that contains an API mention to its official API documentation is the extraction of the fully qualified API name of the API mentioned, as establishing such link is only possible with the fully qualified API name known. In this report, we considered two possible API extraction methods – IF-THEN rules and Naïve Bayes – to perform extraction of a fully qualified API name from a sentence. After weighing the pros and cons, we designed and developed a Naïve Bayes API extraction method. The Naïve Bayes API extraction method was evaluated against two baseline methods based on the fully qualified API names collected from four popular Python libraries, of which Naïve Bayes API extraction method outperformed the two baseline methods.
Final Year Project (FYP)
Nanyang Technological University