Mining Java language feature usage with Boa

84 views
Skip to first unread message

Robert Dyer

unread,
Jan 31, 2014, 11:33:15 AM1/31/14
to boa-...@googlegroups.com
The Java programming language has had several specifications, adding many new language features over the years.  But how do programmers adopt these new language features?

We are proud to announce a large-scale empirical study to answer this question - which was recently accepted for publication in ICSE 2014!

Our study mines the vast amount of source code data available in Boa.  At the moment this data contains:
  • Over 9 million unique Java source files,
  • the full history for those files, represented by over 28 million snapshots,
  • which in total contain over 18 billion AST nodes!
Some of the interesting results of our study:
  • All new language features are used prior to their official release
  • A handful of language features (enhance-for loops, generic variables, and annotations) see widespread adoption
  • We mined millions of places language features could have been used, but were not
  • We found almost 200k potential resource management bugs that could be fixed by using the new try-with-resources language feature
  • We detected that projects refactor old code to use new language features
  • Most committers only use a small number of new language features
  • New language features are typically adopted by individuals, not entire teams
The results of our study have several implications:
  • IDE support for new language features is critical, including support for suggesting places new features could be used and providing automated refactoring support
  • Further research is needed to understand why developers avoided using new language features
  • Early compiler support for new language features drives their adoption before they are officially released
To make our study as transparent as possible and ease additional analysis by other researchers, we are making all of our Boa queries used in the study available as well as the raw output of those queries and any scripts used to post-process the data for presentation.  This supplementary material can be found here:

http://boa.cs.iastate.edu/java-features/

Finally, if you are interested in reading first-hand the outcomes of this study a pre-print of our paper will be available shortly here:

Reply all
Reply to author
Forward
0 new messages