ABSTRACT
Support for generic programming was added to the Java language in 2004, representing perhaps the most significant change to one of the most widely used programming languages today. Researchers and language designers anticipated this addition would relieve many long-standing problems plaguing developers, but surprisingly, no one has yet measured whether generics actually provide such relief. In this paper, we report on the first empirical investigation into how Java generics have been integrated into open source software by automatically mining the history of 20 popular open source Java programs, traversing more than 500 million lines of code in the process. We evaluate five hypotheses, each based on assertions made by prior researchers, about how Java developers use generics. For example, our results suggest that generics do not significantly reduce the number of type casts and that generics are usually adopted by a single champion in a project, rather than all committers.
- H. Basit, D. Rajapakse, and S. Jarzabek. An empirical study on limits of clone unification using generics. In Proceedings of the International Conference on Software Engineering and Knowledge Engineering, 2005.Google Scholar
- Y. Benjamini and Y. Hochberg. Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing. Journal of the Royal Statistical Society. Series B (Methodological), 57(1):289--300, 1995.Google ScholarCross Ref
- J. Bloch. Effective Java. Prentice-Hall, 2008.Google Scholar
- G. Bracha. Lesson: Generics. Web. http://download.oracle.com/javase/tutorial/ extra/generics/index.html.Google Scholar
- G. Bracha. Generics in the java programming language. Web, July 2005. http://java.sun.com/j2se/1.5/pdf/genericstutorial. pdf.Google Scholar
- A. Donovan, A. Kiezun, M. S. Tschantz, and M. D. Ernst. Converting java programs to use generic libraries. In OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, 2004. Google ScholarDigital Library
- S. Dowdy, S. Wearden, and D. Chilko. Statistics for research. John Wiley & Sons, third edition, 2004.Google Scholar
- N. Ducheneaut. Socialization in an Open Source Software Community: A Socio-Technical Analysis. Computer Supported Cooperative Work, 14(4), 2005. Google ScholarDigital Library
- R. Fuhrer, F. Tip, A. Kiezun, J. Dolby, and M. Keller. Efficiently refactoring Java applications to use generic libraries. Eurpoean Conference on Object Oriented Programming, pages 71--96, 2005. Google ScholarDigital Library
- R. Geiger, B. Fluri, H. Gall, and M. Pinzger. Relation of code clones and change couplings. Fundamental Approaches to Software Engineering, 3922:411--425, 2006. Google ScholarDigital Library
- W. S. Humphreys. A Discipline for Software Engineering. Addison-Wesley Publishing, 1995. Google ScholarDigital Library
- D. Intersimone. New additions to the Java language. Java One 2001 Keynote delivered by James Gosling. Web. http://edn.embarcadero.com/article/27440.Google Scholar
- S. Markstrum. Staking claims: A history of programming language design claims and evidence. In Proceedings of the Workshop on the Evaluation and Usability of Programming Languages and Tools, 2010. Google ScholarDigital Library
- A. Mockus, R. Fielding, and J. Herbsleb. Two case studies of open source software development: Apache and Mozilla. ACM Transactions on Software Engineering and Methodology, 11(3):309--346, 2002. Google ScholarDigital Library
- A. Monden, D. Nakae, T. Kamiya, S. Sato, and K. Matsumoto. Software Quality Analysis by Code Clones in Industrial Legacy Software. In Proceedings of the 8th International Symposium on Software Metrics, 2002. Google ScholarDigital Library
- M. Naftalin and P. Wadler. Java generics and collections. O'Reilly Media, Inc., 2006. Google ScholarDigital Library
- S. O'Mahony and F. Ferraro. The emergence of governance in an open source community. Academy of Management Journal, 50(5):1079--1106, 2007.Google ScholarCross Ref
- V. Pankratius, A. Adl-Tabatabai, and F. Otto. Does Transactional Memory Keep Its Promises?: Results from an Empirical Study. Technical Report 2009--12, Universität Karlsruhe, Fakultät für Informatik, 2009.Google Scholar
- D. Vandevoorde and N. Josuttis. C++ templates: the Complete Guide. Addison-Wesley Professional, 2003. Google ScholarDigital Library
- T. Zimmermann. Fine-grained Processing of CVS Archives with APFEL. In Proceedings of the OOPSLA Workshop on Eclipse Technology eXchange. ACM Press, 2006. Google ScholarDigital Library
Index Terms
- Java generics adoption: how new features are introduced, championed, or ignored
Recommendations
Converting Java classes to use generics
OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsGenerics offer significant software engineering benefits since they provide code reuse without compromising type safety. Thus generics will be added to the Java language in the next release. While this extension to Java will help programmers when they ...
Adoption and use of Java generics
Support for generic programming was added to the Java language in 2004, representing perhaps the most significant change to one of the most widely used programming languages today. Researchers and language designers anticipated this addition would ...
Object and reference immutability using Java generics
ESEC-FSE '07: Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineeringA compiler-checked immutability guarantee provides useful documentation, facilitates reasoning, and enables optimizations. This paper presents Immutability Generic Java (IGJ), a novel language extension that expresses immutability without changing Java'...
Comments