Abstract
Architecture erosion—the widening gap between a system's intended design and its actual implementation—is a major threat to software longevity. This study analyzes five years of code reviews from two massive OpenStack projects to show that while automated tools are useful, human reviewers are essential for spotting high-level design "smells" like architectural violations and cyclic dependencies before they become permanent technical debt.
Introduction
Software architecture serves as a building's blueprint; however, over time, "renovations" in the form of new features and bug fixes often deviate from that blueprint, leading to architecture erosion. This process makes systems brittle, difficult to maintain, and prone to failure. While automated static analysis tools exist, they often miss the underlying "why" behind design flaws and struggle with high-level concepts like ambiguous interfaces or project-specific design principles. This research argues that code reviews—the manual process where developers critique each other's work—are an untapped resource for identifying these symptoms early.
Methodology
The researchers conducted an empirical study on two of the most active Open Source Software (OSS) projects: OpenStack Nova (compute) and Neutron (networking). The study analyzed over 300,000 code review comments spanning a five-year period (2014–2018).
As illustrated in the methodology workflow, the process involved:
- Data Mining: Extracting comments from the OpenStack ecosystem.
- Keyword Search & Random Sampling: Using a refined set of keywords (e.g., "violation," "layer," "dependency") supplemented by random sampling to capture hidden discussions.
- Manual Labeling: Inspecting 21,274 comments to identify 502 specific instances of architecture erosion.
- Taxonomy Building: Classifying symptoms into four categories: Functionality-related, Dependency-related, Interface-related, and General structural smells.
Key Insights and Results
The study revealed that architectural issues are frequently discussed during routine code reviews, often disguised as bug fixes. Reviewers often realize that a specific bug is actually a symptom of a deeper design flaw, highlighting the importance of human "architectural awareness."
- The "Big Three" Symptoms: As shown in the distribution analysis, the most common issues flagged were architectural violations (breaking system layering rules), duplicate functionality, and cyclic dependencies.
- Architecture "Settles" Over Time: A declining trend in erosion symptoms was observed as projects matured, suggesting that architecture becomes better understood or "low-hanging" flaws are resolved over time.
- Effectiveness of Reviews: Identifying a symptom in a review is highly effective; nearly 90% of identified issues resulted in code fixes or the abandonment of problematic changes.
- Taxonomy Distribution: Structural symptoms (code smells) were far more common (82%) than direct violations of design rules (18%), indicating that reviewers are more sensitive to "messy" code than formal architectural breaches.
Conclusion
By demonstrating that code reviews serve as a viable "early warning system," this paper encourages development teams to look beyond automated linters and prioritize high-level design discussions during every pull request. Future work involves building machine learning models to automatically flag these architectural concerns, allowing human reviewers to focus on complex design logic rather than syntax and logic.
Summary updated