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

栈溢出岗位的演变:重构与分析

The Evolution of Stack Overflow Posts: Reconstruction and Analysis

Sebastian Baltes, Lorik Dumani, Christoph Treude, Stephan Diehl

摘要:

Stack Overflow(SO)是软件开发人员最受欢迎的问答网站,提供了大量关于各种主题的代码片段和自由格式的文本。像其他软件工件一样,SO上的问题和答案会随着时间的推移而演变,例如,当代码片段中的bug被修复时,代码被更新以使用更新的库版本,或者为了清晰起见编辑代码片段周围的文本时。为了能够分析SO上的内容如何演变,我们构建了SOTorrent,这是一个基于官方SO数据转储的开放数据集。SOTorrent提供对整个帖子和单个文本或代码块级别的SO内容的版本历史的访问。它通过聚合来自文本块和评论的URL,以及从GitHub文件收集对SO帖子的引用,将SO帖子连接到其他平台。在本文中,我们描述了我们如何构建SOTorrent,特别是我们如何评估134种不同的字符串相似性度量,以了解它们对重建文本和代码块的版本历史的适用性。基于使用数据集的不同分析,我们提出:(1)对SO职位演变的见解,例如,文章的编辑通常很小,在文章最初创建后不久就发生了,并且代码很少在不更新周围文本的情况下更改;(2)调查文章编辑和评论之间密切关系的定性研究,(3)对SO上的代码克隆进行首次分析,并调查可能的许可风险。最后,由于数据集的初始呈现,我们改进了后块提取和我们的前任匹配策略。

英文摘要:

Stack Overflow (SO) is the most popular question-and-answer website for software developers, providing a large amount of code snippets and free-form text on a wide variety of topics. Like other software artifacts, questions and answers on SO evolve over time, for example when bugs in code snippets are fixed, code is updated to work with a more recent library version, or text surrounding a code snippet is edited for clarity. To be able to analyze how content on SO evolves, we built SOTorrent, an open dataset based on the official SO data dump. SOTorrent provides access to the version history of SO content at the level of whole posts and individual text or code blocks. It connects SO posts to other platforms by aggregating URLs from text blocks and comments, and by collecting references from GitHub files to SO posts. In this paper, we describe how we built SOTorrent, and in particular how we evaluated 134 different string similarity metrics regarding their applicability for reconstructing the version history of text and code blocks. Based on different analyses using the dataset, we present: (1) insights into the evolution of SO posts, e.g., that post edits are usually small, happen soon after the initial creation of the post, and that code is rarely changed without also updating the surrounding text; (2) a qualitative study investigating the close relationship between post edits and comments, (3) a first analysis of code clones on SO together with an investigation of possible licensing risks. Finally, since the initial presentation of the dataset, we improved the post block extraction and our predecessor matching strategy.

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

↑