Advertisement

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

  • Caroline Lima
  • Andre HoraEmail author
Article
  • 17 Downloads

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.

Keywords

Software library Framework API popularity API usage Software evolution Software repository mining 

Notes

Funding information

This research is financially supported by the CAPES and CNPq.

References

  1. 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.Google Scholar
  2. Avelino, G., Passos, L., Hora, A., Valente, M.T. (2016). A novel approach for estimating truck factors. In International Conference on Program Comprehension.Google Scholar
  3. 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.CrossRefGoogle Scholar
  4. 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).CrossRefGoogle Scholar
  5. Bloch, J. (2006). How to design a good API and why it matters. In SIGPLAN Symposium on Object-oriented Programming Systems, Languages, and Applications.Google Scholar
  6. 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.Google Scholar
  7. 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.Google Scholar
  8. 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.Google Scholar
  9. Brito, A., Xavier, L., Hora, A., Valente, M.T. (2018a). APIDiff: Detecting API breaking changes. In International Conference on Software Analysis, Evolution and Reengineering.Google Scholar
  10. 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.Google Scholar
  11. Brito, G., Hora, A., Valente, M.T., Robbes, R. (2018c). On the use of replacement messages in API deprecation: An empirical study, (Vol. 137.CrossRefGoogle Scholar
  12. Businge, J., Serebrenik, A., van den Brand, M. (2012). Survival of eclipse third-party plug-ins. In International Conference on Software Maintenance.Google Scholar
  13. 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.Google Scholar
  14. Businge, J., Serebrenik, A., van den Brand, M.G. (2013b). Eclipse API usage: the good and the bad. Software Quality Journal.Google Scholar
  15. Chatzopoulou, G., Sheng, C., Faloutsos, M. (2010). A first step towards understanding popularity in youtube. In Conference on Computer Communications Workshops.Google Scholar
  16. Couto, C., Pires, P., Valente, M.T., Bigonha, R., Anquetil, N. (2014). Predicting software defects with causality tests. Journal of Systems and Software, 93.CrossRefGoogle Scholar
  17. Dagenais, B., & Robillard, M.P. (2008). Recommending adaptive changes for framework evolution. In International Conference on Software engineering.Google Scholar
  18. De Roover, C., Lämmel, R., Pek, E. (2013). Multi-dimensional exploration of api usage. In International Conference on Program Comprehension.Google Scholar
  19. Dig, D., & Johnson, R. (2005). The role of refactorings in API evolution. In International Conference on Software Maintenance.Google Scholar
  20. 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.Google Scholar
  21. Eisenberg, D.S., Stylos, J., Myers, B.A. (2010). Apatite: a new interface for exploring apis. In Conference on Human Factors in Computing Systems.Google Scholar
  22. 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.CrossRefGoogle Scholar
  23. Fowler, M., & Beck, K. (1999). Refactoring: improving the design of existing code. Addison-Wesley Professional.Google Scholar
  24. 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.Google Scholar
  25. 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.CrossRefGoogle Scholar
  26. Henning, M. (2007). API design matters. Queue, 5(4), 24–36.CrossRefGoogle Scholar
  27. Herbsleb, J.D. (2007). Global software engineering: the future of socio-technical coordination. In Future of Software Engineering.Google Scholar
  28. Hintze, J.L., & Nelson, R.D. (1998). Violin plots: a box plot-density trace synergism. The American Statistician, 52(2), 181–184.Google Scholar
  29. Holmes, R., & Walker, R.J. (2007). Informing eclipse api production and consumption. In OOPSLA Workshop on Eclipse Technology eXchange.Google Scholar
  30. 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.
  31. 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.Google Scholar
  32. 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.CrossRefGoogle Scholar
  33. 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.Google Scholar
  34. Konstantopoulos, D., Marien, J., Pinkerton, M., Braude, E. (2009). Best principles in the design of shared software. In International Computer Software and Applications Conference.Google Scholar
  35. 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.CrossRefGoogle Scholar
  36. 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.CrossRefGoogle Scholar
  37. 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.Google Scholar
  38. Lethbridge, T.C., Singer, J., Forward, A. (2003). How software engineers use documentation: the state of the practice. IEEE Software, 20(6), 35–39.CrossRefGoogle Scholar
  39. 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
  40. Maalej, W., & Robillard, M.P. (2013). Patterns of knowledge in API reference documentation. IEEE Transactions on Software Engineering, 39(9), 1264–1282.CrossRefGoogle Scholar
  41. 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.CrossRefGoogle Scholar
  42. McCabe, T.J. (1976). A complexity measure. IEEE Transactions on Software Engineering, SE-2(4), 308– 320.MathSciNetCrossRefGoogle Scholar
  43. 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.Google Scholar
  44. 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.Google Scholar
  45. Mileva, Y.M., Dallmeier, V., Zeller, A. (2010). Mining API popularity. In International Academic and Industrial Conference on Testing - Practice and Research Techniques.CrossRefGoogle Scholar
  46. Mileva, Y.M., Wasylkowski, A., Zeller, A. (2011). Mining evolution of object usage. In European Conference on Object-Oriented Programming.Google Scholar
  47. Mistrík, I., Grundy, J., Van der Hoek, A., Whitehead, J. (2010). Collaborative software engineering: challenges and prospects. In Collaborative Software Engineering.CrossRefGoogle Scholar
  48. Moser, S., & Nierstrasz, O. (1996). The effect of object-oriented frameworks on developer productivity. Computer, 29(9).Google Scholar
  49. Myers, B.A., & Stylos, J. (2016). Improving API usability. Communications of the ACM, 59(6), 62–69.CrossRefGoogle Scholar
  50. Raemaekers, S., van Deursen, A., Visser, J. (2012). Measuring software library stability through historical version analysis. In International Conference on Software Maintenance.Google Scholar
  51. Reddy, M. (2011). API Design for C++. Morgan Kaufmann Publishers.Google Scholar
  52. Retherford, R.D., & Choe, M.K. (2011). Statistical models for causal analysis. Wiley.Google Scholar
  53. 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.Google Scholar
  54. Robillard, M.P. (2009). What makes APIs hard to learn? Answers from developers. IEEE Software, 26(6), 27–34.CrossRefGoogle Scholar
  55. 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.Google Scholar
  56. Sawant, A.A., & Bacchelli, A. (2015). A dataset for API usage. In Conference on Mining Software Repositories.Google Scholar
  57. 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.Google Scholar
  58. Sawant, A.A., & Bacchelli, A. (2017a). Fine-grape: fine-grained api usage extractor–an approach and dataset to investigate api usage, (Vol. 22.Google Scholar
  59. 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.Google Scholar
  60. 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.Google Scholar
  61. Stylos, J., & Myers, B. (2007). Mapping the space of API design decisions. In Symposium on Visual Languages and Human-Centric Computing.Google Scholar
  62. 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.CrossRefGoogle Scholar
  63. 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.Google Scholar
  64. 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.Google Scholar
  65. 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.Google Scholar
  66. Wu, W., Gueheneuc, Y.G., Antoniol, G., Kim, M. (2010). AURA: a hybrid approach to identify framework evolution. In International Conference on Software Engineering.Google Scholar
  67. 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.Google Scholar
  68. 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.Google Scholar
  69. 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.Google Scholar
  70. Zibran, M. (2008). What makes APIs difficult to use. International Journal of Computer Science and Network Security (IJCSNS), 8(4), 255–261.Google Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Faculty of ComputingUFMSBelo HorizonteBrazil
  2. 2.Department of Computer ScienceUFMGBelo HorizonteBrazil

Personalised recommendations