一句话:对约960万条源代码注释链接开展大规模实证研究,揭示其用途、演化与失效情况,并通过修复PR验证可修复性。
源代码注释中的链接对文档、归属说明和元数据很有价值,但存在衰败、版本管理不足和双向可追踪性缺失等问题。本文从这些角度研究源代码注释中链接的角色。作者对约960万条链接进行了大规模分析,并采用混合方法识别链接目标、用途、失效与演化特征。研究发现链接在代码仓库中普遍存在,许可证、软件主页和规范是常见目标,链接常用于提供元数据或归属信息;链接很少被更新,但许多目标已演化,且近10%的链接已失效。随后作者向开源仓库提交了一批修复链接的pull request,其中大多数修复被成功合并。结果表明源代码注释中的链接确实脆弱,并为后续改进提供了方向。
Links are an essential feature of the World Wide Web, and source code repositories are no exception. However, despite their many undisputed benefits, links can suffer from decay, insufficient versioning, and lack of bidirectional traceability. In this paper, we investigate the role of links contained in source code comments from these perspectives. We conducted a large-scale study of around 9.6 million links to establish their prevalence, and we used a mixed-methods approach to identify the links' targets, purposes, decay, and evolutionary aspects. We found that links are prevalent in source code repositories, that licenses, software homepages, and specifications are common types of link targets, and that links are often included to provide metadata or attribution. Links are rarely updated, but many link targets evolve. Almost 10% of the links included in source code comments are dead. We then submitted a batch of link-fixing pull requests to open source software repositories, resulting in most of our fixes being merged successfully. Our findings indicate that links in source code comments can indeed be fragile, and our work opens up avenues for future work to address these problems.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-1901-07440,
title = {9.6 Million Links in Source Code Comments: Purpose, Evolution, and Decay},
author = {Hideaki Hata and Christoph Treude and Raula Gaikovina Kula and Takashi Ishio},
booktitle = {ICSE},
year = {2019},
doi = {10.1109/icse.2019.00123}
}