Proactive Empirical Assessment of New Language Feature Adoption via Automated Refactoring: The Case of Java 8 Default Methods

03/27/2018
by   Raffi Khatchadourian, et al.
0

Programming languages and platforms improve over time, sometimes resulting in new language features that offer many benefits. However, despite these benefits, developers may not always be willing to adopt them in their projects for various reasons. In this paper, we describe an empirical study where we assess the adoption of a particular new language feature. Studying how developers use (or do not use) new language features is important in programming language research and engineering because it gives designers insight into the usability of the language to create meaning programs in that language. This knowledge, in turn, can drive future innovations in the area. Here, we explore Java 8 default methods, which allow interfaces to contain (instance) method implementations. Default methods can ease interface evolution, make certain ubiquitous design patterns redundant, and improve both modularity and maintainability. A focus of this work is to discover, through a scientific approach and a novel technique, situations where developers found these constructs useful and where they did not, and the reasons for each. Although several studies center around assessing new language features, to the best of our knowledge, this kind of construct has not been previously considered. Despite their benefits, we found that developers did not adopt default methods in all situations. Our study consisted of submitting pull requests introducing the language feature to 19 real-world, open source Java projects without altering original program semantics. This novel assessment technique is proactive in that the adoption was driven by an automatic refactoring approach rather than waiting for developers to discover and integrate the feature themselves. In this way, we set forth best practices and patterns of using the language feature effectively earlier rather than later and are able to possibly guide (near) future language evolution. We foresee this technique to be useful in assessing other new language features, design patterns, and other programming idioms.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/27/2023

Multilingual Code Co-Evolution Using Large Language Models

Many software projects implement APIs and algorithms in multiple program...
research
07/09/2021

How to Identify Class Comment Types? A Multi-language Approach for Class Comment Classification

Most software maintenance and evolution tasks require developers to unde...
research
03/15/2019

Automatically Generating Documentation for Lambda Expressions in Java

When lambda expressions were introduced to the Java programming language...
research
03/17/2023

TypeScript's Evolution: An Analysis of Feature Adoption Over Time

TypeScript is a quickly evolving superset of JavaScript with active deve...
research
12/10/2019

Usability Methods for Designing Programming Languages for Software Engineers

Programming language design requires making many usability-related desig...
research
10/11/2021

User-driven Design and Evaluation of Liquid Types in Java

Bugs that are detected earlier during the development lifecycle are easi...
research
07/30/2019

An Empirical Study of GraphQL Schemas

GraphQL is a query language for APIs and a runtime to execute queries. U...

Please sign up or login with your details

Forgot password? Click here to reset