Skip to main content
Log in

An empirical study on quality of Android applications written in Kotlin language

  • Published:
Empirical Software Engineering Aims and scope Submit manuscript

Abstract

Context

During the last years, developers of mobile applications have the possibility to use new paradigms and tools for developing mobile applications. For instance, since 2017, Android developers have the official support to write Android applications using Kotlin language. Kotlin is programming language fully interoperable with Java that combines object-oriented and functional features.

Objective

The goal of this paper is twofold. First, it aims to study the degree of adoption of Kotlin language on the development of open-source Android applications and to measure the amount of Kotlin code inside those applications. Secondly, it aims to measure the quality of Android applications that are written using Kotlin and to compare it with the quality of Android applications written using Java.

Method

We first defined a method to detect Kotlin applications from a dataset of open-source Android applications. Then, we analyzed those applications to detect instances of code smells and computed an estimation of the quality of the applications. Finally, we studied how the introduction of Kotlin code impacts on the quality of an Android application.

Results

Our experiment found that 11.26% of applications from a dataset with 2,167 open-source applications have been written (partially or fully) using Kotlin language. We found that the introduction of Kotlin code increases the quality, in terms of the presence of 10 different code smells studied, 4 object-oriented and 6 Android, of the majority of the Android applications initially written in Java.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

Notes

  1. https://developer.android.com/studio/

  2. https://developer.android.com/about/

  3. https://play.google.com

  4. https://cordova.apache.org

  5. https://www.xamarin.com

  6. https://facebook.github.io/react-native

  7. https://visualstudio.microsoft.com/xamarin/

  8. https://kotlinlang.org/

  9. https://android-developers.googleblog.com/

  10. https://f-droid.org/

  11. https://androidtimemachine.github.io

  12. http://androzoo.uni.lu

  13. https://kotlinlang.org/docs/reference/comparison-to-java.html

  14. https://developer.android.com/studio/build/apk-analyzer

  15. https://developer.android.com/guide/topics/manifest/manifest-intro

  16. https://android-developers.googleblog.com/2017/05/android-announces-support-for-kotlin.html

  17. Last visit: 06/04/2018.

  18. https://cloud.google.com/bigquery/public-data/github

  19. Last visit: 16/10/2018.

  20. Experiment executed the June 4th, 2018.

  21. AndroidTimeMachine resources: https://androidtimemachine.github.io/dataset/ and https://github.com/AndroidTimeMachine/open_source_android_apps

  22. https://github.com/UPHF/kotlinandroid/blob/master/docs/multiple_manifest_problem.md.

  23. In the appendix we list that applications that suffer the mentioned problem: https://github.com/UPHF/kotlinandroid/blob/master/docs/wrong_match.md.

  24. FAMAZOA dataset: https://github.com/UPHF/kotlinandroid/blob/master/docs/final_dataset.md

  25. http://cloc.sourceforge.net/

  26. https://github.com/UPHF/kotlinandroid/tree/master/docs/evolution/

  27. https://github.com/GeoffreyHecht/paprika

  28. Version of Paprika used: commit 5ebd34 https://github.com/GeoffreyHecht/paprika/commit/5ebd349ed3067914386e8c6a05e87ff161f9edd1

  29. https://developer.android.com/about/dashboards/ Last visit: 06/11/2018

  30. Hecht (2016a) considers that a method is “long” (LM) if it has more than 17 instructions.

  31. Applications classified as Kotlin: https://github.com/UPHF/kotlinandroid/blob/master/docs/final_kotlin_dataset.md

  32. Classification of the evolution trends. https://github.com/UPHF/kotlinandroid/tree/master/docs/evolution

  33. In our appendix we list the reason of those Parpika failures https://github.com/UPHF/kotlinandroid/blob/master/README.md#analyzing-apps-with-priprika

References

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bruno Góis Mateus.

Additional information

Communicated by: David Lo, Meiyappan Nagappan, Fabio Palomba, and Sebastiano Panichella

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Góis Mateus, B., Martinez, M. An empirical study on quality of Android applications written in Kotlin language. Empir Software Eng 24, 3356–3393 (2019). https://doi.org/10.1007/s10664-019-09727-4

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10664-019-09727-4

Keywords

Navigation