Are you still smelling it? A comparative study between Java and Kotlin language - Flauzino, Matheus; Veríssimo, Júlio; Terra, Ricardo; Cirilo, Elder; Durelli, Vinicius H. S.; Durelli, Rafael S. (Anais do Simpósio Brasileiro de Componentes, Arquiteturas e Reutilização de Software (SBCARS), 2018)
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.