What are the characteristics of popular APIs? A large-scale study on Java, Android, and 165 libraries
- 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 miningNotes
Funding information
This research is financially supported by the CAPES and CNPq.
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.Google Scholar
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Businge, J., Serebrenik, A., van den Brand, M. (2012). Survival of eclipse third-party plug-ins. In International Conference on Software Maintenance.Google Scholar
- 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
- Businge, J., Serebrenik, A., van den Brand, M.G. (2013b). Eclipse API usage: the good and the bad. Software Quality Journal.Google Scholar
- Chatzopoulou, G., Sheng, C., Faloutsos, M. (2010). A first step towards understanding popularity in youtube. In Conference on Computer Communications Workshops.Google Scholar
- 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
- Dagenais, B., & Robillard, M.P. (2008). Recommending adaptive changes for framework evolution. In International Conference on Software engineering.Google Scholar
- De Roover, C., Lämmel, R., Pek, E. (2013). Multi-dimensional exploration of api usage. In International Conference on Program Comprehension.Google Scholar
- Dig, D., & Johnson, R. (2005). The role of refactorings in API evolution. In International Conference on Software Maintenance.Google Scholar
- 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
- 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
- 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
- Fowler, M., & Beck, K. (1999). Refactoring: improving the design of existing code. Addison-Wesley Professional.Google Scholar
- 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
- 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
- Henning, M. (2007). API design matters. Queue, 5(4), 24–36.CrossRefGoogle Scholar
- Herbsleb, J.D. (2007). Global software engineering: the future of socio-technical coordination. In Future of Software Engineering.Google Scholar
- 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.Google Scholar
- 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.Google Scholar
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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.CrossRefGoogle 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.CrossRefGoogle Scholar
- McCabe, T.J. (1976). A complexity measure. IEEE Transactions on Software Engineering, SE-2(4), 308– 320.MathSciNetCrossRefGoogle 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.Google Scholar
- 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
- 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
- Mileva, Y.M., Wasylkowski, A., Zeller, A. (2011). Mining evolution of object usage. In European Conference on Object-Oriented Programming.Google Scholar
- Mistrík, I., Grundy, J., Van der Hoek, A., Whitehead, J. (2010). Collaborative software engineering: challenges and prospects. In Collaborative Software Engineering.CrossRefGoogle Scholar
- Moser, S., & Nierstrasz, O. (1996). The effect of object-oriented frameworks on developer productivity. Computer, 29(9).Google Scholar
- Myers, B.A., & Stylos, J. (2016). Improving API usability. Communications of the ACM, 59(6), 62–69.CrossRefGoogle Scholar
- Raemaekers, S., van Deursen, A., Visser, J. (2012). Measuring software library stability through historical version analysis. In International Conference on Software Maintenance.Google Scholar
- Reddy, M. (2011). API Design for C++. Morgan Kaufmann Publishers.Google Scholar
- Retherford, R.D., & Choe, M.K. (2011). Statistical models for causal analysis. Wiley.Google Scholar
- 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
- Robillard, M.P. (2009). What makes APIs hard to learn? Answers from developers. IEEE Software, 26(6), 27–34.CrossRefGoogle 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.Google Scholar
- Sawant, A.A., & Bacchelli, A. (2015). A dataset for API usage. In Conference on Mining Software Repositories.Google Scholar
- 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
- 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
- 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
- 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
- Stylos, J., & Myers, B. (2007). Mapping the space of API design decisions. In Symposium on Visual Languages and Human-Centric Computing.Google Scholar
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Zibran, M. (2008). What makes APIs difficult to use. International Journal of Computer Science and Network Security (IJCSNS), 8(4), 255–261.Google Scholar