Code smell prediction employing machine learning meets emerging java language constructs

11Citations
Citations of this article
21Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Background: Defining code smell is not a trivial task. Their recognition tends to be highly subjective. Nevertheless some code smells detection tools have been proposed. Other recent approaches incline towards machine learning (ML) techniques to overcome disadvantages of using automatic detection tools. Objectives: We aim to develop a research infrastructure and reproduce the process of code smell prediction proposed by Arcelli Fontana et al. We investigate ML algorithms performance for samples including major modern Java language features. Those such as lambdas can shorten the code causing code smell presence not as obvious to detect and thus pose a challenge to both existing code smell detection tools and ML algorithms. Method: We extend the study with dataset consisting of 281 Java projects. For driving samples selection we define metrics considering lambdas and method reference, derived using custom JavaParser-based solution. Tagged samples with new constructions are used as an input for the utilized detection techniques. Results: Detection rules derived from the best performing algorithms like J48 and JRip incorporate newly introduced metrics. Conclusions: Presence of certain new Java language constructs may hide Long Method code smell or indicate a God Class. On the other hand, their absence or low number can suggest a Data Class.

Cite

CITATION STYLE

APA

Grodzicka, H., Ziobrowski, A., Łakomiak, Z., Kawa, M., & Madeyski, L. (2020). Code smell prediction employing machine learning meets emerging java language constructs. In Lecture Notes on Data Engineering and Communications Technologies (Vol. 40, pp. 137–167). Springer Science and Business Media Deutschland GmbH. https://doi.org/10.1007/978-3-030-34706-2_8

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free