[论文解读] ConE: A Concurrent Edit Detection Tool for Large Scale Software Development
ConE 是一种可扩展的、基于启发式的方法,通过分析文件重叠程度和罕见的并发文件编辑,主动检测大规模软件仓库中拉取请求的并发编辑。该工具在微软内部部署后,6个月内识别出775起潜在冲突,超过70%的建议被认为具有实用性,显著减少了合并冲突和重复工作。
Modern, complex software systems are being continuously extended and adjusted. The developers responsible for this may come from different teams or organizations, and may be distributed over the world. This may make it difficult to keep track of what other developers are doing, which may result in multiple developers concurrently editing the same code areas. This, in turn, may lead to hard-to-merge changes or even merge conflicts, logical bugs that are difficult to detect, duplication of work, and wasted developer productivity. To address this, we explore the extent of this problem in the pull request based software development model. We study half a year of changes made to six large repositories in Microsoft in which at least 1,000 pull requests are created each month. We find that files concurrently edited in different pull requests are more likely to introduce bugs. Motivated by these findings, we design, implement, and deploy a service named ConE (Concurrent Edit Detector) that proactively detects pull requests containing concurrent edits, to help mitigate the problems caused by them. ConE has been designed to scale, and to minimize false alarms while still flagging relevant concurrently edited files. Key concepts of ConE include the detection of the Extent of Overlap between pull requests, and the identification of Rarely Concurrently Edited Files. To evaluate ConE, we report on its operational deployment on 234 repositories inside Microsoft. ConE assessed 26,000 pull requests and made 775 recommendations about conflicting changes, which were rated as useful in over 70% (554) of the cases. From interviews with 48 users we learned that they believed ConE would save time in conflict resolution and avoiding duplicate work, and that over 90% intend to keep using the service on a daily basis.
研究动机与目标
- 调查大规模、分布式软件开发环境中并发代码编辑的普遍性及其影响。
- 解决开发人员在未察觉的情况下同时编辑同一代码区域所导致的合并冲突和逻辑错误问题。
- 设计并部署一种可扩展、低干扰的工具,在冲突发生前主动警告开发人员潜在的并发编辑。
- 在保持高精度的同时最小化误报,以确保工具在真实工程工作流中的可采用性和可用性。
- 评估该工具在真实工业环境中的有效性,并评估开发者的感知和长期实用性。
提出的方法
- 通过分析历史变更数据中拉取请求之间的文件重叠程度,检测并发编辑。
- 识别‘极少并发编辑的文件’——即在拉取请求中极少被并行编辑的文件——作为潜在冲突的高风险候选。
- 应用可配置的启发式规则和过滤器,平衡精确率与召回率,减少误报同时保持覆盖率。
- 将 ConE 无缝集成到现有开发工作流中(如 Azure DevOps),无需新增客户端工具或工作流变更。
- 在 234 个微软仓库中规模化运行该系统,六个月内处理了 26,000 个拉取请求。
- 通过开发人员访谈和使用指标的反馈循环,持续优化检测逻辑并提升建议的相关性。
实验结果
研究问题
- RQ1在大规模软件仓库中,不同拉取请求对同一文件的并发编辑在多大程度上普遍存在?
- RQ2并发编辑与后续的错误修复或合并冲突之间存在何种统计关系?
- RQ3在大规模场景下,基于启发式的方法能否以高精确率和低误报率检测并发编辑?
- RQ4开发人员在真实工作流中如何感知并采纳一种主动的并发编辑检测工具?
- RQ5构建一种可扩展、低干扰且能无缝集成到现有开发流水线的工具,其关键设计原则是什么?
主要发现
- 在不同拉取请求中被并发编辑的文件,其引入缺陷的可能性显著更高,建立了并发编辑与缺陷密度之间的统计关联。
- ConE 在 234 个仓库中评估了 26,000 个拉取请求,生成了 775 条冲突建议,其中 554 条(71.48%)被开发人员评为有用。
- 对 48 名开发人员的访谈显示,93% 的反馈为正面,超过 90% 的开发人员表示愿意每天使用 ConE,主要原因是节省了冲突解决时间并避免了重复工作。
- 该系统通过利用重叠程度和罕见并发编辑检测实现了高精确率,尽管在大规模代码库中复杂度较高,但仍有效减少了误报。
- ConE 成功在微软内部规模化部署,证明了其在具有多种编程语言和工作流的跨国工程组织中的可行性与实用性。
- 该工具的设计——聚焦于工作流集成和低干扰性——是其被广泛采纳的关键,开发人员高度认可其主动且非干扰性的警告机制。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。