How Do Java Developers Reuse StackOverflow Answers in Their GitHub Projects?

08/18/2023
by   Juntong Chen, et al.
0

StackOverflow (SO) is a widely used question-and-answer (Q&A) website for software developers and computer scientists. GitHub is an online development platform used for storing, tracking, and collaborating on software projects. Prior work relates the information mined from both platforms to link user accounts or compare developers' activities across platforms. However, not much work is done to characterize the SO answers reused by GitHub projects. For this paper, we did an empirical study by mining the SO answers reused by Java projects available on GitHub. We created a hybrid approach of clone detection, keyword-based search, and manual inspection, to identify the answer(s) actually leveraged by developers. Based on the identified answers, we further studied topics of the discussion threads, answer characteristics (e.g., scores, ages, code lengths, and text lengths), and developers' reuse practices. We observed that most reused answers offer programs to implement specific coding tasks. Among all analyzed SO discussion threads, the reused answers often have relatively higher scores, older ages, longer code, and longer text than unused answers. In only 9 answer code for reuse. In the remaining scenarios, they reused partial code or created brand new code from scratch. Our study characterized 130 SO discussion threads referred to by Java developers in 357 GitHub projects. Our empirical findings can guide SO answerers to provide better answers, and shed lights on future research related to SO and GitHub.

READ FULL TEXT

page 1

page 7

research
02/08/2018

Usage and Attribution of Stack Overflow Code Snippets in GitHub Projects

Stack Overflow (SO) is the largest Q&A website for software developers, ...
research
01/25/2019

Unveiling Exception Handling Guidelines Adopted by Java Developers

Despite being an old language feature, Java exception handling code is o...
research
05/04/2018

Characterizing the Usage and Impact of Java Annotations Over 1000+ Projects

As a kind of meta-data feature, annotations have been formally introduce...
research
10/05/2017

Unusual Events in GitHub Repositories

In large and active software projects, it becomes impractical for a deve...
research
03/26/2023

A Lot of Talk and a Badge: An Empirical Analysis of Personal Achievements in GitHub

GitHub has introduced gamification via personal achievements, whereby ba...
research
03/18/2021

Tracking Hackathon Code Creation and Reuse

Background: Hackathons have become popular events for teams to collabora...
research
10/28/2017

DevRank: Mining Influential Developers In Github

As the social coding is becoming increasingly popular, understanding the...

Please sign up or login with your details

Forgot password? Click here to reset