How do Developers Improve Code Readability? An Empirical Study of Pull Requests

09/05/2023
by   Carlos Eduardo C. Dantas, et al.
0

Readability models and tools have been proposed to measure the effort to read code. However, these models are not completely able to capture the quality improvements in code as perceived by developers. To investigate possible features for new readability models and production-ready tools, we aim to better understand the types of readability improvements performed by developers when actually improving code readability, and identify discrepancies between suggestions of automatic static tools and the actual improvements performed by developers. We collected 370 code readability improvements from 284 Merged Pull Requests (PRs) under 109 GitHub repositories and produce a catalog with 26 different types of code readability improvements, where in most of the scenarios, the developers improved the code readability to be more intuitive, modular, and less verbose. Surprisingly, SonarQube only detected 26 out of the 370 code readability improvements. This suggests that some of the catalog produced has not yet been addressed by SonarQube rules, highlighting the potential for improvement in Automatic static analysis tools (ASAT) code readability rules as they are perceived by developers.

READ FULL TEXT
research
10/02/2021

Recommending Code Understandability Improvements based on Code Reviews

Developers spend 70 read can save time, while hard-to-read code can lead...
research
03/16/2022

Code Smells in Elixir: Early Results from a Grey Literature Review

Elixir is a new functional programming language whose popularity is risi...
research
03/22/2021

Sorald: Automatic Patch Suggestions for SonarQube Static Analysis Violations

Previous work has shown that early resolution of issues detected by stat...
research
07/20/2023

Empirical Evaluation of a Live Environment for Extract Method Refactoring

Complex software can be hard to read, adapt, and maintain. Refactoring i...
research
07/19/2022

Visual Notations in Container Orchestrations: An Empirical Study with Docker Compose

Context: Container orchestration tools supporting infrastructure-as-code...
research
05/07/2023

On the perceived relevance of critical internal quality attributes when evolving software features

Several refactorings performed while evolving software features aim to i...

Please sign up or login with your details

Forgot password? Click here to reset