Extensions during Software Evolution: Do Objects Meet Their Promise?
As software evolves, data types have to be extended, possibly with new data variants or new operations. Object-oriented design is well-known to support data extensions well. In fact, most popular books showcase data extensions to illustrate how objects adequately support software evolution. Conversely, operation extensions are typically better supported by a functional design. A large body of programming language research has been devoted to the challenge of properly supporting both kinds of extensions.
While this challenge is well-known from a language design standpoint, it has not been studied empirically. We perform such a study on a large sample of Smalltalk projects (over half a billion lines of code) and their evolution over more than 100,000 committed changes.
Our study of extensions during software evolution finds that extensions are indeed prevalent evolution tasks, and that both kinds of extensions are equally common in object-oriented software. We also discuss findings about the evolution of the kinds of extensions over time, and about the viability of the Visitor pattern as an object-oriented solution to operation extensions. This study suggests that object-oriented design alone is not sufficient, and that practical support for both kinds of program decomposition approaches are in fact needed, either by the programming language or by the development environment.
KeywordsSoftware Evolution Data Extension Operation Extension Normal Hierarchy Class Hierarchy
Unable to display preview. Download preview PDF.
- 1.Arcuri, A., Briand, L.C.: A practical guide for using statistical tests to assess randomized algorithms in software engineering. In: Proceedings of ICSE 2011, pp. 1–10 (2011)Google Scholar
- 2.Aversano, L., Canfora, G., Cerulo, L., Del Grosso, C., Di Penta, M.: An empirical study on the evolution of design patterns. In: Proceedings of ESEC/SIGSOFT FSE 2007, pp. 385–394 (2007)Google Scholar
- 3.Baxter, G., Frean, M.R., Noble, J., Rickerby, M., Smith, H., Visser, M., Melton, H., Tempero, E.D.: Understanding the shape of Java software. In: Proceedings of OOPSLA 2006, pp. 397–412 (2006)Google Scholar
- 4.Booch, G.: Object-Oriented Analysis and Design with Applications, 2nd edn. Addison-Wesley (1994)Google Scholar
- 7.Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Professional Computing Series. Addison-Wesley (October 1994)Google Scholar
- 8.Gîrba, T., Lanza, M., Ducasse, S.: Characterizing the evolution of class hierarchies. In: Proceedings of CSMR 2005, pp. 2–11 (2005)Google Scholar
- 9.Gorschek, T., Tempero, E.D., Angelis, L.: A large-scale empirical study of practitioners’ use of object-oriented concepts. In: Proceedings of ICSE 2010, pp. 115–124 (2010)Google Scholar
- 10.Grechanik, M., McMillan, C., DeFerrari, L., Comi, M., Crespi, S., Poshyvanyk, D., Fu, C., Xie, Q., Ghezzi, C.: An empirical investigation into a large-scale java open source code repository. In: Proceedings of ESEM 2010, pp. 11:1–11:10 (2010)Google Scholar
- 11.Kapser, C.J., Godfrey, M.W.: Supporting the analysis of clones in software systems: A case study. Journal of Software Maintenance and Evolution: Research and Practice 18 (2006)Google Scholar
- 13.Lehman, M., Belady, L.: Program Evolution: Processes of Software Change. London Academic Press, London (1985)Google Scholar
- 14.Mayrand, J., Leblanc, C., Merlo, E.M.: Experiment on the automatic detection of function clones in a software system using metrics. In: Proceedings of Software Maintenance, pp. 244–253 (November 1996)Google Scholar
- 16.Pearl, J.: Why there is no statistical test for confounding, why many think there is, and why they are almost right. Technical report, Department of Statistics, University of California, Los Angeles (1998)Google Scholar
- 17.Posnett, D., Filkov, V., Devanbu, P.: Ecological inference in empirical software engineering. In: Proceedings of ASE 2011, pp. 362–371 (2011)Google Scholar
- 18.Reynolds, J.C.: User-defined types and procedural data structures as complementary approaches to data abstraction. In: New Advances in Algorithmic Languages, pp. 157–168 (1975)Google Scholar
- 19.Robbes, R., Lungu, M.: A study of ripple effects in software ecosystems. In: Proceedings of ICSE 2011, NIER Track, Honolulu, Hawaii, USA, pp. 904–907. ACM Press (May 2011)Google Scholar
- 20.Van Rysselberghe, F., Demeyer, S.: Studying versioning information to understand inheritance hierarchy changes. In: Proceedings of MSR 2007, p. 16 (2007)Google Scholar
- 21.Schwarz, N., Lungu, M., Robbes, R.: On how often code is cloned across repositories. In: Proceedings of ICSE 2012, NIER Track (2012)Google Scholar
- 22.Shalloway, A., Trott, J.R.: Design Patterns Explained: A New Perspective on Object-Oriented Design, 2nd edn. Addison-Wesley (2004)Google Scholar
- 25.Vargha, A., Delaney, H.D.: A critique and improvement of the cl common language effect size statistics of McGraw and Wong. Journal of Educational and Behavioral Statistics 25(2), 101–132 (2000)Google Scholar
- 26.Wadler, P.: The expression problem. Mail to the java-genericity mailing list (1998)Google Scholar
- 27.Zenger, M., Odersky, M.: Independently extensible solutions to the expression problem. In: Proceedings of FOOL 2005, Long Beach, USA (January 2005)Google Scholar