Automatic Detection and Repair Recommendation of Directive Defects in Java API Documentation

Application Programming Interfaces (APIs) represent key tools for software developers to build complex software systems. However, several studies have revealed that even major API providers tend to have incomplete or inconsistent API documentation. This can severely hamper the API comprehension and,...

Full description

Saved in:
Bibliographic Details
Published inIEEE transactions on software engineering Vol. 46; no. 9; pp. 1004 - 1023
Main Authors Zhou, Yu, Wang, Changzhi, Yan, Xin, Chen, Taolue, Panichella, Sebastiano, Gall, Harald
Format Journal Article
LanguageEnglish
Published New York IEEE 01.09.2020
IEEE Computer Society
Subjects
Online AccessGet full text
ISSN0098-5589
1939-3520
DOI10.1109/TSE.2018.2872971

Cover

More Information
Summary:Application Programming Interfaces (APIs) represent key tools for software developers to build complex software systems. However, several studies have revealed that even major API providers tend to have incomplete or inconsistent API documentation. This can severely hamper the API comprehension and, as a consequence, the quality of the software built on them. In this paper, we propose DRONE ( D etect and R epair of d O cumentatio N d E fects), a framework to automatically detect and repair defects from API documents by leveraging techniques from program analysis, natural language processing, and constraint solving. Specifically, we target at the directives of API documents, which are related to parameter constraints and exception handling declarations. Furthermore, in presence of defects, we also provide a prototypical repair recommendation system. We evaluate our approach on parts of the well-documented APIs of JDK 1.8 APIs (including javaFX) and Android 7.0 (level 24). Across the two empirical studies, our approach can detect API defects with an average F-measure of 79.9, 71.7, and 81.4 percent, respectively. The API repairing capability has also been evaluated on the generated recommendations in a further experiment. User judgments indicate that the constraint information is addressed correctly and concisely in the rendered directives.
Bibliography:ObjectType-Article-1
SourceType-Scholarly Journals-1
ObjectType-Feature-2
content type line 14
ISSN:0098-5589
1939-3520
DOI:10.1109/TSE.2018.2872971