Abstract
Autonomous Driving Systems (ADSes) represent some of the most complex software architectures in existence, integrating real-time decision-making with safety-critical requirements. While general software engineering has well-documented bug-fix patterns (BFPs), these often fail to capture the domain-specific nuances of autonomous vehicles. This paper presents the first large-scale empirical study of BFPs specifically within ADSes. By analyzing 1,331 bug fixes from the industry-leading Apollo and Autoware projects, we establish a new hierarchical taxonomy of 15 syntactic and 27 semantic fix patterns, providing a foundational benchmark to accelerate the development of automated repair tools for self-driving software.
Introduction
Autonomous Driving Systems are unique in their combination of high-stakes safety requirements and complex algorithmic stacks, including sensor fusion, localization, and path planning. When bugs occur in these systems, they are not merely code errors; they are often failures in how the vehicle perceives or interacts with its environment.
Existing research in software engineering frequently focuses on "syntactic" fixes—such as changing a variable assignment—while ignoring the "semantic" context, or the underlying reason why an algorithm failed in a specific driving scenario. This study bridges that gap by providing a structured framework to understand how ADS-specific bugs manifest and how developers resolve them in practice.
Methodology
The researchers conducted an extensive manual study of two major open-source ADS projects: Baidu Apollo (used by industry leaders like Ford and Volvo) and Autoware (a research-standard ADS selected by the US Department of Transportation). The methodology followed four key phases:
- Data Mining: The team scraped over 42,000 commits and 15,000 pull requests, using keyword filtering (e.g., "fix," "defect," "error") to identify potential bug fixes.
- Hierarchical Labeling: Each bug was viewed through seven distinct lenses: Root Cause, Symptom, Module, Sub-module, Algorithm, Syntactic Pattern, and Semantic Pattern.
- Validation: To ensure accuracy, each of the 1,331 bugs was independently labeled by two experts. Discrepancies were resolved through discussion, achieving a high inter-coder reliability (Cohen’s Kappa > 80%).
- Taxonomy Construction: The study derived two distinct taxonomies: a Syntactic taxonomy (15 patterns) focused on code-level changes, and a Semantic taxonomy (27 patterns) divided into domain-specific and domain-independent categories.
The Dataset
The resulting dataset consists of 1,331 integrated bug-fix instances (338 from Apollo and 993 from Autoware). This curated collection has been made publicly available to serve as a benchmark for future research in failure prediction and automated program repair (APR).
Key Insights and Findings
The Planning Bottleneck
The study identified the Planning module as the most complex and bug-prone area of the ADS stack. It accounts for the highest diversity of semantic fix patterns, with "Behavior Path Planning" and "Behavior Velocity Planning" emerging as primary hotspots for errors. The density of this module—featuring roughly 50 sub-modules in both projects—highlights the critical need for better modularization and encapsulation in ADS development.
Domain-Specific vs. Cross-Cutting Fixes
The researchers observed a distinction in how different types of fixes are distributed across the system:
- Domain-Specific Fixes: Adjustments to SLAM (Simultaneous Localization and Mapping) or Control algorithms tend to be localized within their respective modules.
- Domain-Independent Fixes: Specifically, Data Flow Correction (DFC) was found to be "cross-cutting," appearing frequently across every single module. DFC was the most common domain-independent semantic pattern (13.6%), suggesting that developers struggle significantly with how data is passed and processed between complex, asynchronous modules.
The "Stop" Gap
A surprising finding was the high frequency of bug fixes related to "STOP" behaviors (parking and stopping), totaling 178 instances. Despite the prevalence of these issues in the field, the researchers noted a lack of academic focus on optimizing these specific maneuvers, identifying a significant gap in current autonomous vehicle research.
Quantitative Results
- Syntactic Dominance: Method Call (MC) adjustments (23.9%) and If-related (IF) modifications (18.3%) are the most frequent code-level fixes. This indicates that control flow and component integration are the primary sources of syntactic friction.
- Semantic Leaders: Path Planning Optimization (PPO) is the most frequent domain-specific fix (22.9%), while Data Flow Correction (DFC) leads the domain-independent category (13.6%).
Limitations and Future Work
While the study provides a robust foundation, it is limited by the subjectivity inherent in manual labeling and its focus on open-source projects. Bug patterns in proprietary stacks (e.g., Tesla or Waymo) may differ due to different development cultures and internal toolchains.
Moving forward, the authors suggest using this taxonomy to design more effective Mutation Testing techniques and to train Automated Program Repair (APR) tools. By making these tools "aware" of ADS semantics, the community can move beyond simple code-level fixes toward sophisticated, algorithm-level corrections that improve the safety and reliability of autonomous vehicles.
Summary updated