Measuring how changes in code readability attributes affect code quality evaluation by Large Language Models
Igor Regis da Silva Simoes, Elaine Venson

TL;DR
This study investigates how Large Language Models evaluate code readability attributes and how modifications like removing comments or refactoring influence their assessments, highlighting LLMs' potential in standardized code quality evaluation.
Contribution
It introduces a systematic approach to measure LLM sensitivity to code readability changes and demonstrates their semantic evaluation capabilities.
Findings
LLMs are sensitive to code readability interventions.
High agreement between LLMs and reference models for original and refactored code.
LLMs show potential in evaluating semantic aspects of code quality.
Abstract
Code readability is one of the main aspects of code quality, influenced by various properties like identifier names, comments, code structure, and adherence to standards. However, measuring this attribute poses challenges in both industry and academia. While static analysis tools assess attributes such as code smells and comment percentage, code reviews introduce an element of subjectivity. This paper explores using Large Language Models (LLMs) to evaluate code quality attributes related to its readability in a standardized, reproducible, and consistent manner. We conducted a quasi-experiment study to measure the effects of code changes on Large Language Model (LLM)s interpretation regarding its readability quality attribute. Nine LLMs were tested, undergoing three interventions: removing comments, replacing identifier names with obscure names, and refactoring to remove code smells.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
