"Automatically Assessing Code Understandability" Reanalyzed: Combined Metrics Matter

Asher Trockman, Keenen Cates, Mark Mozina, T. Nguyen, Christian Kästner, Bogdan Vasilescu
{"title":"\"Automatically Assessing Code Understandability\" Reanalyzed: Combined Metrics Matter","authors":"Asher Trockman, Keenen Cates, Mark Mozina, T. Nguyen, Christian Kästner, Bogdan Vasilescu","doi":"10.1145/3196398.3196441","DOIUrl":null,"url":null,"abstract":"Previous research shows that developers spend most of their time understanding code. Despite the importance of code understandability for maintenance-related activities, an objective measure of it remains an elusive goal. Recently, Scalabrino et al. reported on an experiment with 46 Java developers designed to evaluate metrics for code understandability. The authors collected and analyzed data on more than a hundred features describing the code snippets, the developers' experience, and the developers' performance on a quiz designed to assess understanding. They concluded that none of the metrics considered can individually capture understandability. Expecting that understandability is better captured by a combination of multiple features, we present a reanalysis of the data from the Scalabrino et al. study, in which we use different statistical modeling techniques. Our models suggest that some computed features of code, such as those arising from syntactic structure and documentation, have a small but significant correlation with understandability. Further, we construct a binary classifier of understandability based on various interpretable code features, which has a small amount of discriminating power. Our encouraging results, based on a small data set, suggest that a useful metric of understandability could feasibly be created, but more data is needed.","PeriodicalId":6639,"journal":{"name":"2018 IEEE/ACM 15th International Conference on Mining Software Repositories (MSR)","volume":"1 1","pages":"314-318"},"PeriodicalIF":0.0000,"publicationDate":"2018-05-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"28","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2018 IEEE/ACM 15th International Conference on Mining Software Repositories (MSR)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3196398.3196441","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 28

Abstract

Previous research shows that developers spend most of their time understanding code. Despite the importance of code understandability for maintenance-related activities, an objective measure of it remains an elusive goal. Recently, Scalabrino et al. reported on an experiment with 46 Java developers designed to evaluate metrics for code understandability. The authors collected and analyzed data on more than a hundred features describing the code snippets, the developers' experience, and the developers' performance on a quiz designed to assess understanding. They concluded that none of the metrics considered can individually capture understandability. Expecting that understandability is better captured by a combination of multiple features, we present a reanalysis of the data from the Scalabrino et al. study, in which we use different statistical modeling techniques. Our models suggest that some computed features of code, such as those arising from syntactic structure and documentation, have a small but significant correlation with understandability. Further, we construct a binary classifier of understandability based on various interpretable code features, which has a small amount of discriminating power. Our encouraging results, based on a small data set, suggest that a useful metric of understandability could feasibly be created, but more data is needed.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
“自动评估代码可理解性”重新分析:组合度量很重要
先前的研究表明,开发人员将大部分时间花在理解代码上。尽管代码可理解性对于与维护相关的活动很重要,但是对它的客观度量仍然是一个难以捉摸的目标。最近,Scalabrino等人报告了一项由46名Java开发人员参与的实验,该实验旨在评估代码可理解性的指标。作者收集并分析了100多个特性的数据,这些特性描述了代码片段、开发人员的经验以及开发人员在测试中的表现,这些测试旨在评估理解能力。他们的结论是,所考虑的指标都不能单独捕获可理解性。期望通过多个特征的组合更好地捕获可理解性,我们对Scalabrino等人的研究数据进行了重新分析,其中我们使用了不同的统计建模技术。我们的模型表明,代码的一些计算特征,比如那些由语法结构和文档产生的特征,与可理解性有很小但很重要的相关性。在此基础上,我们基于各种可解释代码特征构造了一个可理解性二元分类器,该分类器具有少量的判别能力。我们基于一个小数据集的令人鼓舞的结果表明,可以创建一个有用的可理解性度量标准,但需要更多的数据。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Detecting and Characterizing Developer Behavior Following Opportunistic Reuse of Code Snippets from the Web The Open-Closed Principle of Modern Machine Learning Frameworks Prevalence of Confusing Code in Software Projects: Atoms of Confusion in the Wild Large-Scale Analysis of the Co-commit Patterns of the Active Developers in GitHub's Top Repositories Structured Information on State and Evolution of Dockerfiles on GitHub
×
引用
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