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

软件仓库文档中过期代码元素引用的检测

Detecting Outdated Code Element References in Software Repository Documentation

Wen Siang Tan, Markus Wagner, Christoph Treude

摘要:

过时的文档是软件开发中的一个普遍问题,它妨碍了软件的有效使用,并误导了用户和开发人员。我们认为,文档如此容易变得不同步的一个可能原因是开发人员不知道他们的源代码修改何时会使文档过时。确保文档始终与源代码同步需要相当大的努力,特别是对于大型代码库。为了解决这种情况,我们提出了一种方法,可以自动检测代码元素引用后,所有的源代码实例已被删除的文档中生存。在这项工作中,我们分析了3,000多个GitHub项目,发现大多数项目在其历史的某个时刻至少包含一个过时的代码元素引用。我们将GitHub问题提交给现实世界的项目,其中包含我们的方法检测到的过时引用,其中一些已经导致文档修复。作为保持软件存储库中文档最新的一项举措,我们已经为开发人员提供了我们的实现,以扫描他们的GitHub项目以查找过时的代码元素引用。

英文摘要:

Outdated documentation is a pervasive problem in software development, preventing effective use of software, and misleading users and developers alike. We posit that one possible reason why documentation becomes out of sync so easily is that developers are unaware of when their source code modifications render the documentation obsolete. Ensuring that the documentation is always in sync with the source code takes considerable effort, especially for large codebases. To address this situation, we propose an approach that can automatically detect code element references that survive in the documentation after all source code instances have been deleted. In this work, we analysed over 3,000 GitHub projects and found that most projects contain at least one outdated code element reference at some point in their history. We submitted GitHub issues to real-world projects containing outdated references detected by our approach, some of which have already led to documentation fixes. As an initiative toward keeping documentation in software repositories up-to-date, we have made our implementation available for developers to scan their GitHub projects for outdated code element references.

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

↑