Measurement of Source Code Readability Using Word Concreteness and Memory Retention of Variable Names

Document Type

Conference Proceeding

Publication Date

2017

DOI

https://doi.org/10.1109/COMPSAC.2017.166

Abstract

Source code readability is critical to software quality assurance and maintenance. In this paper, we present a novel approach to the automated measurement of source code readability based on Word Concreteness and Memory Retention (WCMR) of variable names. The approach considers programming and maintenance as processes of organizing variables and their operations to describe solutions to specific problems. The overall readability of given source code is calculated from the readability of all variables contained in the source code. The readability of each variable is determined by how easily its meaning is memorized (i.e., word concreteness) and how quickly they are forgotten over time (i.e., memory retention). Our empirical study has used 14 open source applications with over a half-million lines of code and 10,000 warning defects. The result shows that the WCMR-based source code readability negatively correlates strongly with overall warning defect rates, and particularly with such warning as bad programming practices, code vulnerability, and correctness bug warning.

Comments

This document was originally published with author Lin Deng's institution as: Towosn University.

Share

COinS