Automatically Assessing Code Understandability: How Far Are We?

被引:0
作者
Scalabrino, Simone [1 ]
Bavota, Gabriele [2 ]
Vendome, Christopher [3 ]
Linares-Vasquez, Mario [4 ]
Poshyvanyk, Denys [3 ]
Oliveto, Rocco [1 ]
机构
[1] Univ Molise, Campobasso, Italy
[2] USI, Lugano, Switzerland
[3] Coll William & Mary, Williamsburg, VA USA
[4] Univ Los Andes, Bogota, Colombia
来源
PROCEEDINGS OF THE 2017 32ND IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE'17) | 2017年
关键词
Software metrics; Code understandability; Empirical study; Negative result;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Program understanding plays a pivotal role in software maintenance and evolution: a deep understanding of code is the stepping stone for most software-related activities, such as bug fixing or testing. Being able to measure the understandability of a piece of code might help in estimating the effort required for a maintenance activity, in comparing the quality of alternative implementations, or even in predicting bugs. Unfortunately, there are no existing metrics specifically designed to assess the understandability of a given code snippet. In this paper, we perform a first step in this direction, by studying the extent to which several types of metrics computed on code, documentation, and developers correlate with code understandability. To perform such an investigation we ran a study with 46 participants who were asked to understand eight code snippets each. We collected a total of 324 evaluations aiming at assessing the perceived understandability, the actual level of understanding, and the time needed to understand a code snippet. Our results demonstrate that none of the (existing and new) metrics we considered is able to capture code understandability, not even the ones assumed to assess quality attributes strongly related with it, such as code readability and complexity.
引用
收藏
页码:417 / 427
页数:11
相关论文
共 38 条
[31]   How are functionally similar code clones syntactically different? An empirical study and a benchmark [J].
Wagner, Stefan ;
Abdulkhaleq, Asim ;
Bogicevic, Ivan ;
Ostberg, Jan-Peter ;
Ramadani, Jasmin .
PEERJ COMPUTER SCIENCE, 2016,
[32]   How Good are Code Smells for Evaluating Software Maintainability? - Results from a Comparative Case Study [J].
Yamashita, Aiko .
2013 29TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE (ICSM), 2013, :566-571
[33]   How Readable is Model-generated Code? Examining Readability and Visual Inspection of GitHub Copilot [J].
Al Madi, Naser .
PROCEEDINGS OF THE 37TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE 2022, 2022,
[34]   How Open Source Projects use Static Code Analysis Tools in Continuous Integration Pipelines [J].
Zampetti, Fiorella ;
Scalabrino, Simone ;
Oliveto, Rocco ;
Canfora, Gerardo ;
Di Penta, Massimiliano .
2017 IEEE/ACM 14TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2017), 2017, :334-344
[35]   How Developers' Collaborations Identified from Different Sources Tell us About Code Changes [J].
Panichella, Sebastiano ;
Bavota, Gabriele ;
Di Penta, Massimiliano ;
Canfora, Gerardo ;
Antoniol, Giuliano .
2014 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2014, :251-260
[36]   How and why we end up with complex methods: a multi-language study [J].
Lopes, Mateus ;
Hora, Andre .
EMPIRICAL SOFTWARE ENGINEERING, 2022, 27 (05)
[37]   How and why we end up with complex methods: a multi-language study [J].
Mateus Lopes ;
Andre Hora .
Empirical Software Engineering, 2022, 27
[38]   How Do We Talk Ourselves Into These Things? Challenges with Adoption of Biometric Authentication for Expert and Non-Expert Users [J].
Wolf, Flynn ;
Kuber, Ravi ;
Aviv, Adam J. .
CHI 2018: EXTENDED ABSTRACTS OF THE 2018 CHI CONFERENCE ON HUMAN FACTORS IN COMPUTING SYSTEMS, 2018,