English

SOTorrent: Studying the Origin, Evolution, and Usage of Stack Overflow Code Snippets

Software Engineering 2019-03-20 v2

Abstract

Stack Overflow (SO) is the most popular question-and-answer website for software developers, providing a large amount of copyable code snippets. Like other software artifacts, code on SO evolves over time, for example when bugs are fixed or APIs are updated to the most recent version. To be able to analyze how code and the surrounding text 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 and code blocks. It connects code snippets from SO posts to other platforms by aggregating URLs from surrounding text blocks and comments, and by collecting references from GitHub files to SO posts. Our vision is that researchers will use SOTorrent to investigate and understand the evolution and maintenance of code on SO and its relation to other platforms such as GitHub.

Cite

@article{arxiv.1809.02814,
  title  = {SOTorrent: Studying the Origin, Evolution, and Usage of Stack Overflow Code Snippets},
  author = {Sebastian Baltes and Christoph Treude and Stephan Diehl},
  journal= {arXiv preprint arXiv:1809.02814},
  year   = {2019}
}

Comments

4 pages, 4 figures, 16th International Conference on Mining Software Repositories (MSR 2019). arXiv admin note: substantial text overlap with arXiv:1803.07311

R2 v1 2026-06-23T03:58:54.151Z