arrow
返回

How do developers utilize source code from stack overflow?

delete2018-07-04
delete85
delete
OA
AI
Y
Yuhao Wu
S
Shaowei Wang *
C
Cor‐Paul Bezemer
DOI:10.1007/s10664-018-9634-5delete
delete原文链接
delete分享
delete收藏
查看原文
摘要

摘要

En 中文
Technical question and answer Q&A platforms, such as Stack Overflow, provide a platform for users to ask and answer questions about a wide variety of programming topics. These platforms accumulate a large amount of knowledge, including hundreds of thousands lines of source code. Developers can benefit from the source code that is attached to the questions and answers on Q&A platforms by copying or learning from (parts of) it. By understanding how developers utilize source code from Q&A platforms, we can provide insights for researchers which can be used to improve next-generation Q&A platforms to help developers reuse source code fast and easily. In this paper, we first conduct an exploratory study on 289 files from 182 open-source projects, which contain source code that has an explicit reference to a Stack Overflow post. Our goal is to understand how developers utilize code from Q&A platforms and to reveal barriers that may make code reuse more difficult. In 31.5% of the studied files, developers needed to modify source code from Stack Overflow to make it work in their own projects. The degree of required modification varied from simply renaming variables to rewriting the whole algorithm. Developers sometimes chose to implement an algorithm from scratch based on the descriptions from Stack Overflow answers, even if there was an implementation readily available in the post. In 35.5% of the studied files, developers used Stack Overflow posts as an information source for later reference. To further understand the barriers of reusing code and to obtain suggestions for improving the code reuse process on Q&A platforms, we conducted a survey with 453 open-source developers who are also on Stack Overflow. We found that the top 3 barriers that make it difficult for developers to reuse code from Stack Overflow are: (1) too much code modification required to fit in their projects, (2) incomprehensive code, and (3) low code quality. We summarized and analyzed all survey responses and we identified that developers suggest improvements for future Q&A platforms along the following dimensions: code quality, information enhancement & management, data organization, license, and the human factor. For instance, developers suggest to improve the code quality by adding an integrated validator that can test source code online, and an outdated code detection mechanism. Our findings can be used as a roadmap for researchers and developers to improve code reuse.
AI总结

AI总结

对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。

期刊

Empirical Software Engineering 封面图
Empirical Software Engineering
IF:
3.6
论文数:
2.0K
被引数:
5.3K

机构

Q
queens university - canada
学者数:
1.8W
论文数: 1.7W
被引数: 29
T
the university of osaka
学者数:
2.8W
论文数: 1.8W
被引数: 6
引用论文

引用论文

Programmed sample delivery on a pressurized paper
err2014-10-24
err0
errOAAI
errJoong Ho Shin; Juhwan Park; Seung Hoon Kim; Je-Kyun Park
err分享
err收藏
No Perisaccadic Mislocalization with Abruptly Cancelled Saccades
err2014-04-16
err0
errOAAI
errJeroen Atsma; Femke Maij; Brian D. Corneil; W. Pieter Medendorp
err分享
err收藏
err分享
err收藏
EnTagRec++: An enhanced tag recommendation system for software information sites
err2017-07-21
err60
errOAAI
errWang, Shaowei; Lo, David; Vasilescu, Bogdan; Serebrenik, Alexander
err分享
err收藏
What do developers search for on the web?
err2017-04-09
err132
PREAI
errXia, Xin; Bao, Lingfeng; Lo, David; Kochhar, Pavneet Singh; Hassan, Ahmed E.; Xing, Zhenchang
err分享
err收藏
What Do Developers Use the Crowd For? A Study Using Stack Overflow
err2017-03-01
err53
PREAI
errAbdalkareem, Rabe; Shihab, Emad; Rilling, Juergen
err分享
err收藏
err分享
err收藏
Neuroscience research in Africa: Current status
err2016-06-01
err0
errOAAI
errFoad Abd-Allah; Najib Kissani; Anthony William; Mohammed Ibrahim Oraby; Ramez Reda Moustafa; Ehab Shaker; Mohamed Soliman El-Tamawy; Raad Shakir
err分享
err收藏
学者 查看更多内容