Published December 19, 2022 | Version v1

An Empirical Characterization of Developers' Perceptions on Code Readability Improvements

Authors/Creators

Description

Readability models and tools have been proposed to measure the effort to read code. However, these models are unable to capture the quality improvements in code as perceived by developers. To investigate possible features for readability models, we aim to better understand the types of readability
improvements performed by developers when actually improving code readability. Moreover, to have a deep comprehension of developers’ perceptions on code readability, we also extracted the reasons of some readability improvements are rejected in a code review process. We analyzed 2,693 Merged Pull Requests (PRs) and 2,558 Closed Pull Requests on GitHub with readability improvement description and could produce a catalog with 26 different types of code readability improvements. We also collected five reviewers’ motivations to reject code readability improvements. In 63% of our samples, the developers improved the code readability to be more intuitive, modular, and less verbose. However, when combining the accepted and rejected code readability improvements, we perceive different developers’ perceptions, especially in removing magic literals, extracting methods, and refactoring conditional statements. And finally, we analyzed the types of code readability improvements of our catalog that are already addressed by tools and readability models and other types which could have challenges to be addressed.

Files

icpc2023.zip

Files (61.6 MB)

Name Size
md5:0735a9ce4af81b50c27e37319d3facf8
61.6 MB Preview Download