[Paper Review] How and Why did developers migrate Android Applications from Java to Kotlin? A study based on code analysis and interviews with developers.
This study investigates why and how Android developers migrated from Java to Kotlin by analyzing code commits in 374 Android apps using a custom tool, MigA, and interviewing 78 developers. It identifies ten key motivations for migration and provides actionable insights into the practical challenges and strategies used during the transition.
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.
Motivation & Objective
- To understand the motivations behind Android developers' migration from Java to Kotlin in existing applications.
- To analyze the technical and organizational factors influencing the decision to migrate codebases.
- To characterize the actual migration process through automated code analysis and developer interviews.
- To extract practical experiences and recommendations from developers who have completed Java-to-Kotlin migrations.
Proposed method
- Developed MigA, a tool to detect commits that migrate Java code to Kotlin by analyzing version control history in Android repositories.
- Executed MigA on a dataset of 374 Android applications containing both Java and Kotlin code.
- Conducted semi-structured interviews with 78 developers who performed at least one migration commit.
- Combined quantitative code analysis from MigA with qualitative insights from interviews to characterize migration patterns and motivations.
- Categorized migration reasons based on interview responses and cross-validated findings with code-level observations.
Experimental results
Research questions
- RQ1What are the primary reasons developers choose to migrate their Android applications from Java to Kotlin?
- RQ2How do developers technically perform the migration of Java code to Kotlin in real-world projects?
- RQ3What are the common challenges and strategies observed during the migration process?
- RQ4How does the migration pattern differ across projects of varying sizes and team structures?
Key findings
- The top ten reasons for migration include improved code conciseness, better null safety, and enhanced tooling support in Kotlin.
- Over 80% of migration commits involved small-scale changes, such as converting individual methods or classes, rather than large-scale refactoring.
- Developers frequently cited Kotlin's null safety and extension functions as key motivators for adopting the language.
- Interoperability between Java and Kotlin enabled gradual migration, reducing the risk of breaking existing functionality.
- Many developers reported that Kotlin improved code readability and reduced boilerplate, contributing to long-term maintainability.
- The migration process was often iterative and team-driven, with multiple developers contributing to the transition over time.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.