Code search engines usually use readability feature to rank code snippets. There are several metrics to calculate this feature, but developers may have different perceptions about readability. Correlation between readability and understandability features has already been proposed, i.e., developers need to read and comprehend the code snippet syntax, but also understand the semantics. This work investigate scores for understandability and readability features, under the perspective of the possible subjective perception of code snippet comprehension. We find that code snippets with higher readability score has better comprehension than lower ones. The understandability score presents better comprehension in specific situations, e.g. nested loops or if-else chains. The developers also mentioned writability aspects as the principal characteristic to evaluate code snippets comprehension. These results provide insights for future works in code comprehension score optimization.


翻译:代码搜索引擎通常使用可读性特性来排序代码片断。 有好几项指标可以计算此特性, 但开发者可能对可读性有不同的看法。 已经提出了可读性和可理解性之间的关联, 即开发者需要阅读和理解代码片断语法, 但也需要理解语义。 这项工作根据对代码片断理解的可能主观认识来调查可读性和可读性特性的分数。 我们发现, 读性得分较高的代码片断比低的要更能理解。 可理解性评分显示在特定情况下, 如嵌套环或“ 叶子链 ” 。 开发者还提到可写性是评估代码片断理解的主要特征。 这些结果为今后在代码理解性评分优化中的工作提供了洞察力。

0
下载
关闭预览

相关内容

一个旨在提升互联网阅读体验的工具。 readability.com/
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
LibRec 精选:EfficientNet、XLNet 论文及代码实现
LibRec智能推荐
5+阅读 · 2019年7月9日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
RL 真经
CreateAMind
5+阅读 · 2018年12月28日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Python机器学习教程资料/代码
机器学习研究会
8+阅读 · 2018年2月22日
【推荐】Kaggle机器学习数据集推荐
机器学习研究会
8+阅读 · 2017年11月19日
计算机类 | 国际会议信息7条
Call4Papers
3+阅读 · 2017年11月17日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
【推荐】MXNet深度情感分析实战
机器学习研究会
16+阅读 · 2017年10月4日
Arxiv
3+阅读 · 2018年12月18日
Arxiv
5+阅读 · 2018年1月30日
VIP会员
相关VIP内容
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
相关资讯
LibRec 精选:EfficientNet、XLNet 论文及代码实现
LibRec智能推荐
5+阅读 · 2019年7月9日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
RL 真经
CreateAMind
5+阅读 · 2018年12月28日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Python机器学习教程资料/代码
机器学习研究会
8+阅读 · 2018年2月22日
【推荐】Kaggle机器学习数据集推荐
机器学习研究会
8+阅读 · 2017年11月19日
计算机类 | 国际会议信息7条
Call4Papers
3+阅读 · 2017年11月17日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
【推荐】MXNet深度情感分析实战
机器学习研究会
16+阅读 · 2017年10月4日
Top
微信扫码咨询专知VIP会员