A Data-Driven Methodology for Quality Aware Code Fixing - Thomas Karanikiotis; Andreas L. Symeonidis (IET Software)
In today’s rapidly changing software development landscape, ensuring code quality is essential to reliability, maintainability, and security among other aspects. Identifying code quality issues can be tackled; however, implementing code quality improvements can be a complex and time-consuming task. To address this problem, we present a novel methodology designed to assist developers by suggesting alternative code snippets that not only match the functionality of the original code but also improve its quality based on predefined metrics. Our system is based on a language-agnostic approach that allows the analysis of code snippets written in different programming languages. It employs advanced techniques to assess functional similarity and evaluates syntactic similarity, suggesting alternatives that minimize the need for extensive modification. The evaluation of our system on multiple axes demonstrates the effectiveness of our approach in providing usable code alternatives that are both functionally equivalent and syntactically similar to the original snippets, while significantly improving quality metrics. We argue that our methodology and tool can be valuable for the software engineering community, bridging the gap between the identification of code quality problems and the implementation of practical solutions that improve software quality.