Title: Predicting code beauty with machine learning model

Authors: Ermira Daka

Addresses: Department of Computer Science, University of Business and Technology, Prishtina, Kosovo

Abstract: Software maintenance is one of the most expensive phases of the software development life cycle. This cost increases more when maintenance is performed on poorly written code. There exist a set of code writing patterns that developers need to follow to write good-looking code. However, coding that conforms to 'rules' is not always possible. During software evolution, code goes through different changes, which are the main reasons for breaking the rules of beautiful code. In this paper, we propose a machine learning (ML)-based model which will measure the beauty of a written code. The model built on a set of ten code-based features is learned using logic regression algorithm and is able to predict how beautiful is given peace of code. Furthermore, the model is evaluated using an empirical study, which shows that it has a moderate agreement with developers about the beauty of the code.

Keywords: machine learning; code beauty; software maintenance.

DOI: 10.1504/IJASS.2023.133898

International Journal of Applied Systemic Studies, 2023 Vol.10 No.2, pp.83 - 93

Received: 30 Mar 2021
Accepted: 26 Jul 2022

Published online: 05 Oct 2023 *

Full-text access for editors Full-text access for subscribers Purchase this article Comment on this article