TL;DR
ConE (Concurrent Edit Detector) is a scalable service deployed at Microsoft that proactively identifies when multiple developers are editing the same files across different pull requests. By leveraging lightweight heuristics like the "Extent of Overlap" and identifying "Rarely Concurrently Edited" files, ConE provides early warnings that help developers avoid merge conflicts, logical bugs, and redundant work.
What Problem Does This Paper Address?
In large-scale software engineering, thousands of developers often work on a shared codebase simultaneously. This distributed environment frequently leads to concurrent edits, where two or more developers modify the same code areas in separate branches.
The consequences are costly:
- Merge Conflicts: Syntactic conflicts that break builds and waste hours of developer time.
- Semantic Conflicts: Logical bugs that arise when changes are technically compatible but functionally contradictory.
- Wasted Productivity: Developers may unknowingly spend days solving the same problem already addressed in another active pull request (PR).
Existing tools often fail because they are too "noisy" (generating too many false alarms), require complex client-side installations, or don't scale to the massive throughput of enterprise repositories.
Methods
The authors designed ConE to be language-agnostic, non-intrusive, and highly scalable. It operates as a cloud service that listens to events in Azure DevOps and analyzes PRs using two core concepts:
- Extent of Overlap (EOO): This measures the percentage of files in a "reference" PR that are also being modified in another active PR. If the overlap is high (e.g., >50%), the risk of conflict or duplicate effort is significant.
- Rarely Concurrently Edited Files (RCEs): The system identifies files that are historically edited in isolation. If two developers suddenly touch an RCE simultaneously, ConE flags it as an "anomalous phenomenon" requiring immediate attention.
To minimize "notification fatigue," ConE uses conservative thresholds and an allow-list of source code file types (e.g., .cs, .ts, .py), ignoring low-risk files like configuration or documentation. When a potential conflict is detected, it leaves a non-intrusive comment on the PR with deep links to the overlapping changes and a quick-chat button to contact the other developer.
Datasets
The researchers validated their approach using two primary data sources from Microsoft:
- Empirical Study Data: An analysis of six months of history from six large repositories (each with 1,000+ PRs per month). This involved 208,556 pull requests and 67,000 bug reports to establish the link between concurrent edits and bugs.
- Deployment Data: Telemetry from ConE's live deployment on 234 repositories across Microsoft, covering diverse domains like gaming, cloud services, and mobile apps.
Key Insights and Ideas
- Concurrent Edits are Bug Magnets: The authors found a statistically significant correlation between concurrent edits and future bug fixes. Files edited in multiple active PRs are much more likely to introduce bugs than those edited in isolation.
- Scale Changes Usefulness: Developers on large, distributed teams found ConE significantly more useful (77% positive feedback) than those on small teams (58%). In smaller teams, developers often have enough "tribal knowledge" to know what their peers are doing without a tool.
- Detecting "Shadow" Work: One of the most interesting findings was ConE's ability to detect duplicate work. In one instance, a developer abandoned their PR after ConE alerted them that another team was already solving the same issue, saving hours of redundant effort.
Key Results
- High Precision: Out of 775 recommendations made during the study, 71.48% were rated as useful by developers.
- User Adoption: Over 93% of interviewed users expressed intent to continue using the service daily.
- Performance: The system is remarkably fast, processing PR events end-to-end in less than four seconds, even at the scale of tens of thousands of events.
- Engagement: Developers didn't just read the warnings; they interacted with them, averaging 2.8 clicks per notification to investigate overlapping files or contact other authors.
Limitations and Future Work
- Granularity: Currently, ConE operates at the file level. The authors acknowledge that moving to code-level diff analysis (looking at specific lines or functions) could further reduce false alarms, though it would be more computationally expensive.
- Semantic Understanding: The authors suggest that applying deep learning or code embeddings could help the tool understand the intent of changes, allowing it to distinguish between harmless concurrent edits and truly dangerous ones.
- Automation: Future iterations could move beyond simple warnings to suggest automated resolutions or merges for detected conflicts.
- Contextual Bias: The study was conducted entirely within Microsoft. While the scale is vast, the results may vary in different organizational cultures or open-source environments.
Summary updated