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

Weifeng Xu, Dianxiang Xu, Lin Deng
{"title":"Measurement of Source Code Readability Using Word Concreteness and Memory Retention of Variable Names","authors":"Weifeng Xu, Dianxiang Xu, Lin Deng","doi":"10.1109/COMPSAC.2017.166","DOIUrl":null,"url":null,"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.","PeriodicalId":6556,"journal":{"name":"2017 IEEE 41st Annual Computer Software and Applications Conference (COMPSAC)","volume":"35 1","pages":"33-38"},"PeriodicalIF":0.0000,"publicationDate":"2017-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2017 IEEE 41st Annual Computer Software and Applications Conference (COMPSAC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/COMPSAC.2017.166","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
使用词的具体性和变量名的记忆保留来测量源代码的可读性
源代码的可读性对于软件质量保证和维护至关重要。在本文中,我们提出了一种基于变量名的单词具体性和记忆保留(WCMR)的源代码可读性自动度量方法。该方法将编程和维护视为组织变量及其操作的过程,以描述特定问题的解决方案。给定源代码的总体可读性是根据源代码中包含的所有变量的可读性来计算的。每个变量的可读性取决于其含义被记忆的难易程度(即单词的具体性)和它们随着时间的推移被遗忘的速度(即记忆保留)。我们的实证研究使用了14个开放源代码应用程序,其中包含超过50万行代码和10,000个警告缺陷。结果表明,基于wcmr的源代码可读性与总体警告缺缺率呈强烈的负相关,特别是与不良编程实践、代码漏洞和正确性错误警告等警告相关。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Physical Attestation in the Smart Grid for Distributed State Verification Corroboration Effect of Current Net Earnings and Management’s Net Earnings Forecasts in Japan’s Corporate Bond Market Message from the CAP 2017 Organizing Committee Combinations of Personal Characteristic Types and Learning Effectiveness of Teams Detecting and Classifying Android PUAs by Similarity of DNS queries
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1