An experience-based recommendation system to support migrations of Android applications from Java to Kotlin

03/17/2021
by   Bruno Gois Mateus, et al.
0

In 2017, Google announced Kotlin as an official Android programming language, and more recently, as the preferred programming language to build applications. These facts motivated developers to migrate their applications, which is challenging because each migrated piece of code must be tested after the migration to ensure it preserves the expected behavior. Due to the interoperability between Java and Kotlin, most developers decided to migrate their applications gradually. Thus, developers have to decide which file(s) to migrate first on each migration step. However, there are no tools available to help developers make these choices. This paper presents an approach to support a gradual migration of Android applications that given a version of an application written in Java and eventually, in Kotlin, it suggests the most convenient files to migrate. To this end, we built a large-scale corpus of open-source projects that migrated Java files to Kotlin. Then, we trained a learning to rank model using the information extracted from these projects. To validate our model, we verify whether these recommendations made by them correspond to real migrations. The results showed our approach modestly outperforms random approaches. Since most Android applications are written in Java, we conclude that our approach may significantly impact Android applications' development. Therefore, we consider this result is the first step into long-term research towards a model capable of predicting precisely file-level migration, establishing the initial baseline on file migrations.

READ FULL TEXT
research
08/18/2019

Characterizing the transition to Kotlin of Android apps: a study on F-Droid, Play Store and GitHub

Kotlin is a novel language that represents an alternative to Java, and h...
research
05/17/2023

Statically Detecting Buffer Overflow in Cross-language Android Applications Written in Java and C/C++

Many applications are being written in more than one language to take ad...
research
09/07/2023

Interactive, Iterative, Tooled, Rule-Based Migration of Microsoft Access to Web Technologies

In the context of a collaboration with Berger-Levrault, an IT company pr...
research
07/21/2019

On the adoption, usage and evolution of Kotlin Features on Android development

Context: Currently, more than 2 million applications are published on Go...
research
05/20/2021

KotlinDetector: Towards Understanding the Implications of Using Kotlin in Android Applications

Java programming language has been long used to develop native Android m...
research
07/03/2019

NullAway: Practical Type-Based Null Safety for Java

NullPointerExceptions (NPEs) are a key source of crashes in modern Java ...

Please sign up or login with your details

Forgot password? Click here to reset