Are you still smelling it? A comparative study between Java and Kotlin language

  • Matheus Flauzino UFLA
  • Júlio Veríssimo UFLA
  • Ricardo Terra UFLA
  • Elder Cirilo UFSJ
  • Vinicius H. S. Durelli UFSJ
  • Rafael S. Durelli UFLA

Resumo


Java is one of the most widely used programming languages. However, Java is a verbose language, thus one of the main drawbacks of the language is that even simple tasks often entail writing a significant amount of code. In some cases, writing too much code might lead to certain code smells, which are violations of fundamental design that can negatively impact the overall quality of programs. To allow programmers to write concise code, JetBrains created a new language named Kotlin. Nevertheless, few studies have evaluated whether Kotlin leads to concise and clearer code in comparison to Java. We conjecture that due to Java's verbosity, programs written in Java are likely to have more code smells than Kotlin programs. Therefore, we set out to evaluate whether some types of code smells are more common in Java programs. To this end, we carried out a large-scale empirical study involving more than 6 million lines of code from programs available in 100 repositories. We found that on average Kotlin programs have less code smells than Java programs.
Palavras-chave: Bad Smell, Code Smell, Kotlin Language, refactoring
Publicado
17/09/2018
FLAUZINO, Matheus; VERÍSSIMO, Júlio; TERRA, Ricardo; CIRILO, Elder; DURELLI, Vinicius H. S.; DURELLI, Rafael S.. Are you still smelling it? A comparative study between Java and Kotlin language. In: SIMPÓSIO BRASILEIRO DE COMPONENTES, ARQUITETURAS E REUTILIZAÇÃO DE SOFTWARE (SBCARS), 12. , 2018, São Carlos/SP. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2018 . p. 23–32.