arrow
返回

Understanding Code Understandability Improvements in Code Reviews

delete2025-01-01
delete0
delete
OA
AI
D
Delano Oliveira *
R
Reydne Santos
B
Benedito de Oliveira
M
Martin Monperrus
F
Fernando Castor
F
Fernanda Madeiral
DOI:10.1109/TSE.2024.3453783delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Context: Code understandability plays a crucial role in software development, as developers spend between 58% and 70% of their time reading source code. Improving code understandability can lead to enhanced productivity and save maintenance costs. Problem: Experimental studies aim to establish what makes code more or less understandable in a controlled setting, but ignore that what makes code easier to understand in the real world also depends on extraneous elements such as developers' background and project culture and guidelines. Not accounting for the influence of these factors may lead to results that are sound but have little external validity. Goal: We aim to investigate how developers improve code understandability during software development through code review comments. Our assumption is that code reviewers are specialists in code quality within a project. Method and Results: We manually analyzed 2,401 code review comments from Java open-source projects on GitHub and found that over 42% of all comments focus on improving code understandability, demonstrating the significance of this quality attribute in code reviews. We further explored a subset of 385 comments related to code understandability and identified eight categories of code understandability concerns, such as incomplete or inadequate code documentation, bad identifier, and unnecessary code. Among the suggestions to improve code understandability, 83.9% were accepted and integrated into the codebase. Among these, only two (less than 1%) ended up being reverted later. We also identified types of patches that improve code understandability, ranging from simple changes (e.g., removing unused code) to more context-dependent improvements (e.g., replacing method calling chains by existing API). Finally, we investigated the potential coverage of four well-known linters to flag the identified code understandability issues. These linters cover less than 30% of these issues, although some of them could be easily added as new rules. Implications: Our findings motivate and provide practical insight for the construction of tools to make code more understandable, e.g., understandability improvements are rarely reverted and thus can be used as reliable training data for specialized ML-based tools. This is also supported by our dataset, which can be used to train such models. Finally, our findings can also serve as a basis to develop evidence-based code style guides.
Keyword:
Codes
Reviews
Source coding
Software development management
Documentation
Security
Natural languages
Code understandability
code understandability smells
code review

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
2.9K
被引数:
1.1W

机构

V
Vrije Universiteit Amsterdam
学者数:
4.2W
论文数: 3.7W
被引数: 3.7W
U
Universidade Federal de Pernambuco
学者数:
1.3W
论文数: 7.3K
被引数: 5.3K
R
Royal Institute of Technology
学者数:
1.8W
论文数: 1.8W
被引数: 25
学者 查看更多机构
引用论文

引用论文

err分享
err收藏
?-1,4-Glucosidase activity in infertile oligoasthenozoospermic men with and without varicocele
err2007-02-01
err0
errOAAI
errM. M. F. Roaiah; T. Mostafa; D. Salem; A. R. El-Nashar; I. I. Kamel; M. S. El-Kashlan
err分享
err收藏
The impact of identifier style on effort and comprehension标识符风格对努力和理解的影响
err2012-05-03
err113
PREAI
errBinkley, Dave; Davis, Marcia; Lawrie, Dawn; Maletic, Jonathan I.; Morrell, Christopher; Sharif, Bonita
err分享
err收藏
Programmed sample delivery on a pressurized paper
err2014-10-24
err0
errOAAI
errJoong Ho Shin; Juhwan Park; Seung Hoon Kim; Je-Kyun Park
err分享
err收藏
An investigation of misunderstanding code patterns in C open-source software projects
err2018-11-22
err22
PREAI
errMedeiros, Flavio; Lima, Gabriel; Amaral, Guilherme; Apel, Sven; Kastner, Christian; Ribeiro, Marcio; Gheyi, Rohit
err分享
err收藏
Towards a wireless and fully-implantable ECoG system
err2013-06-01
err0
PREAI
errE. Tolstosheeva; J. Hoeffmann; J. Pistor; D. Rotermund; T. Schellenberg; D. Boll; T. Hertzberg; V. Gordillo-Gonzalez; S. Mandon; D. Peters-Drolshagen; M. Schneider; K. Pawelzik; A. Kreiter; S. Paul; W. Lang
err分享
err收藏
Complementary chromosome folding by transcription factors and cohesin
err
IF0
err2018-04-23
err0
PREAI
errM. C. F. Pereira; C. A. Brackley; D. Michieletto; C. Annunziatella; S. Bianco; A. M. Chiariello; M. Nicodemi; D. Marenduzzo
err分享
err收藏
学者 查看更多内容