Software Engineering
New Dataset Maps User Stories Directly to Real Code Changes
Researchers release STORY2DIFF, a collection of nearly 8,000 authentic user stories paired with actual pull requests, bridging the gap between requirements and implementation.
A team of researchers has unveiled STORY2DIFF, a dataset designed to address a persistent challenge in software engineering: the scarcity of real-world examples linking authentic user requirements to their corresponding code implementations. The collection contains nearly 8,000 English user stories, each paired with merged pull requests from major open-source projects.
The Problem Being Solved#
Developing and testing systems that can automatically translate requirements into working code has been hampered by a fundamental limitation: existing repositories of user stories are largely theoretical or hand-crafted, rather than grounded in actual software development practices. This gap makes it difficult for researchers to build and validate models that understand how genuine business needs become implemented features.
What STORY2DIFF Contains#
The dataset draws from 982 publicly available Java and Python repositories, spanning changes from January 2017 through July 2026. Each entry bundles together several components: the original issue or requirement, extracted Connextra elements (the standard format for user stories), the associated pull request and commit information, file-level code diffs showing what changed, and snapshots of affected files before and after modification. This comprehensive pairing gives researchers concrete examples of how specific requirements were actually implemented in production systems.
Potential Applications#
The creators emphasize that STORY2DIFF can support multiple downstream use cases. Teams working on requirement discovery and traceability can use it to understand patterns in how specifications evolve. Engineers focused on change-impact analysis can train models to predict which parts of a codebase are affected by specific requirement changes. Perhaps most ambitiously, the dataset could fuel advances in requirements-aware code generation—systems that directly produce code tailored to specific user needs.
Building for Extensibility#
The researchers also released the mining tool they used to construct the dataset, allowing future researchers to extract similar records using different parameters or time windows. This approach means the dataset can grow and evolve as new repositories and timeframes become relevant to the community.