Empirical Software Engineering

, Volume 22, Issue 5, pp 2612–2657 | Cite as

Fragile base-class problem, problem?

  • Aminata Sabané
  • Yann-Gaël Guéhéneuc
  • Venera Arnaoudova
  • Giuliano Antoniol
Article

Abstract

The fragile base-class problem (FBCP) has been described in the literature as a consequence of “misusing” inheritance and composition in object-oriented programming when (re)using frameworks. Many research works have focused on preventing the FBCP by proposing alternative mechanisms for reuse, but, to the best of our knowledge, there is no previous research work studying the prevalence and impact of the FBCP in real-world software systems. The goal of our work is thus twofold: (1) assess, in different systems, the prevalence of micro-architectures, called FBCS, that could lead to two aspects of the FBCP, (2) investigate the relation between the detected occurrences and the quality of the systems in terms of change and fault proneness, and (3) assess whether there exist bugs in these systems that are related to the FBCP. We therefore perform a quantitative and a qualitative study. Quantitatively, we analyse multiple versions of seven different open-source systems that use 58 different frameworks, resulting in 301 configurations. We detect in these systems 112,263 FBCS occurrences and we analyse whether classes playing the role of sub-classes in FBCS occurrences are more change and–or fault prone than other classes. Results show that classes participating in the analysed FBCS are neither more likely to change nor more likely to have faults. Qualitatively, we conduct a survey to confirm/infirm that some bugs are related to the FBCP. The survey involves 41 participants that analyse a total of 104 bugs of three open-source systems. Results indicate that none of the analysed bugs is related to the FBCP. Thus, despite large, rigorous quantitative and qualitative studies, we must conclude that the two aspects of the FBCP that we analyse may not be as problematic in terms of change and fault-proneness as previously thought in the literature. We propose reasons why the FBCP may not be so prevalent in the analysed systems and in other systems in general.

Keywords

Inheritance Overriding Composition Fragile base-class Change proneness Fault proneness Empirical study 

