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.
Similar content being viewed by others
References
Aldrich J (2004) Selective open recursion: A solution to the fragile base class problem. School of Computer Science Carnegie Mellon University
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)
Biberstein M, Sreedhar VC, Zaks A (2002) A case for sealing classes in Java. In: Israeli Workshop on Programming Languages & Development Environments
Bloch J (2008) Effective java, 2nd edn. Addison-Wesley
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–273
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–132
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–388
Gamma E, Helm R, Johnson R, Vlissides j (1995). Addison-Wesley, MA, USA
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–28
Groves RM, Fowler FJ Jr, Couper MP, Lepkowski JM, Singer E, Tourangeau R (2009) Survey methodology, 2nd edn. Wiley
Guéhéneuc Y (2007) Ptidej: A flexible reverse engineering tool suite. In: IEEE International Conference on Software Maintenance, 2007. ICSM 2007, pp 529–530
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 Press
Guéhéneuc Y-G, Antoniol G (2008) DeMIMA: A multi-layered framework for design pattern identification. IEEE Trans Softw Eng:34
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–179
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–31
IBM (1994) IBM’S system object model (SOM): Making reuse a reality. White paper, IBM Corporation, Object Technology Products Group
Kegel H, Steimann F (2008) Systematically refactoring inheritance to delegation in Java. In: Proceedings of the International Conference on Software Engineering. ACM, pp 431–440
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)
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–451
Mens T (2002) A state-of-the-art survey on software merging. IEEE Trans Softw Eng 28:449–462
Mezini M (1997) Maintaining the consistency of class libraries during their evolution. SIGPLAN Not 32:1–21
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–135
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–382
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–56
Parkinson MJ, Bierman GM (2008) Separation logic, abstraction and inheritance. SIGPLAN Not 43:75–86
Robbes R, Rthlisberger D, Tanter R (2015) Empir Softw Eng 20(3):745–782
Ruby C, Leavens GT (2000) Safely creating correct subclasses without seeing superclass code. SIGPLAN Not 35:208–228
Sheskin DJ (2007a) Handbook of parametric and nonparametric statistical procedures, 4th edn. Chapman & Hall/CRC
Sheskin DJ (2007b) Handbook of parametric and nonparametric statistical procedures, 4th edn. Chapman & All
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–45
Steyaert P, Lucas C, Mens K, D’Hondt T (1996) Reuse contracts: Managing the evolution of reusable assets. SIGPLAN Not 31:268–285
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–38
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–12
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–691
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–77
Williams S, Kinde C (1994) The component object model: Technical overview. Dr. Dobbs Journal
Wohlin C, Runeson P, Höst M, Ohlsson MC, Regnell B, Wesslén A (2000) Experimentation in software engineering - an introduction. Kluwer Academic Publishers
Acknowledgments
This work has been partly funded by the NSERC Research Chairs in Software Change and Evolution and in Software Patterns and Patterns of Software. The authors are grateful to all the anonymous participants.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by: Richard Paige, Jordi Cabot and Neil Ernst
From an API point of view defining that a method can be overridden is a stronger commitment that defining that a method can be called—Erich Gamma, June 6, 2005.
Rights and permissions
About this article
Cite this article
Sabané, A., Guéhéneuc, YG., Arnaoudova, V. et al. Fragile base-class problem, problem?. Empir Software Eng 22, 2612–2657 (2017). https://doi.org/10.1007/s10664-016-9448-2
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10664-016-9448-2