Nothing Special   »   [go: up one dir, main page]

skip to main content
10.5555/2820282.2820311acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Polymorphism in the spotlight: studying its prevalence in Java and Smalltalk

Published: 16 May 2015 Publication History

Abstract

Subtype polymorphism is a cornerstone of object-oriented programming. By hiding variability in behavior behind a uniform interface, polymorphism decouples clients from providers and thus enables genericity, modularity and extensibility. At the same time, however, it scatters the implementation of the behavior over multiple classes thus potentially hampering program comprehension.
The extent to which polymorphism is used in real programs and the impact of polymorphism on program comprehension are not very well understood. We report on a preliminary study of the prevalence of polymorphism in several hundred open source software systems written in Smalltalk, one of the oldest object-oriented programming languages, and in Java, one of the most widespread ones.
Although a large portion of the call sites in these systems are polymorphic, a majority have a small number of potential candidates. Smalltalk uses polymorphism to a much greater extent than Java. We discuss how these findings can be used as input for more detailed studies in program comprehension and for better developer support in the IDE.

References

[1]
A. Arcuri and L. C. Briand. A practical guide for using statistical tests to assess randomized algorithms in software engineering. In Proceedings of the 33rd International Conference on Software Engineering, (ICSE 2011), pages 1--10, 2011.
[2]
D. F. Bacon and P. F. Sweeney. Fast static analysis of C++ virtual function calls. SIGPLAN Not., 31(10):324--341, Oct. 1996.
[3]
B. Boehm and V. R. Basili. Software defect reduction top 10 list. Computer, 34(1):135--137, Jan. 2001.
[4]
A. Caracciolo, A. Chis, B. Spasojević, and M. Lungu. Pangea: A workbench for statically analyzing multi-language software corpora. In Source Code Analysis and Manipulation (SCAM), 2014 IEEE 14th International Working Conference on, pages 71--76. IEEE, Sept. 2014.
[5]
M. Cartwright. An empirical view of inheritance. Information Software Technology, 40(14):795--799, 1998.
[6]
J. Daly, A. Brooks, J. Miller, M. Roper, and M. Wood. Evaluating inheritance depth on the maintainability of object-oriented software. Empirical Software Engineering, 1:109--132, 1996.
[7]
J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In W. Olthoff, editor, Proceedings ECOOP '95, volume 952 of LNCS, pages 77--101, Aarhus, Denmark, Aug. 1995. Springer-Verlag.
[8]
S. Demeyer, S. Ducasse, K. Mens, A. Trifu, and R. Vasa. Report of the ECOOP'03 workshop on object-oriented reengineering. In Object-Oriented Technology (ECOOP'03 Workshop Reader), LNCS, pages 72--85. Springer-Verlag, 2003.
[9]
S. Ducasse, T. Gîrba, and O. Nierstrasz. Moose: an agile reengineering environment. In Proceedings of ESEC/FSE 2005, pages 99--102, Sept. 2005. Tool demo.
[10]
A. Dunsmore, M. Roper, and M. Wood. Object-oriented inspection in the face of delocalisation. In Proceedings of ICSE '00 (22nd International Conference on Software Engineering), pages 467--476. ACM Press, 2000.
[11]
M. Grechanik, C. McMillan, L. DeFerrari, M. Comi, S. Crespi, D. Poshyvanyk, C. Fu, Q. Xie, and C. Ghezzi. An empirical investigation into a large-scale Java open source code repository. In Proceedings of ESEM 2010, pages 11:1--11:10. ACM, 2010.
[12]
A. Hamou-Lhadj, E. Braun, D. Amyot, and T. Lethbridge. Recovering behavioral design models from execution traces. In Proceedings IEEE European Conference on Software Maintenance and Reengineering (CSMR 2005), pages 112--121, Los Alamitos CA, 2005. IEEE Computer Society Press.
[13]
R. Harrison, S. Counsell, and R. Nithi. Experimental assessment of the effect of inheritance on the maintainability of object-oriented systems. Journal of System and Software, 52:173--179, June 2000.
[14]
M. Lungu, M. Lanza, and O. Nierstrasz. Evolutionary and collaborative software architecture recovery with Softwarenaut. Science of Computer Programming, 79(0):204--223, 2014.
[15]
C. Parnin, C. Bird, and E. R. Murphy-Hill. Java generics adoption: how new features are introduced, championed, or ignored. In MSR 2011: Proceedings of the 8th International Working Conference on Mining Software Repositories, pages 3--12, 2011.
[16]
D. Posnett, V. Filkov, and P. Devanbu. Ecological inference in empirical software engineering. In Proceedings of the 26th ACM/IEEE International Conference on Automated Software Engineering (ASE 2011), pages 362--371, 2011.
[17]
R. Robbes, M. Lungu, and D. Roethlisberger. How do developers react to API deprecation? The case of a Smalltalk ecosystem. In Proceedings of the 20th International Symposium on the Foundations of Software Engineering (FSE'12), pages 56:1--56:11, 2012.
[18]
D. Röthlisberger, M. Härry, A. Villazón, D. Ansaloni, W. Binder, O. Nierstrasz, and P. Moret. Augmenting static source views in IDEs with dynamic metrics. In Proceedings of the 25th International Conference on Software Maintenance (ICSM 2009), pages 253--262, Los Alamitos, CA, USA, 2009. IEEE Computer Society.
[19]
E. Tempero, C. Anslow, J. Dietrich, T. Han, J. Li, M. Lumpe, H. Melton, and J. Noble. The Qualitas Corpus: A curated collection of Java code for empirical studies. In Software Engineering Conference (APSEC), 2010 17th Asia Pacific, pages 336--345, Dec. 2010.
[20]
E. Tempero, J. Noble, and H. Melton. How do Java programs use inheritance? An empirical study of inheritance in Java software. In Proceedings of the 22nd European conference on Object-Oriented Programming (ECOOP 2008), pages 667--691. Springer-Verlag, 2008.
[21]
A. Vargha and H. D. Delaney. 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.
[22]
N. Wilde and R. Huitt. Maintenance support for object-oriented programs. IEEE Transactions on Software Engineering, SE-18(12):1038--1044, Dec. 1992.

Cited By

View all
  • (2018)Teaching Object Oriented Programming Concepts Through a Mobile Serious GameProceedings of the 3rd International Conference on Smart City Applications10.1145/3286606.3286851(1-6)Online publication date: 10-Oct-2018
  • (2017)Exploiting type hints in method argument names to improve lightweight type inferenceProceedings of the 25th International Conference on Program Comprehension10.1109/ICPC.2017.33(77-87)Online publication date: 20-May-2017
  • (2017)It's duck (typing) season!Proceedings of the 25th International Conference on Program Comprehension10.1109/ICPC.2017.10(312-315)Online publication date: 20-May-2017

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ICPC '15: Proceedings of the 2015 IEEE 23rd International Conference on Program Comprehension
May 2015
325 pages

Sponsors

Publisher

IEEE Press

Publication History

Published: 16 May 2015

Check for updates

Author Tags

  1. object-oriented programming
  2. polymorphism
  3. programming environments
  4. programming languages

Qualifiers

  • Research-article

Conference

ICSE '15
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 21 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2018)Teaching Object Oriented Programming Concepts Through a Mobile Serious GameProceedings of the 3rd International Conference on Smart City Applications10.1145/3286606.3286851(1-6)Online publication date: 10-Oct-2018
  • (2017)Exploiting type hints in method argument names to improve lightweight type inferenceProceedings of the 25th International Conference on Program Comprehension10.1109/ICPC.2017.33(77-87)Online publication date: 20-May-2017
  • (2017)It's duck (typing) season!Proceedings of the 25th International Conference on Program Comprehension10.1109/ICPC.2017.10(312-315)Online publication date: 20-May-2017

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media