How Do Java Developers Reuse StackOverflow Answers in Their GitHub Projects?
- URL: http://arxiv.org/abs/2308.09573v2
- Date: Thu, 29 Aug 2024 16:53:26 GMT
- Title: How Do Java Developers Reuse StackOverflow Answers in Their GitHub Projects?
- Authors: Juntong Chen, Yan Zhao, Na Meng,
- Abstract summary: 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.
We did an empirical study by mining the SO answers reused by Java projects available on GitHub.
- Score: 5.064338135936606
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: 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% of scenarios (40/430), developers fully copied 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.
Related papers
- CodeRAG-Bench: Can Retrieval Augment Code Generation? [78.37076502395699]
We conduct a systematic, large-scale analysis of code generation using retrieval-augmented generation.
We first curate a comprehensive evaluation benchmark, CodeRAG-Bench, encompassing three categories of code generation tasks.
We examine top-performing models on CodeRAG-Bench by providing contexts retrieved from one or multiple sources.
arXiv Detail & Related papers (2024-06-20T16:59:52Z) - StackRAG Agent: Improving Developer Answers with Retrieval-Augmented Generation [2.225268436173329]
StackRAG is a retrieval-augmented Multiagent generation tool based on Large Language Models.
It combines the two worlds: aggregating the knowledge from SO to enhance the reliability of the generated answers.
Initial evaluations show that the generated answers are correct, accurate, relevant, and useful.
arXiv Detail & Related papers (2024-06-19T21:07:35Z) - Long Code Arena: a Set of Benchmarks for Long-Context Code Models [75.70507534322336]
Long Code Arena is a suite of six benchmarks for code processing tasks that require project-wide context.
These tasks cover different aspects of code processing: library-based code generation, CI builds repair, project-level code completion, commit message generation, bug localization, and module summarization.
For each task, we provide a manually verified dataset for testing, an evaluation suite, and open-source baseline solutions.
arXiv Detail & Related papers (2024-06-17T14:58:29Z) - DevEval: Evaluating Code Generation in Practical Software Projects [52.16841274646796]
We propose a new benchmark named DevEval, aligned with Developers' experiences in practical projects.
DevEval is collected through a rigorous pipeline, containing 2,690 samples from 119 practical projects.
We assess five popular LLMs on DevEval and reveal their actual abilities in code generation.
arXiv Detail & Related papers (2024-01-12T06:51:30Z) - How is Software Reuse Discussed in Stack Overflow? [12.586676749644342]
We present an empirical study of 1,409 posts to better understand the challenges developers face when reusing code.
Our findings show that 'visual studio' is the top occurring bigrams for question posts, and there are frequent design patterns utilized by developers for the purpose of reuse.
arXiv Detail & Related papers (2023-11-01T03:13:36Z) - An empirical study of ChatGPT-3.5 on question answering and code
maintenance [14.028497274245227]
A rising concern is whether ChatGPT will replace programmers and kill jobs.
We conducted an empirical study to systematically compare ChatGPT against programmers in question-answering and software-maintaining.
arXiv Detail & Related papers (2023-10-03T14:48:32Z) - RepoCoder: Repository-Level Code Completion Through Iterative Retrieval
and Generation [96.75695811963242]
RepoCoder is a framework to streamline the repository-level code completion process.
It incorporates a similarity-based retriever and a pre-trained code language model.
It consistently outperforms the vanilla retrieval-augmented code completion approach.
arXiv Detail & Related papers (2023-03-22T13:54:46Z) - Looking for related discussions on GitHub Discussions [18.688096673390586]
GitHub Discussions is a native forum to facilitate collaborative discussions between users and members of communities hosted on the platform.
As GitHub Discussions resembles PCQA forums, it faces challenges similar to those faced by such environments.
While duplicate posts have the same content - and may be exact copies - near-duplicates share similar topics and information.
We propose an approach based on a Sentence-BERT pre-trained model: the RD-Detector.
arXiv Detail & Related papers (2022-06-23T20:41:33Z) - Features that Predict the Acceptability of Java and JavaScript Answers
on Stack Overflow [5.332217496693262]
We studied the Stack Overflow dataset by analyzing questions and answers for the two most popular tags (Java and JavaScript)
Our findings reveal that the length of code in answers, reputation of users, similarity of the text between questions and answers, and the time lag between questions and answers have the highest predictive power for differentiating accepted and unaccepted answers.
arXiv Detail & Related papers (2021-01-08T03:09:38Z) - Retrieve, Program, Repeat: Complex Knowledge Base Question Answering via
Alternate Meta-learning [56.771557756836906]
We present a novel method that automatically learns a retrieval model alternately with the programmer from weak supervision.
Our system leads to state-of-the-art performance on a large-scale task for complex question answering over knowledge bases.
arXiv Detail & Related papers (2020-10-29T18:28:16Z) - Code to Comment "Translation": Data, Metrics, Baselining & Evaluation [49.35567240750619]
We analyze several recent code-comment datasets for this task.
We compare them with WMT19, a standard dataset frequently used to train state of the art natural language translators.
We find some interesting differences between the code-comment data and the WMT19 natural language data.
arXiv Detail & Related papers (2020-10-03T18:57:26Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.