Empirical Software Engineering

, Volume 21, Issue 6, pp 2366–2412 | Cite as

An exploratory study of api changes and usages based on apache and eclipse ecosystems

  • Wei Wu
  • Foutse Khomh
  • Bram Adams
  • Yann-Gaël Guéhéneuc
  • Giuliano Antoniol
Article

Abstract

Frameworks are widely used in modern software development to reduce development costs. They are accessed through their Application Programming Interfaces (APIs), which specify the contracts with client programs. When frameworks evolve, API backward-compatibility cannot always be guaranteed and client programs must upgrade to use the new releases. Because framework upgrades are not cost-free, observing API changes and usages together at fine-grained levels is necessary to help developers understand, assess, and forecast the cost of each framework upgrade. Whereas previous work studied API changes in frameworks and API usages in client programs separately, we analyse and classify API changes and usages together in 22 framework releases from the Apache and Eclipse ecosystems and their client programs. We find that (1) missing classes and methods happen more often in frameworks and affect client programs more often than the other API change types do, (2) missing interfaces occur rarely in frameworks but affect client programs often, (3) framework APIs are used on average in 35 % of client classes and interfaces, (4) most of such usages could be encapsulated locally and reduced in number, and (5) about 11 % of APIs usages could cause ripple effects in client programs when these APIs change. Based on these findings, we provide suggestions for developers and researchers to reduce the impact of API evolution through language mechanisms and design strategies.

Keywords

Empirical study Framework evolution API changes API usages Framework ecosystems Data mining 

