Developer Motivations to Perform Code Readability Improvements: an Exploratory Study
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 at better understanding the motivations of developers when actually improving code readability. For that, we extracted the developer's motivations when performing readability improvements on code. We analyzed 1988 Merged Pull Requests (PRs) on Github with readability improvement description and could produce a catalog with 35 different developer's motivations on 193 of them. We also analyzed the state-of-art readability tools according to each set of developer motivation PRs and verified which motivations are not captured by readability tools. We observe that the main developer motivations are related to reducing code verbosity using new language features, producing a more self-describing code in short methods (applying extract method refactoring). We also observed the state-of-art readability tools, in general, could not capture the readability improvements applied by developers, but there are some exceptions, especially in removing duplicate and boilerplate code. We finally suggest some improvements for these readability tools aiming at enhanced automation in the code review process.
Files
ICPC2022.zip
Files
(93.3 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:c6387e1de116a13148473b3b0622ec1f
|
93.3 MB | Preview Download |