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

by   Carlos Eduardo C. Dantas, et al.

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.


Recommending Code Understandability Improvements based on Code Reviews

Developers spend 70 read can save time, while hard-to-read code can lead...

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

Elixir is a new functional programming language whose popularity is risi...

Sorald: Automatic Patch Suggestions for SonarQube Static Analysis Violations

Previous work has shown that early resolution of issues detected by stat...

Empirical Evaluation of a Live Environment for Extract Method Refactoring

Complex software can be hard to read, adapt, and maintain. Refactoring i...

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

Context: Container orchestration tools supporting infrastructure-as-code...

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