Analyzing APIs documentation and code to detect directive defects

Conference paper


Zhou, Y., Gu, R., Chen, T., Huang, Z., Panichella, S. and Gall, H. 2017. Analyzing APIs documentation and code to detect directive defects. 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE). Buenos Aires, Argentina 20 - 28 May 2017 Institute of Electrical and Electronics Engineers (IEEE). pp. 27-37 https://doi.org/10.1109/ICSE.2017.11
TypeConference paper
TitleAnalyzing APIs documentation and code to detect directive defects
AuthorsZhou, Y., Gu, R., Chen, T., Huang, Z., Panichella, S. and Gall, H.
Abstract

Application Programming Interface (API) documents represent one of the most important references for API users. However, it is frequently reported that the documentation is inconsistent with the source code and deviates from the API itself. Such inconsistencies in the documents inevitably confuse the API users hampering considerably their API comprehension and the quality of software built from such APIs. In this paper, we propose an automated approach to detect defects of API documents by leveraging techniques from program comprehension and natural language processing. Particularly, we focus on the directives of the API documents which are related to parameter constraints and exception throwing declarations. A first-order logic based constraint solver is employed to detect such defects based on the obtained analysis results. We evaluate our approach on parts of well documented JDK 1.8 APIs. Experiment results show that, out of around 2000 API usage constraints, our approach can detect 1158 defective document directives, with a precision rate of 81.6%, and a recall rate of 82.0%, which demonstrates its practical feasibility.

Research GroupFoundations of Computing group
Conference2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE)
Page range27-37
ISSN1558-1225
ISBN
Hardcover9781538638682
PublisherInstitute of Electrical and Electronics Engineers (IEEE)
Publication dates
Print20 May 2017
Online20 Jul 2017
Publication process dates
Deposited15 Jun 2017
Accepted12 Dec 2016
Output statusPublished
Digital Object Identifier (DOI)https://doi.org/10.1109/ICSE.2017.11
LanguageEnglish
Book titleICSE '17: Proceedings of the 39th International Conference on Software Engineering
Permalink -

https://repository.mdx.ac.uk/item/87050

  • 26
    total views
  • 0
    total downloads
  • 0
    views this month
  • 0
    downloads this month

Export as