Pull requests dataset advances AI code generation across full features

PR4Code: A Pull Requests Dataset for AI Code Generation

Software Engineering

Summary

Coding AI tools usually focus on small snippets of code, but this paper presents a big collection of real coding jobs pulled from GitHub that show how whole features are built step-by-step. The authors created a dataset named PR4Code with thousands of Java and Python pull requests, including the history and details of all changes. This helps researchers and developers to better test and improve AI systems that write entire pieces of software, not just bits of code. They also included tools to update and recreate the dataset to keep it useful over time.

What this means in practice

  • For software engineering teams: Test AI tools with detailed real-world feature development examples to improve code generation quality and workflow integration.
  • For automated testing teams: Use diverse pull request histories to simulate development scenarios for more robust automated software testing environments.

Authors

Benedetta Donato, Leonardo Mariani, Daniela Micucci, Oliviero Riganelli

Abstract

AI-driven code generation is evolving from handling small, localized code-completion tasks toward supporting the implementation of full software features. To support this transition, this paper introduces PR4Code, a dataset of 4,508 Java and 8,831 Python curated Pull Requests (PRs) collected from GitHub, each enriched with metadata, commit histories, and detailed code changes. Unlike resources focused on isolated code fragments, PR4Code captures the feature implementation process, delivering a large and diverse collection of real-world development tasks that can be used to assess AI-driven solutions. Our analysis reveals substantial variability in PR structure, commit granularity, and textual content. In addition, we release scripts to regenerate and update the dataset, ensuring reproducibility and maintainability.