返回
An empirical study of code reuse between GitHub and stack overflow during software development
DOI:10.1016/j.jss.2024.111964.png)
摘要
En 中文
With the rise of programming Q&A websites (e.g., Stack Overflow) and the open-source movement, code reuse has become a common phenomenon. Our study aims to provide a comprehensive study of the code reuse behavior of programmers during software development, i.e., we mainly focus on the code reuse between the code snippets in the commits of open-source projects and the code snippets on Stack Overflow (SO). The open-source java project code dataset we construct contains 793 projects which include 342,148 modified code snippets, and the SO code dataset includes 1,355,617 posts. Then, we employ a code clone detection tool to identify the instances of code reuse between the modified code snippets of commits and the code snippets of the SO posts. We find that the average code reuse ratio of the projects is 6.32%, which will have a significant upward trend in the future. Additionally, we find that experienced developers seem to be more likely to reuse the code on SO, and prefer to reuse posts with more favorites and higher scores. We combine deep learning and topic analysis algorithms to fully exploit the semantic information of SO posts. The result shows a certain difference in the distribution of post types reused by bug-related commits and non-bug-related commits. We also discover that the code reuse ratio (14.44%) in java class files that have undergone multiple modifications is more than double the overall code reuse ratio (6.32%). Finally, we discuss the reuse habits of programmers and find that they may refer to multiple posts in one reuse, and these posts are related to a certain extent. From these results, our study provides multiple practical insights for different stakeholders: researchers, developers, and the SO platform.
Keyword:
Stack overflow
Code reuse
Code clone
Semantic analysis
期刊
IF:
4.1
论文数:
5.4K
被引数:
8.4K
机构
引用论文
Definitive evidence that a single N-glycan among three glycans on inducible costimulator is required for proper protein trafficking and ligand binding明确的证据表明,在可诱导的共刺激物上的三个聚糖中,单个N-聚糖对于适当的蛋白质运输和配体结合是必需的
Retrieving API Knowledge from Tutorials and Stack Overflow Based on Natural Language Queries从教程和基于自然语言查询的Stack Overflow中检索API知识
Synthesizing Data Using Variational Autoencoders for Handling Class Imbalanced Deep Learning使用变分自编码器合成数据以处理类不平衡深度学习
Toward Empirically Investigating Non-Functional Requirements of iOS Developers on Stack Overflow
IEEE ACCESS
IF3.6

