Evaluating the Effectiveness of ChatGPT in Improving Code Quality

Code refactoring is a crucial process in software development that helps improve the quality and maintainability of code without changing its functionality. Although code refactoring is widely recognized as an essential practice, measuring its impact on code quality is challenging. This paper investigates the impact of ChatGPT, on code quality. The study focuses on four key metrics: cyclomatic complexity, cognitive complexity, code smells, and time debt, using Sonarqube to assess code quality and identify potential issues. The original dataset of Python code is compared with the refactored dataset to evaluate the effectiveness of ChatGPT in improving code quality. The results demonstrate that ChatGPT's refactoring efforts have led to improvements in the quality of the codebase. The refactored code exhibited lower complexity values, fewer code smells, and reduced time debt, highlighting ChatGPT's success in addressing significant issues that can cause system failures and performance issues. The study emphasizes the potential benefits of using ChatGPT for code refactoring, which can significantly benefit software development efforts by improving code quality and reducing development time.

Authors

Institutions

Publication Details

Published
2025-04-05
DOI
https://doi.org/10.1109/icmi65310.2025.11139842
Primary Topic
Artificial Intelligence in Healthcare and Education
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Evaluating the Effectiveness of ChatGPT in Improving Code Quality

Eman Abdullah AlOmar, Sukhdeep Singh, Shanal Divyansh, Pranjal Apoorva et al.
Artificial Intelligence in Healthcare and Education
article

Evaluating the Effectiveness of ChatGPT in Improving Code Quality

Eman Abdullah AlOmar, Sukhdeep Singh, Shanal Divyansh, Pranjal Apoorva, Anita Ershadi, Hiral Makwana
article en

Abstract

Code refactoring is a crucial process in software development that helps improve the quality and maintainability of code without changing its functionality. Although code refactoring is widely recognized as an essential practice, measuring its impact on code quality is challenging. This paper investigates the impact of ChatGPT, on code quality. The study focuses on four key metrics: cyclomatic complexity, cognitive complexity, code smells, and time debt, using Sonarqube to assess code quality and identify potential issues. The original dataset of Python code is compared with the refactored dataset to evaluate the effectiveness of ChatGPT in improving code quality. The results demonstrate that ChatGPT's refactoring efforts have led to improvements in the quality of the codebase. The refactored code exhibited lower complexity values, fewer code smells, and reduced time debt, highlighting ChatGPT's success in addressing significant issues that can cause system failures and performance issues. The study emphasizes the potential benefits of using ChatGPT for code refactoring, which can significantly benefit software development efforts by improving code quality and reducing development time.

Stevens Institute of Technology (US)
Openalex Percentile: Top 83%
Artificial Intelligence in Healthcare and Education
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.