arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.07087cs.SE
收藏

通用网络搜索引擎推荐的代码片段的可读性与可理解性:一项比较研究

Readability and Understandability of Snippets Recommended by General-purpose Web Search Engines: a Comparative Study

Federal University of Uberlândia(乌贝兰迪亚联邦大学)

Carlos Eduardo C. Dantas, Marcelo A. Maia

AI总结:

本文通过排名、搜索引擎和推荐站点三个变量,对Google、Yahoo!和Bing针对9,480个查询推荐的代码片段进行了可读性与可理解性的实证分析,发现部分站点表现显著更好,且排名靠前不代表质量更高。

摘要:

开发者经常在Google、Yahoo!或Microsoft Bing等通用网络搜索引擎上搜索可复用的代码片段。但其中一些代码片段在可读性或可理解性方面可能质量较差。本文提出一项实证分析,通过排名、通用网络搜索引擎和推荐站点三个独立变量,分析从网络提取的代码片段的可读性和可理解性得分。我们收集了9,480个查询在Google、Yahoo!和Bing上排名前5的推荐站点及其各自的代码片段推荐,并评估了它们的可读性和可理解性得分。我们发现,部分推荐站点的可读性和可理解性得分显著优于其他站点。对于所有通用网络搜索引擎,排名靠前的代码片段不一定比排名较低的代码片段更具可读性或可理解性。此外,就可读性得分而言,与Yahoo!或Microsoft Bing相比,Google拥有排名更优的代码片段。

英文摘要:

Developers often search for reusable code snippets on general-purpose web search engines like Google, Yahoo! or Microsoft Bing. But some of these code snippets may have poor quality in terms of readability or understandability. In this paper, we propose an empirical analysis to analyze the readability and understandability score from snippets extracted from the web using three independent variables: ranking, general-purpose web search engine, and recommended site. We collected the top-5 recommended sites and their respective code snippet recommendations using Google, Yahoo!, and Bing for 9,480 queries, and evaluate their readability and understandability scores. We found that some recommended sites have significantly better readability and understandability scores than others. The better-ranked code snippet is not necessarily more readable or understandable than a lower-ranked code snippet for all general-purpose web search engines. Moreover, considering the readability score, Google has better-ranked code snippets compared to Yahoo! or Microsoft Bing

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