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

被引:1
|
作者
Dantas, Carlos Eduardo C. [1 ]
Rocha, Adriano M. [1 ]
Maia, Marcelo A. [1 ]
机构
[1] Univ Fed Uberlandia, Uberlandia, MG, Brazil
关键词
code readability; pull request; code review; automatic static analysis tools; sonarqube;
D O I
10.1109/ICSME58846.2023.00022
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:110 / 122
页数:13
相关论文
共 50 条
  • [1] How Developers Modify Pull Requests in Code Review
    Jiang, Jing
    Lv, Jiangfeng
    Zheng, Jiateng
    Zhang, Li
    IEEE TRANSACTIONS ON RELIABILITY, 2022, 71 (03) : 1325 - 1339
  • [2] How do Multiple Pull Requests Change the Same Code: A Study of Competing Pull Requests in GitHub
    Zhang, Xin
    Chen, Yang
    Gu, Yongfeng
    Zou, Weiqin
    Xie, Xiaoyuan
    Jia, Xiangyang
    Xuan, Jifeng
    PROCEEDINGS 2018 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2018, : 228 - 239
  • [3] How Do Software Developers Use ChatGPT? An Exploratory Study on GitHub Pull Requests
    Chouchen, Moataz
    Bessghaier, Narjes
    Begoug, Mahi
    Ouni, Ali
    AlOmar, Eman Abdullah
    Mkaouer, Mohamed Wiem
    2024 IEEE/ACM 21ST INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2024, : 212 - 216
  • [4] How Do Developers Refactor Code to Improve Code Reusability?
    AlOmar, Eman Abdullah
    Rodriguez, Philip T.
    Bowman, Jordan
    Wang, Tianjia
    Adepoju, Benjamin
    Lopez, Kevin
    Newman, Christian
    Ouni, Ali
    Mkaouer, Mohamed Wiem
    REUSE IN EMERGING SOFTWARE ENGINEERING PRACTICES, ICSR 2020, 2020, 12541 : 261 - 276
  • [5] An empirical study on developers' shared conversations with ChatGPT in GitHub pull requests and issues
    Hao, Huizi
    Hasan, Kazi Amit
    Qin, Hong
    Macedo, Marcos
    Tian, Yuan
    Ding, Steven H. H.
    Hassan, Ahmed E.
    EMPIRICAL SOFTWARE ENGINEERING, 2024, 29 (06)
  • [6] How Developers Document Pull Requests with External References
    Zampetti, Fiorella
    Ponzanelli, Luca
    Bavota, Gabriele
    Mocci, Andrea
    Di Penta, Massimiliano
    Lanza, Michele
    2017 IEEE/ACM 25TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2017, : 23 - 33
  • [7] How do you Propose Your Code Changes? Empirical Analysis of Affect Metrics of Pull Requests on GitHub
    Ortu, Marco
    Destefanis, Giuseppe
    Graziotin, Daniel
    Marchesi, Michele
    Tonelli, Roberto
    IEEE ACCESS, 2020, 8 : 110897 - 110907
  • [8] How well do professional developers test with code coverage visualizations? An empirical study
    Lawrance, J
    Clarke, S
    Burnett, M
    Rothermel, G
    2005 IEEE SYMPOSIUM ON VISUAL LANGUAGE AND HUMAN-CENTRIC COMPUTING, PROCEEDINGS, 2005, : 53 - 60
  • [9] Do Developers Refactor Data Access Code? An Empirical Study
    Muse, Biruk Asmare
    Khomh, Foutse
    Antoniol, Giuliano
    2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER 2022), 2022, : 25 - 35
  • [10] How Do Developers Adapt Code Snippets to Their Contexts? An Empirical Study of Context-Based Code Snippet Adaptations
    Zhang, Tanghaoran
    Lu, Yao
    Yu, Yue
    Mao, Xinjun
    Zhang, Yang
    Zhao, Yuxin
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2024, 50 (11) : 2712 - 2731