How and Why did developers migrate Android Applications from Java to Kotlin? A study based on code analysis and interviews with developers

03/28/2020
by   Matias Martinez, et al.
0

Nowadays, the majority of the apps running on mobile devices are Android apps developed in Java. However, developers now have the possibility to write Android applications using a new programming language: Kotlin. Android developers can: a) start writing an Android application from scratch using Koltin, b) evolve their existing Android applications written in Java by adding Kotlin code (that is possible thanks to the interoperability between those languages), or c) migrate their Android apps from Java to Kotlin. This paper aims at studying this latter case. We want to know Why and How Android developers have migrated Java code to Kotlin. For that, we first built a tool, named MigA, which analyzes the history of applications having Java and Kotlin code and is able to detect commits that migrate code. We executed MigA on a dataset with 374 Android applications. Then, we interviewed 78 developers from those applications that have written, at least, one commit that migrates Java code to Kotlin. Our main goal was to know why those developers have done that code migrations. This paper presents the main ten reasons of migration that we obtained from the interviews. Moreover, by combining code analysis done by MigA and the information obtained from the interviews, we present a deeper characterization of the migration activity. Finally, we present and discuss the experiences and advises we obtained from developers that migrated code.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset