Improving Source Code Readability: Theory and Practice

被引:39
作者
Fakhoury, Sarah [1 ]
Roy, Devjeet [1 ]
Hassan, Sk Adnan [2 ]
Arnaoudova, Vernera [1 ]
机构
[1] Washington State Univ, Sch Elect Engn & Comp Sci, Pullman, WA 99164 USA
[2] Infosapex Ltd, Dhaka, Bangladesh
来源
2019 IEEE/ACM 27TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2019) | 2019年
关键词
Readability; Code Quality Metrics; Developers' Perception; SOFTWARE;
D O I
10.1109/ICPC.2019.00014
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
There are several widely accepted metrics to measure code quality that are currently being used in both research and practice to detect code smells and to find opportunities for code improvement. Although these metrics have been proposed as a proxy of code quality, recent research suggests that more often than not, state-of-the-art code quality metrics do not successfully capture quality improvements in the source code as perceived by developers. More specifically, results show that there may be inconsistencies between, on the one hand, the results from metrics for cohesion, coupling, complexity, and readability, and, on the other hand, the interpretation of these metrics in practice. As code improvement tools rely on these metrics, there is a clear need to identify and resolve the aforementioned inconsistencies. This will allow for the creation of tools that are more aligned with developers' perception of quality, and can more effectively help source code improvement efforts. In this study, we investigate 548 instances of source code readability improvements, as explicitly stated by internal developers in practice, from 63 engineered software projects. We show that current readability models fail to capture readability improvements. We also show that tools to calculate additional metrics, to detect refactorings, and to detect style problems are able to capture characteristics that are specific to readability changes and thus should be considered by future readability models.
引用
收藏
页码:2 / 12
页数:11
相关论文
共 32 条
  • [1] [Anonymous], 2000, Experimentation in softwareengineeringAn Introduction
  • [2] [Anonymous], 2009, NATURAL LANGUAGE PRO
  • [3] REPENT: Analyzing the Nature of Identifier Renamings
    Arnaoudova, Venera
    Eshkevari, Laleh M.
    Di Penta, Massimiliano
    Oliveto, Rocco
    Antoniol, Giuliano
    Gueheneuc, Yann-Gael
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2014, 40 (05) : 502 - 532
  • [4] Bavota G, 2013, PROCEEDINGS OF THE 35TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2013), P692, DOI 10.1109/ICSE.2013.6606615
  • [5] Learning a Metric for Code Readability
    Buse, Raymond P. L.
    Weimer, Westley R.
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2010, 36 (04) : 546 - 558
  • [6] Counsell Steve, 2006, SIGSOFT Softw. Eng. Notes, V31, P1
  • [7] Dorn Jonathan, 2012, THESIS U VIRGINIA
  • [8] Change distilling:: Tree differencing for fine-grained source code change extraction
    Fluri, Beat
    Wuersch, Michael
    Pinzger, Martin
    Gall, Harald C.
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2007, 33 (11) : 725 - 743
  • [9] Classifying change types for qualifying change couplings
    Fluri, Beat
    Gall, Harald C.
    [J]. 14TH IEEE INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2006), PROCEEDINGS, 2006, : 35 - +
  • [10] FrontEndART Software Ltd, SOURC