Studying the Change Histories of Stack Overflow and GitHub Snippets
Stack Overflow is a popular Q&A forum for software developers, providing a large number of copyable code snippets. While GitHub is a collaborative development platform, developers often reuse Stack Overflow code in their GitHub projects. These snippets get revised or edited on each platform. In this work, we study Stack Overflow posts and the code snippets that are reused from these posts in GitHub projects. We investigate and compare the change history of SO snippets with the change history of GitHub snippets. We have applied a stratified random sampling when mining 440,000 GitHub projects to create a dataset representing the change history of the reused snippets; this dataset contains 22,900 GitHub projects, 33,765 Stack Overflow references mapped to 4,634 Stack Overflow posts, and a total of 73,322 commits.
We analyze the evolution patterns of snippets on each platform, compare key trends, and explore the co-change of these snippets. Our results demonstrate that 76% of snippets evolve on Stack Overflow, while only 22% of the reused code snippets evolve in GitHub. Stack Overflow snippets undergo fewer and smaller changes compared to their evolving counterparts on GitHub. The evolution of snippets on both platforms is driven by the original author of the content. Finally, we found that a small percentage of snippets is co-changing across two platforms, while snippets in GitHub and Stack Overflow evolve independently of one another.
Wed 19 MayDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
17:00 - 17:50 | Change Management and AnalysisTechnical Papers / Registered Reports at MSR Room 2 Chair(s): Sarah Nadi University of Alberta | ||
17:01 4mTalk | Studying the Change Histories of Stack Overflow and GitHub Snippets Technical Papers Pre-print Media Attached | ||
17:05 4mTalk | Learning Off-By-One Mistakes: An Empirical Study Technical Papers Hendrig Sellik Delft University of Technology, Onno van Paridon Adyen N.V., Georgios Gousios Facebook & Delft University of Technology, Maurício Aniche Delft University of Technology Pre-print | ||
17:09 4mTalk | Predicting Design Impactful Changes in Modern Code Review: A Large-Scale Empirical Study Technical Papers Anderson Uchôa Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Caio Barbosa Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Daniel Coutinho Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Willian Oizumi Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Wesley Assunção Pontifical Catholic University of Rio de Janeiro (PUC-Rio), Silvia Regina Vergilio Federal University of Paraná, Juliana Alves Pereira PUC-Rio, Anderson Oliveira PUC-Rio, Alessandro Garcia PUC-Rio Pre-print | ||
17:13 4mTalk | Rollback Edit Inconsistencies in Developer Forum Technical Papers Saikat Mondal University of Saskatchewan, Gias Uddin University of Calgary, Canada, Chanchal K. Roy University of Saskatchewan Pre-print | ||
17:17 3mTalk | Assessing the Exposure of Software Changes: The DiPiDi Approach Registered Reports Pre-print | ||
17:20 4mTalk | On the Use of Dependabot Security Pull Requests Technical Papers Mahmoud Alfadel Concordia Univerisity, Diego Costa Concordia University, Canada, Emad Shihab Concordia University, Mouafak Mkhallalati Concordia University Pre-print | ||
17:24 26mLive Q&A | Discussions and Q&A Technical Papers |
Go directly to this room on Clowdr