Gathering GitHub OSS Requirements from Q&A Community: an Empirical Study

Hao Huang, Yao Lu, Xinjun Mao

TL;DR

This paper explores the growing trend of "cross-community requirements gathering," where open-source developers on GitHub identify new features, bugs, and performance needs by mining discussions on Stack Overflow (SO). The study reveals that this practice is a vital source for non-functional requirements (like security and reliability) and that mentioning specific repository names in SO posts significantly accelerates the speed at which these needs are addressed.

What Problem Does This Paper Address?

In Open Source Software (OSS), requirements engineering is often informal. Unlike traditional software development with strict specifications, OSS requirements usually emerge from "the crowd" via issue trackers. However, a gap exists: users often discuss their frustrations, bugs, and desired features on Q&A sites like Stack Overflow rather than filing formal GitHub issues.

The authors set out to understand how developers bridge this gap. They investigate how often GitHub developers use SO as a source for requirements, what kind of requirements they find there, and which types of users are most active in this cross-community collaboration.

Methods

The researchers conducted an empirical study using a combination of automated data mining and manual qualitative analysis:

  1. Data Linking: They correlated GitHub issues with Stack Overflow posts by extracting SO links embedded in GitHub issue descriptions.
  2. Stratified Sampling: From a raw dataset of 3,266 issues containing SO links, they sampled and manually annotated 1,034 issues that specifically represented software requirements.
  3. Manual Classification: The team categorized these requirements into two frameworks:
  4. Type: Bug, Feature, or Enhancement.
  5. Nature: Functional Requirements (FR) vs. Non-Functional Requirements (NFR).
  6. Behavioral Analysis: They analyzed user metadata (reputation on SO, contribution roles on GitHub) and "Response Time"—the duration between an SO post's creation and the corresponding GitHub issue's creation.

Datasets

The study utilized two massive, well-known open-source archives:

  • GHTorrent: A mirror of data from the GitHub API, providing details on repositories, issues, and commits.
  • SOTorrent: An open dataset based on official Stack Overflow data dumps, used to track the history and metadata of Q&A posts. The final analyzed dataset focused on 1,034 software requirements linked across 864 different OSS projects (including major projects like TensorFlow and Flutter).

Key Insights and Ideas

  • The "Enhancement" Engine: Over half (52.4%) of the requirements gathered from SO are "enhancements" to existing code, rather than entirely new features or simple bug fixes. This suggests SO is a primary site for "refining" software based on real-world usage hurdles.
  • A Goldmine for Non-Functional Requirements (NFRs): Surprisingly, 73% of the requirements gathered from SO were non-functional, focusing on security, reliability, and performance. The authors suggest this is because users often struggle to articulate these technical needs directly on GitHub, but describe the symptoms (e.g., "this is slow" or "this crashed") on SO.
  • The Power of the Tag: When an SO post explicitly mentions a GitHub repository name (in the title, body, or as a tag), the median "Response Time" for a developer to create a corresponding GitHub issue is just 4 days. Without the repository name, the median jumps to roughly 1,000 days.
  • Who is Listening? The collaboration is driven by "power users." On SO, "trusted users" (20k+ reputation) contribute the most requirements. On GitHub, it is primarily the Repository Owners (55.5%) who act on these external insights.

Key Results

  • Prevalence: The practice is widespread; the study identified over 17,000 instances of GitHub Wikis/Issues citing SO, with a rapid growth spike starting in 2015.
  • Requirement Distribution:
    • Enhancements: 52.42%
    • Bugs: 32.67%
    • Features: 14.92%
  • Efficiency: Citing multiple SO links in a single GitHub issue is common; 16.8% of these issues provide direct solutions from SO, and 15.4% provide code examples, effectively turning a "requirement" into a "ready-to-implement" task.

Limitations and Future Work

  • Manual Annotation Scale: Due to the time-consuming nature of manual labeling, the sample size (1,034 requirements) is relatively small compared to the millions of issues on GitHub.
  • Link Selection: The study primarily analyzed the first SO link in an issue. Since many issues contain multiple links, some context or secondary requirements might have been missed.
  • Future Direction: The authors propose developing a two-way recommendation tool that could automatically alert GitHub developers when a relevant problem is being discussed on Stack Overflow, and vice-versa, to further tighten the feedback loop between users and maintainers.

Summary updated

Abstract

Cross-community collaboration can exploit the expertise and knowledges of crowds in different communities. Recently increasing users in open source software (OSS) community like GitHub attempt to gather software requirements from question and answer (Q&A) communities such as Stack Overflow (SO). In order to investigate this emerging cross-community collaboration phenomenon, the paper presents an exploratory study on cross-community requirements gathering of OSS projects in GitHub. We manually sample 3266 practice cases and quantitatively analyze the popularity of the phenomenon, the characteristics of the gathered requirements, and cross-community collaboration behaviors of users. Some important findings are obtained: more than half of the requirements gathered from SO are enhancements and the majority of the gathered requirements are non-functional requirements. In addition, OSS developers can directly obtain related solutions and contributions of the gathered requirements from SO in the gathering process.
BibTeX
@inproceedings{huang2020gathering,
  author = {Hao Huang and Yao Lu and Xinjun Mao},
  title = {{Gathering GitHub OSS Requirements from Q\&A Community: an Empirical Study}},
  booktitle = {ICECCS},
  year = {2020},
  url = {https://openreview.net/forum?id=RMY4DQwAE3},
}

Loading related content...

Figure