Please use this identifier to cite or link to this item: http://hdl.handle.net/10397/61076
Title: Understanding the API usage in Java
Authors: Qiu, D
Li, B
Leung, H 
Keywords: API usage
Empirical study
Java
Issue Date: 2016
Publisher: Elsevier
Source: Information and software technology, 2016, v. 73, p. 81-100 How to cite?
Journal: Information and software technology 
Abstract: Context Application Programming Interfaces (APIs) facilitate the use of programming languages. They define sets of rules and specifications for software programs to interact with. The design of language API is usually artistic, driven by aesthetic concerns and the intuitions of language architects. Despite recent studies on limited scope of API usage, there is a lack of comprehensive, quantitative analyses that explore and seek to understand how real-world source code uses language APIs. Objective This study aims to understand how APIs are employed in practical development and explore their potential applications based on the results of API usage analysis. Method We conduct a large-scale, comprehensive, empirical analysis of the actual usage of APIs on Java, a modern, mature, and widely-used programming language. Our corpus contains over 5000 open-source Java projects, totaling 150 million source lines of code (SLoC). We study the usage of both core (official) API library and third-party (unofficial) API libraries. We resolve project dependencies automatically, generate accurate resolved abstract syntax trees (ASTs), capture used API entities from over 1.5 million ASTs, and measure the usage based on our defined metrics: frequency, popularity and coverage. Results Our study provides detailed quantitative information and yield insight, particularly, (1) confirms the conventional wisdom that the usage of APIs obeys Zipf distribution; (2) demonstrates that core API is not fully used (many classes, methods and fields have never been used); (3) discovers that deprecated API entities (in which some were deprecated long ago) are still widely used; (4) evaluates that the use of current compact profiles is under-utilized; (5) identifies API library coldspots and hotspots. Conclusions Our findings are suggestive of potential applications across language API design, optimization and restriction, API education, library recommendation and compact profile construction.
URI: http://hdl.handle.net/10397/61076
ISSN: 0950-5849
DOI: 10.1016/j.infsof.2016.01.011
Appears in Collections:Journal/Magazine Article

Access
View full-text via PolyU eLinks SFX Query
Show full item record

SCOPUSTM   
Citations

1
Last Week
0
Last month
Citations as of Jun 19, 2017

WEB OF SCIENCETM
Citations

2
Last Week
0
Last month
Citations as of Jun 22, 2017

Page view(s)

15
Last Week
3
Last month
Checked on Jun 25, 2017

Google ScholarTM

Check

Altmetric



Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.