Write a Blog >>
SPLASH 2017
Sun 22 - Fri 27 October 2017 Vancouver, Canada
Thu 26 Oct 2017 14:15 - 14:37 at Regency A - Mining Software Repositories and Parsing Chair(s): Wolfgang De Meuter

Java 8 retrofitted lambda expressions, a core feature of functional programming, into a mainstream object-oriented language with an imperative paradigm. However, we do not know how Java developers have adapted to the functional style of thinking, and more importantly, what are the reasons motivating Java developers to adopt functional programming. Without such knowledge, researchers miss opportunities to improve the state of the art, tool builders use unrealistic assumptions, language designers fail to improve upon their designs, and developers are unable to explore efficient and effective use of lambdas.

We present the first large-scale, quantitative and qualitative empirical study to shed light on how imperative programmers use lambda expressions as a gateway into functional thinking. Particularly, we statically scrutinize the source code of 241 open-source projects with 19,770 contributors, to study the characteristics of 100,540 lambda expressions. Moreover, we investigate the historical trends and adoption rates of lambdas in the studied projects. To get a complementary perspective, we seek the underlying reasons on why developers introduce lambda expressions, by surveying 97 developers who are introducing lambdas in their projects, using the firehouse interview method.

Among others, our findings revealed an increasing trend in the adoption of lambdas in Java: in 2016, the ratio of lambdas introduced per added line of code increased by 54% compared to 2015. Lambdas were used for various reasons, including but not limited to (i) making existing code more succinct and readable, (ii) avoiding code duplication, and (iii) simulating lazy evaluation of functions. Interestingly, we found out that developers are using Java's built-in functional interfaces inefficiently, i.e., they prefer to use general functional interfaces over the specialized ones, overlooking the performance overheads that might be imposed. Furthermore, developers are not adopting techniques from functional programming, e.g., currying. Finally, we present the implications of our findings for researchers, tool builders, language designers, and developers.

Thu 26 Oct

Displayed time zone: Tijuana, Baja California change

13:30 - 15:00
Mining Software Repositories and ParsingOOPSLA at Regency A
Chair(s): Wolfgang De Meuter Vrije Universiteit Brussel
13:30
22m
Talk
Exploiting Implicit Beliefs to Resolve Sparse Usage Problem in Usage-Based Specification Mining
OOPSLA
Samantha Syeda Khairunnesa Iowa State University, Hoan Anh Nguyen Iowa State University, USA, Tien N. Nguyen University of Texas at Dallas, Hridesh Rajan Iowa State University
DOI
13:52
22m
Talk
DéjàVu: A Map of Code Duplicates on GitHub
OOPSLA
Crista Lopes University of California, Irvine, Petr Maj ReactorLabs, Pedro Martins University of California at Irvine, USA, Vaibhav Saini University of California at Irvine, USA, Di Yang University of California at Irvine, USA, Jakub Zitny Czech Technical University, Czechia, Hitesh Sajnani Microsoft , Jan Vitek Northeastern University, USA
DOI
14:15
22m
Talk
Understanding the Use of Lambda Expressions in Java
OOPSLA
Davood Mazinanian Concordia University, Canada, Ameya Ketkar Oregon State University, USA, Nikolaos Tsantalis Concordia University, Canada, Danny Dig School of EECS at Oregon State University
DOI
14:37
22m
Talk
Restricting Grammars with Tree Automata
OOPSLA
Michael D. Adams University of Utah, USA, Matthew Might University of Utah, USA
DOI