Skip to main content
Log in

What are the characteristics of popular APIs? A large-scale study on Java, Android, and 165 libraries

  • Published:
Software Quality Journal Aims and scope Submit manuscript

Abstract

Software systems are commonly implemented with the support of libraries, which provide features via APIs. Ideally, APIs should have some characteristics, for example, they should be well documented and stable so that client systems can confidently rely on them. However, not all APIs are equal in number of clients: while some APIs are very popular and used worldwide, other may face much lower usage rates. In this context, one question appears: are there particular characteristics that differentiate popular APIs from ordinary APIs? Answering this question can uncover how worldwide APIs are actually implemented and maintained, revealing practices to better support both research and development on APIs. In this paper, we assess the characteristics of popular APIs, including their size, legibility, documentation, stability, and client adoption. We analyze 1491 APIs provided by Java, Android, and 165 libraries. We detect that popular APIs are distinct from ordinary ones, for example, often, popular APIs are larger, have more comments, and are more unstable than ordinary APIs. Finally, we provide a set of lessons learned from the popular APIs on factors that developers can control, such as the exposure of public methods and the API stability.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16

Similar content being viewed by others

Notes

  1. We use the term library to designate both frameworks and libraries.

  2. https://docs.google.com/spreadsheets/d/1VLR7nH2bMF9IjwwE7Hv4Ngkr9ANHm3sa4UPzAEtNyZY

  3. https://github.com/iluwatar/java-design-patterns

  4. https://hg.openjdk.java.net

  5. aosp-mirror/platform_frameworks_base and aosp-mirror/platform_frameworks_support

  6. https://data.stackexchange.com

  7. Lifetime is computed as the number of days between the first commit and the day of the analysis.

  8. https://scitools.com

  9. Command: git log --pretty=format:"%H,%an,%ai" $API

  10. Command: hg log -f $API

  11. The total API changes include both the breaking changes (e.g., a removed public method) and the non-breaking changes (e.g., an added public method) (Brito et al. 2018a).

  12. https://goo.gl/FJKpXf

  13. https://goo.gl/tZernL