References

  1. Aldrich J (2004) Selective open recursion: A solution to the fragile base class problem. School of Computer Science Carnegie Mellon UniversityGoogle Scholar
  2. An L, Khomh F, Adams B (2014) Supplementary bug fixes vs. re-opened bugs. In: 2014 IEEE 14th International Working Conference on Source Code Analysis and Manipulation (SCAM)Google Scholar
  3. Biberstein M, Sreedhar VC, Zaks A (2002) A case for sealing classes in Java. In: Israeli Workshop on Programming Languages & Development EnvironmentsGoogle Scholar
  4. Bloch J (2008) Effective java, 2nd edn. Addison-WesleyGoogle Scholar
  5. Briand LC, Wüst J, Daly J, Porter DV (2000) Exploring the relationship between design measures and software quality in object-oriented systems. J Syst Softw 51:245–273CrossRefGoogle Scholar
  6. Daly J, Brooks A, Miller J, Roper M, Wood M (1996) Evaluating inheritance depth on the maintainability of object-oriented software. J Empir Softw Eng 1:109–132CrossRefGoogle Scholar
  7. Ducasse S, Nierstrasz O, Schärli N, Wuyts R, Black AP (2006) Traits: A mechanism for fine-grained reuse. ACM Trans Program Lang Syst 28(2):331–388CrossRefGoogle Scholar
  8. Gamma E, Helm R, Johnson R, Vlissides j (1995). Addison-Wesley, MA, USAGoogle Scholar
  9. Ghezzi C, Monga M (2002) Fostering component evolution with C# attributes. In: Proceedings of the International Workshop on Principles of Software Evolution. ACM, pp 22–28Google Scholar
  10. Groves RM, Fowler FJ Jr, Couper MP, Lepkowski JM, Singer E, Tourangeau R (2009) Survey methodology, 2nd edn. WileyGoogle Scholar
  11. Guéhéneuc Y (2007) Ptidej: A flexible reverse engineering tool suite. In: IEEE International Conference on Software Maintenance, 2007. ICSM 2007, pp 529–530Google Scholar
  12. Guéhéneuc Y-G, Albin-Amiot H (2004) Recovering binary class relationships: Putting icing on the uml cake. In: Schmidt DC (ed) Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM PressGoogle Scholar
  13. Guéhéneuc Y-G, Antoniol G (2008) DeMIMA: A multi-layered framework for design pattern identification. IEEE Trans Softw Eng:34Google Scholar
  14. Harrison R, Counsell S, Nithi R (2000) Experimental assessment of the effect of inheritance on the maintainability of object-oriented systems. J Syst Softw 52:173–179CrossRefGoogle Scholar
  15. Hürsch W (1994) Should superclasses be abstract? In: Tokoro M, Pareschi R (eds) Proceedings of the European Conference on Object-Oriented Programming, volume 821 of Lecture Notes in Computer Science. Springer, pp 12–31Google Scholar
  16. IBM (1994) IBM’S system object model (SOM): Making reuse a reality. White paper, IBM Corporation, Object Technology Products GroupGoogle Scholar
  17. Kegel H, Steimann F (2008) Systematically refactoring inheritance to delegation in Java. In: Proceedings of the International Conference on Software Engineering. ACM, pp 431–440Google Scholar
  18. Khomh F, Penta MD, Guéhéneuc Y-G, Antoniol G (2011) An exploratory study of the impact of antipatterns on class change- and fault-proneness. Empirical Software Engineering (EMSE)Google Scholar
  19. Kiczales G, Lamping J (1992) Issues in the design and speciffication of class libraries. In: Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp 435–451Google Scholar
  20. Mens T (2002) A state-of-the-art survey on software merging. IEEE Trans Softw Eng 28:449–462CrossRefGoogle Scholar
  21. Mezini M (1997) Maintaining the consistency of class libraries during their evolution. SIGPLAN Not 32:1–21CrossRefGoogle Scholar
  22. Mezini M, Pipka JU, Dittmar T, Boot W (1999) Detecting evolution incompatibilities by analyzing java binaries. In: Proceedings of the Technology of Object-Oriented Languages and Systems. IEEE CS Press, pp 126–135Google Scholar
  23. Mikhajlov L, Sekerinski E (1998) A study of the fragile base class problem. In: Proceedings of the European Conference on Object-Oriented Programming, pp 355–382Google Scholar
  24. Ozaki H, Gondow K, Katayama T (2003) Class refinement for software evolution. In: Proceedings of the International Workshop on Principles of Software Evolution. IEEE CS Press, pp 51–56Google Scholar
  25. Parkinson MJ, Bierman GM (2008) Separation logic, abstraction and inheritance. SIGPLAN Not 43:75–86CrossRefMATHGoogle Scholar
  26. Robbes R, Rthlisberger D, Tanter R (2015) Empir Softw Eng 20(3):745–782CrossRefGoogle Scholar
  27. Ruby C, Leavens GT (2000) Safely creating correct subclasses without seeing superclass code. SIGPLAN Not 35:208–228CrossRefGoogle Scholar
  28. Sheskin DJ (2007a) Handbook of parametric and nonparametric statistical procedures, 4th edn. Chapman & Hall/CRCGoogle Scholar
  29. Sheskin DJ (2007b) Handbook of parametric and nonparametric statistical procedures, 4th edn. Chapman & AllGoogle Scholar
  30. Snyder A (1986) Encapsulation and inheritance in object-oriented programming languages. In: Proceedings of the International Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp 38–45Google Scholar
  31. Steyaert P, Lucas C, Mens K, D’Hondt T (1996) Reuse contracts: Managing the evolution of reusable assets. SIGPLAN Not 31:268–285CrossRefGoogle Scholar
  32. Taenzer D, Gandi M, Podar S (1989) Problems in object-oriented software reuse. In: Proceedings of the European Conference on Object-Oriented Programming. Cambridge University Press, pp 25–38Google Scholar
  33. Tempero E, Counsell S, Noble J (2010) An empirical study of overriding in open source java. In: Proceedings of the Australasian Computer Science Conference, Australian Computer Society, Inc, pp 3–12Google Scholar
  34. Tempero E, Noble J, Melton H (2008) How do java programs use inheritance? An empirical study of inheritance in java software. In: Proceedings of the European Conference on Object-Oriented Programming. Springer, pp 667–691Google Scholar
  35. Wegner P, Zdonik S (1988) Inheritance as an incremental modification mechanism or what like is and isnt like. In: Proceedings of the European Conference on Object-Oriented Programming, volume 322 of Lecture Notes in Computer Science. Springer, Berlin Heidelberg, pp 55–77Google Scholar
  36. Williams S, Kinde C (1994) The component object model: Technical overview. Dr. Dobbs JournalGoogle Scholar
  37. Wohlin C, Runeson P, Höst M, Ohlsson MC, Regnell B, Wesslén A (2000) Experimentation in software engineering - an introduction. Kluwer Academic PublishersGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2016

Authors and Affiliations

  • Aminata Sabané
    • 1
  • Yann-Gaël Guéhéneuc
    • 1
  • Venera Arnaoudova
    • 2
  • Giuliano Antoniol
    • 1
  1. 1.Ecole Polytechnique de MontréalMontrealCanada
  2. 2.Washington State UniversityWashingtonUSA

Personalised recommendations