References

  1. Ali N, Sharafi Z, Guéhéneuc Y-G, Antoniol G (2012) An empirical study on requirements traceability using eye-tracking. In: Proceedings of the International Conference on Software Maintenance, ser. ICSM 2012Google Scholar
  2. Bavota G, Canfora G, Penta MD, Oliveto R, Panichella S (2013) The evolution of project inter-dependencies in a software ecosystem: the case of apache. In: Proceedings of the 2013 IEEE International Conference on Software Maintenance, ser. ICSM ’13. Washington, DC, USA: IEEE Computer Society, pp 280–289Google Scholar
  3. Bloch J (2008) Effective Java (2nd Edition) (The Java Series), 2nd ed. Upper Saddle River, NJ. Prentice Hall PTRGoogle Scholar
  4. Bracha G, Cook W (1990) Mixin-based inheritance. In: Proceedings of the European Conference on Object-oriented Programming and on Object-oriented Programming Systems, Languages, and Applications, ser. OOPSLA/ECOOP. New York, NY, USA: ACM Press, 1990, pp. 303–311. [Online]. Available. doi:10.1145/97945.97982
  5. Businge J, Serebrenik A, van den Brand M (2013) Eclipse api usage: the good and the bad. Softw Qual J 1–35Google Scholar
  6. Businge J, Serebrenik A, van den Brand M (2010) An empirical study of the evolution of eclipse third-party plug-ins. In: Proceedings of the Joint ERCIM Workshop on Software Evolution (EVOL) and International Workshop on Principles of Software Evolution (IWPSE), ser. IWPSE-EVOL ’10. New York, NY, USA: ACM, pp 63–72Google Scholar
  7. Cossette BE, Walker RJ (2012) Seeking the ground truth: a retroactive study on the evolution and migration of software libraries. In: Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering, ser. FSE ’12. New York, NY, USA: ACM, pp 55:1–55:11Google Scholar
  8. Dagenais B, Robillard MP (2011) Recommending adaptive changes for framework evolution. ACM Trans Softw Eng Methodol 20(4):19:1–19:35CrossRefGoogle Scholar
  9. De Roover C, Lämmel R, Pek E (2013) Multi-dimensional exploration of api usage. In: ICPC, pp 152–161Google Scholar
  10. Dig D, Comertoglu C, Marinov D, Johnson R (2006) Automated detection of refactorings in evolving components. In: ECOOP ’06: Proceedings of the 20th European Conference on Object-Oriented Programming. Springer Berlin / HeidelbergGoogle Scholar
  11. Dietrich J, Jezek K, Brada P (2014) Broken promises: an empirical study into evolution problems in java programs caused by library upgrades. In: CSMR-WCRE, pp 64–73Google Scholar
  12. Dig D, Johnson R (2006) How do apis evolve? A story of refactoring: Research articles. J Softw Maint Evol 18(2):83–107CrossRefGoogle Scholar
  13. Dig D, Manzoor K, Johnson R, Nguyen TN (2007) Refactoring-aware configuration management for object-oriented programs. In: ICSE ’07: Proceedings of the 29th international conference on Software Engineering. Washington, DC, USA: IEEE Computer Society, pp 427–436Google Scholar
  14. Espinha T, Zaidman A, Gross H-G (2014) Web api growing pains: stories from client developers and their code. In: CSMR-WCRE, pp 84–93Google Scholar
  15. Fisher RA (1922) On the interpretation of χ 2 from contingency tables, and the calculation of p. J R Stat Soc 85(1):87–94CrossRefGoogle Scholar
  16. Fokaefs M, Tsantalis N, Stroulia E, Chatzigeorgiou A (2011) Jdeodorant: identification and application of extract class refactorings. In: Proceedings of the 33rd International Conference on Software Engineering, ICSE 2011, Waikiki, Honolulu, HI, USA, May 21-28, 2011, pp 1037–1039Google Scholar
  17. Fowler M, Beck K, Brant J, Opdyke W, Roberts D (1999) Refactoring: Improving the Design of Existing Code. Addison-WesleyGoogle Scholar
  18. Gamma E, Helm R, Johnson RE, Vlissides J (1995) Design patterns: elements of reusable object-oriented software. Addison-WesleyGoogle Scholar
  19. Godfrey MW, Zou L (2005) Using origin analysis to detect merging and splitting of source code entities. IEEE Trans Softw Eng 31(2):166–181CrossRefGoogle Scholar
  20. Hou D, Mo L (2013) Content categorization of api discussions. In: ICSM, pp 60–69Google Scholar
  21. Hou D, Yao X (2011) Exploring the intent behind api evolution: a case study. In: WCRE, pp 131–140Google Scholar
  22. Kawrykow D, Robillard MP (2009) Improving api usage through automatic detection of redundant code. In: Proceedings of the 2009 IEEE/ACM International Conference on Automated Software Engineering, ser. ASE ’09. Washington, DC, USA: IEEE Computer Society, pp 111–122Google Scholar
  23. Kim M, Cai D, Kim S (2011) An empirical investigation into the role of api-level refactorings during software evolution. In: Proceedings of the 33rd International Conference on Software Engineering, ser. ICSE ’11. New York, NY, USA: ACM, pp 151–160Google Scholar
  24. Kim M, Notkin D, Grossman D (2007) Automatic inference of structural changes for matching across program versions. In: ICSE ’07: Proceedings of the 29th international conference on Software Engineering.Washington, DC, USA: IEEE Computer Society, pp 333–343Google Scholar
  25. Kpodjedo S, Ricca F, Galinier P, Antoniol G, Guéhéneuc Y-G (2013) Madmatch: Many-to-many approximate diagram matching for design comparison. IEEE Trans Softw Eng 39(8):1090–1111CrossRefGoogle Scholar
  26. Lämmel R, Pek E, Starek J (2011) Large-scale, ast-based api-usage analysis of open-source java projects. In: Proceedings of the 2011 ACM Symposium on Applied Computing, ser. SAC ’11. New York, NY, USA: ACM, pp 1317–1324Google Scholar
  27. Linares-Vásquez M, Bavota G, Di Penta M, Oliveto R, Poshyvanyk D (2014) How do api changes trigger stack overflow discussions? A study on the android sdk. In: Proceedings of the 22Nd International Conference on Program Comprehension, ser. ICPC 2014. New York, NY, USA: ACM, pp 83–94Google Scholar
  28. Maalej W, Robillard MP (2013) Patterns of knowledge in api reference documentation. IEEE Trans Softw Eng 39(9):1264–1282CrossRefGoogle Scholar
  29. McDonnell T, Ray B, Kim M (2013) An empirical study of api stability and adoption in the android ecosystem. In: Proceedings of the 2013 IEEE International Conference on Software Maintenance, ser. ICSM ’13. Washington, DC, USA: IEEE Computer Society, pp 70–79Google Scholar
  30. Meng S, Wang X, Zhang L, Mei H (2012) A history-based matching approach to identification of framework evolution. In: Proceedings of 34th International Conference on Software Engineering, ser. ICSE 2012, pp 353–363Google Scholar
  31. Mikhajlov L., Sekerinski E (1998) A study of the fragile base class problem. In: EUROPEAN CONFERENCE ON OBJECT-ORIENTED PROGRAMMING, ser. ECOOP’98. Springer, pp 355–382Google Scholar
  32. Montandon JE, Borges H, Felix D, Valente MT (2013) Documenting apis with examples: Lessons learned with the apiminer platform. In: WCRE, IEEE, pp 401–408Google Scholar
  33. Moritz E, Vásquez ML, Poshyvanyk D, Grechanik M, McMillan C, Gethers M (2013) Export: detecting and visualizing api usages in large source code repositories. In: ASE, pp 646–651Google Scholar
  34. Nguyen HA, Nguyen TT, Wilson Jr.G., Nguyen AT, Kim M, Nguyen TN (2010) A graph-based approach to api usage adaptation. In: Proceedings of the ACM international conference on Object oriented programming systems languages and applications, ser. OOPSLA ’10. New York, NY, USA: ACM, pp 302–321Google Scholar
  35. Pearson K (1922) On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling. Philosophical Magazine Series 5 50 (302):157–175CrossRefMATHGoogle Scholar
  36. Raemaekers S, van Deursen A, Visser J (2012) Measuring software library stability through historical version analysis. In: Proceedings of the, 2012, IEEE International Conference on Software Maintenance (ICSM), ser. ICSM ’12. Washington, DC, USA: IEEE Computer Society, pp 378–387Google Scholar
  37. Raemaekers S, van Deursen A, Visser J (2014) Semantic versioning versus breaking changes: a study of the maven repository. In: 14th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2014). Victoria (Canada), 28-29 Sept. 2014 IEEE Computer SocietyGoogle Scholar
  38. Robbes R, Lungu M, Röthlisberger D (2012) How do developers react to api deprecation?: The case of a smalltalk ecosystem. In: Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering, ser. FSE ’12. New York, NY, USA: ACM, pp 56:1–56:11Google Scholar
  39. Robillard MP, DeLine R (2011) A field study of api learning obstacles. Empir Softw Eng 16(6):703–732CrossRefGoogle Scholar
  40. Tempero E, Anslow C, Dietrich J, Han T, Li J, Lumpe M, Melton H, Noble J (2010) Qualitas corpus: a curated collection of java code for empirical studies. In: 2010 Asia Pacific Software Engineering Conference (APSEC2010), pp 336–345Google Scholar
  41. Schärli N, Ducasse S, Nierstrasz O, Black A (2003) Traits: Composable units of behaviour. In: CardellLucai L (ed) Proceedings of the European Conference on Object-oriented Programming. [Online]. Available. doi:10.1007/978-3-540-45070-2_12. Springer, pp 248–274
  42. Schäfer T, Jonas J, Mezini M (2008) Mining framework usage changes from instantiation code. In: ICSE ’08: Proceedings of the 30th international conference on Software engineering. New York, NY, USA: ACM, pp 471–480Google Scholar
  43. Shah SMA, Dietrich J, McCartin C (2013) On the automation of dependency-breaking refactorings in java. In: Proceedings of the 2013 IEEE International Conference on Software Maintenance, ser. ICSM ’13. Washington, DC, USA: IEEE Computer Society, pp 160–169Google Scholar
  44. Sheskin DJ (2007) Handbook of parametric and nonparametric statistical procedures, 4th edn. Chapman & AllGoogle Scholar
  45. Shi L, Zhong H, Xie T, Li M (2011) An empirical study on evolution of API documentation. In: Proceedings International Conference on Fundamental Approaches to Software Engineering (FASE 2011), pp 416–431Google Scholar
  46. Thummalapenta S, Xie T (2008) Spotweb: Detecting framework hotspots and coldspots via mining open source code on the web. In: Proceedings of the 2008 23rd IEEE/ACM International Conference on Automated Software Engineering, ser. ASE ’08. Washington, DC, USA: IEEE Computer Society, pp 327–336Google Scholar
  47. Tonelli T, Czarnecki K, Lämmel R (2010) Swing to SWT and back: Patterns for API migration by wrapping. In: 26th IEEE International Conference on Software Maintenance (ICSM 2010), September 12-18, 2010, Timisoara, Romania. IEEE Computer Society, pp 1–10Google Scholar
  48. Wohlin C, Runeson P, Höst M (1999) Experimentation in software engineering: an introduction. SpringerGoogle Scholar
  49. Wu W, Adams B, Guéhéneuc Y-G, Antoniol G (2014) Acua: Api change and usage auditor. In: 4th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM), ser. SCAM’14Google Scholar
  50. Wu W, Guéhéneuc Y-G, Antoniol G, Kim M (2010) Aura: a hybrid approach to identify framework evolution. In: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1, ser. ICSE ’10. New York, NY, USA: ACM, pp 325–334Google Scholar
  51. Wu W, Serveaux A, Guéhéneuc Y-G, Antoniol G (2014) The impact of imperfect change rules on framework api evolution identi cation:an empirical study, Empirical Software Engineering, vol. In PressGoogle Scholar
  52. Xing Z, Stroulia E (2007) Differencing logical uml models. Autom Softw Eng 14(2):215–259CrossRefGoogle Scholar
  53. Xing Z, Stroulia E (2007) API-evolution support with diff-CatchUp. IEEE Trans Softw Eng 33(12):818–836CrossRefGoogle Scholar
  54. Zhong H, Thummalapenta S, Xie T, Zhang L, Wang Q (2010) Mining api mapping for language migration. In: Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1, ser. ICSE ’10. New York, NY, USA: ACM, pp 195–204Google Scholar

Copyright information

© Springer Science+Business Media New York 2015

Authors and Affiliations

  • Wei Wu
    • 1
  • Foutse Khomh
    • 1
  • Bram Adams
    • 1
  • Yann-Gaël Guéhéneuc
    • 1
  • Giuliano Antoniol
    • 1
  1. 1.DGIGLÉcole Polytechnique de MontréalQuebecCanada

Personalised recommendations