References

  • Ahmed, M., Spagna, S., Huici, F., Niccolini, S. (2013). A peek into the future: predicting the evolution of popularity in user generated content. In International Conference on Web Search and Data Mining.

  • Avelino, G., Passos, L., Hora, A., Valente, M.T. (2016). A novel approach for estimating truck factors. In International Conference on Program Comprehension.

  • Barua, A., Thomas, S.W., Hassan, A.E. (2014). What are developers talking about? an analysis of topics and trends in stack overflow. Empirical Software Engineering, 19(3), 619–654.

    Article  Google Scholar 

  • Bavota, G., Linares-Vasquez, M., Bernal-Cardenas, C.E., Di Penta, M., Oliveto, R., Poshyvanyk, D. (2015). The impact of API change-and fault-proneness on the user ratings of Android apps. IEEE Transactions on Software Engineering, 41(4).

  • Bloch, J. (2006). How to design a good API and why it matters. In SIGPLAN Symposium on Object-oriented Programming Systems, Languages, and Applications.

  • Bogart, C., Kästner, C., Herbsleb, J., Thung, F. (2016). How to break an API: cost negotiation and community values in three software ecosystems. In International Symposium on the Foundations of Software Engineering.

  • Borges, H., Hora, A., Valente, M.T. (2016), Understanding the factors that impact the popularity of GitHub repositories. In International Conference on Software Maintenance and Evolution.

  • Borges, H., & Valente, M.T. (2018). What’s in a GitHub star? understanding repository starring practices in a social coding platform. Journal of Systems and Software.

  • Brito, A., Xavier, L., Hora, A., Valente, M.T. (2018a). APIDiff: Detecting API breaking changes. In International Conference on Software Analysis, Evolution and Reengineering.

  • Brito, A., Xavier, L., Hora, A., Valente, M.T. (2018b). Why and how Java developers break APIs. In International Conference on Software Analysis, Evolution and Reengineering.

  • Brito, G., Hora, A., Valente, M.T., Robbes, R. (2018c). On the use of replacement messages in API deprecation: An empirical study, (Vol. 137.

  • Businge, J., Serebrenik, A., van den Brand, M. (2012). Survival of eclipse third-party plug-ins. In International Conference on Software Maintenance.

  • Businge, J., Serebrenik, A., van den Brand, M. (2013a). Analyzing the Eclipse API usage: putting the developer in the loop. In European Conference on Software Maintenance and Reengineering.

  • Businge, J., Serebrenik, A., van den Brand, M.G. (2013b). Eclipse API usage: the good and the bad. Software Quality Journal.

  • Chatzopoulou, G., Sheng, C., Faloutsos, M. (2010). A first step towards understanding popularity in youtube. In Conference on Computer Communications Workshops.

  • Couto, C., Pires, P., Valente, M.T., Bigonha, R., Anquetil, N. (2014). Predicting software defects with causality tests. Journal of Systems and Software, 93.

  • Dagenais, B., & Robillard, M.P. (2008). Recommending adaptive changes for framework evolution. In International Conference on Software engineering.

  • De Roover, C., Lämmel, R., Pek, E. (2013). Multi-dimensional exploration of api usage. In International Conference on Program Comprehension.

  • Dig, D., & Johnson, R. (2005). The role of refactorings in API evolution. In International Conference on Software Maintenance.

  • Dyer, R., Nguyen, H.A., Rajan, H., Nguyen, T.N. (2013). Boa: a language and infrastructure for analyzing ultra-large-scale software repositories. In International Conference on Software Engineering.

  • Eisenberg, D.S., Stylos, J., Myers, B.A. (2010). Apatite: a new interface for exploring apis. In Conference on Human Factors in Computing Systems.

  • Figueiredo, F., Almeida, J.M., Gonċalves, M.A., Benevenuto, F. (2014). On the dynamics of social media popularity: a youtube case study. ACM Transactions on Internet Technology, 14(4), 24.

    Article  Google Scholar 

  • Fowler, M., & Beck, K. (1999). Refactoring: improving the design of existing code. Addison-Wesley Professional.

  • Fritz, T., Ou, J., Murphy, G.C., Murphy-Hill, E. (2010). A degree-of-knowledge model to capture source code familiarity In International Conference on Software Engineering. ACM.

  • Fritz, T., Murphy, G.C., Murphy-Hill, E., Ou, J., Hill, E. (2014). Degree-of-knowledge: modeling a developer’s knowledge of code. ACM Transactions on Software Engineering and Methodology (TOSEM), 23(2), 14.

    Article  Google Scholar 

  • Henning, M. (2007). API design matters. Queue, 5(4), 24–36.

    Article  Google Scholar 

  • Herbsleb, J.D. (2007). Global software engineering: the future of socio-technical coordination. In Future of Software Engineering.

  • Hintze, J.L., & Nelson, R.D. (1998). Violin plots: a box plot-density trace synergism. The American Statistician, 52(2), 181–184.

    Google Scholar 

  • Holmes, R., & Walker, R.J. (2007). Informing eclipse api production and consumption. In OOPSLA Workshop on Eclipse Technology eXchange.

  • Hora, A., & Valente, M.T. (2015). apiwave: keeping track of API popularity and migration. In: International Conference on Software Maintenance and Evolution. http://apiwave.com.

  • Hora, A., Valente, M.T., Robbes, R., Anquetil n. (2016). When should internal interfaces be promoted to public? In International Symposium on Foundations of Software Engineering.

  • Hora, A., Robbes, R., Valente, M.T., Anquetil, N., Etien, A., Ducasse, S. (2018a). How do developers react to API evolution? A large-scale empirical study. Software Quality Journal, 26(1), 161–191.

    Article  Google Scholar 

  • Hora, A., Silva, D., Robbes, R., Valente, M.T. (2018b). Assessing the threat of untracked changes in software evolution. In International Conference on Software Engineering.

  • Konstantopoulos, D., Marien, J., Pinkerton, M., Braude, E. (2009). Best principles in the design of shared software. In International Computer Software and Applications Conference.

  • Kula, R.G., German, D.M., Ouni, A., Ishio, T., Inoue, K. (2018a). Do developers update their library dependencies?. Empirical Software Engineering, 23(1), 384–417.

    Article  Google Scholar 

  • Kula, R.G., Ouni, A., German, D.M., Inoue, K. (2018b). An empirical study on the impact of refactoring activities on evolving client-used APIs. Information and Software Technology, 93, 186–199.

    Article  Google Scholar 

  • Lehmann, J., Gonċalves, B., Ramasco, J.J., Cattuto, C. (2012). Dynamical classes of collective attention in twitter. In International Conference on World Wide Web.

  • Lethbridge, T.C., Singer, J., Forward, A. (2003). How software engineers use documentation: the state of the practice. IEEE Software, 20(6), 35–39.

    Article  Google Scholar 

  • Ma, Z., Sun, A., Cong, G. (2013). On predicting the popularity of newly emerging hashtags in twitter. Journal of the Association for Information Science and Technology, 64(7), 1399–1410.

    Google Scholar 

  • Maalej, W., & Robillard, M.P. (2013). Patterns of knowledge in API reference documentation. IEEE Transactions on Software Engineering, 39(9), 1264–1282.

    Article  Google Scholar 

  • Mastrangelo, L., Ponzanelli, L., Mocci, A., Lanza, M., Hauswirth, M., Nystrom, N. (2015). Use at your own risk: the java unsafe API in the wild. In International Conference on Object-Oriented Programming, Systems, Languages, and Applications.

  • McCabe, T.J. (1976). A complexity measure. IEEE Transactions on Software Engineering, SE-2(4), 308– 320.

    Article  MathSciNet  Google Scholar 

  • McDonnell, T., Ray, B., Kim, M. (2013). An empirical study of API stability and adoption in the Android ecosystem. In International Conference on Software Maintenance.

  • Mileva, Y.M., Dallmeier, V., Burger, M., Zeller, A. (2009). Mining trends of library usage. In Joint International and Annual ERCIM Workshops on Principles of Software Evolution and Software Evolution Workshops.

  • Mileva, Y.M., Dallmeier, V., Zeller, A. (2010). Mining API popularity. In International Academic and Industrial Conference on Testing - Practice and Research Techniques.

  • Mileva, Y.M., Wasylkowski, A., Zeller, A. (2011). Mining evolution of object usage. In European Conference on Object-Oriented Programming.

  • Mistrík, I., Grundy, J., Van der Hoek, A., Whitehead, J. (2010). Collaborative software engineering: challenges and prospects. In Collaborative Software Engineering.

  • Moser, S., & Nierstrasz, O. (1996). The effect of object-oriented frameworks on developer productivity. Computer, 29(9).

  • Myers, B.A., & Stylos, J. (2016). Improving API usability. Communications of the ACM, 59(6), 62–69.

    Article  Google Scholar 

  • Raemaekers, S., van Deursen, A., Visser, J. (2012). Measuring software library stability through historical version analysis. In International Conference on Software Maintenance.

  • Reddy, M. (2011). API Design for C++. Morgan Kaufmann Publishers.

  • Retherford, R.D., & Choe, M.K. (2011). Statistical models for causal analysis. Wiley.

  • Robbes, R., Lungu, M., Röthlisberger, D. (2012). How do developers react to API deprecation? The case of a Smalltalk ecosystem. In International Symposium on the Foundations of Software Engineering.

  • Robillard, M.P. (2009). What makes APIs hard to learn? Answers from developers. IEEE Software, 26(6), 27–34.

    Article  Google Scholar 

  • Romano, J., Kromrey, J.D., Coraggio, J., Skowronek, J. (2006). Appropriate statistics for ordinal level data: should we really be using t-test and cohen’sd for evaluating group differences on the nsse and other surveys. In Annual Meeting of the Florida Association of Institutional Research.

  • Sawant, A.A., & Bacchelli, A. (2015). A dataset for API usage. In Conference on Mining Software Repositories.

  • Sawant, A.A., Robbes, R., Bacchelli, A. (2016). On the reaction to deprecation of 25,357 clients of 4 + 1 popular Java APIs. In 32nd International Conference on Software Maintenance and Evolution.

  • Sawant, A.A., & Bacchelli, A. (2017a). Fine-grape: fine-grained api usage extractor–an approach and dataset to investigate api usage, (Vol. 22.

  • Sawant, A.A., Robbes, R., Bacchelli, A. (2017b). On the reaction to deprecation of clients of 4 + 1 popular Java APIs and the JDK. Empirical Software Engineering.

  • Stylos, J., Clarke, S., Myers, B. (2006). Comparing API design choices with usability studies: a case study and future directions. In Workshop of the Psychology of Programming Interest Group.

  • Stylos, J., & Myers, B. (2007). Mapping the space of API design decisions. In Symposium on Visual Languages and Human-Centric Computing.

  • Swani, K., Milne, G.R., Brown, B.P., Assaf, A.G., Donthu, N. (2017). What messages to post? evaluating the popularity of social media communications in business versus consumer markets. Industrial Marketing Management, 62, 77–87.

    Article  Google Scholar 

  • Thummalapenta, S., & Xie, T. (2008). Spotweb: detecting framework hotspots via mining open source repositories on the web. In International Working Conference on Mining Software Repositories.

  • Tian, Y., Nagappan, M., Lo, D., Hassan, A.E. (2014). What are the characteristics of high-rated apps? a case study on free Android applications. In International Conference on Software Maintenance and Evolution.

  • Tufano, M., Palomba, F., Bavota, G., Oliveto, R., Di Penta, M., De Lucia, A., Poshyvanyk, D. (2015). When and why your code starts to smell bad. In International Conference on Software Engineering.

  • Wu, W., Gueheneuc, Y.G., Antoniol, G., Kim, M. (2010). AURA: a hybrid approach to identify framework evolution. In International Conference on Software Engineering.

  • Xavier, L., Brito, A., Hora, A., Valente, M.T. (2017). Historical and impact analysis of API breaking changes: a large scale study. In International Conference on Software Analysis, Evolution and Reengineering.

  • Zerouali, A., & Mens, T. (2017). Analyzing the evolution of testing library usage in open source java projects. In International Conference on Software Analysis, Evolution and Reengineering.

  • Zibran, M.F., Eishita, F.Z., Roy, C.K. (2011). Useful, but usable? factors affecting the usability of APIs. In Working Conference on Reverse Engineering.

  • Zibran, M. (2008). What makes APIs difficult to use. International Journal of Computer Science and Network Security (IJCSNS), 8(4), 255–261.

    Google Scholar 

Download references

Funding

This research is financially supported by the CAPES and CNPq.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Andre Hora.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Lima, C., Hora, A. What are the characteristics of popular APIs? A large-scale study on Java, Android, and 165 libraries. Software Qual J 28, 425–458 (2020). https://doi.org/10.1007/s11219-019-09476-z

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11219-019-09476-z

Keywords

Navigation