Context. Modern Code Review (MCR) is being adopted in both open source and commercial projects as a common practice. MCR is a widely acknowledged quality assurance practice that allows early detection of defects as well as poor coding practices. It also brings several other benefits such as knowledge sharing, team awareness, and collaboration.
Problem. In practice, code reviews can experience significant delays to be completed due to various socio-technical factors which can affect the project quality and cost. For a successful review process, peer reviewers should perform their review tasks in a timely manner while providing relevant feedback about the code change being reviewed. However, there is a lack of tool support to help developers estimating the time required to complete a code review prior to accepting or declining a review request.
Objective. Our objective is to build and validate an effective approach to predict the code review completion time in the context of MCR and help developers better manage and prioritize their code review tasks.
Method. We formulate the prediction of the code review completion time as a learning problem. In particular, we propose a framework based on regression models to (i) effectively estimate the code review completion time, and (ii) understand the main factors influencing code review completion time.
在本文中,我们提出了一种新的端到端的AI辅助代码完成方法,称为Pythia。它生成方法和API建议的排名列表,可供软件开发人员在编辑时使用。该系统目前部署为Visual Studio Code IDE中Intellicode扩展的一部分。Pythia利用了最先进的大规模深度学习模型,这些模型是在从抽象语法树中提取的代码上下文上训练的。它被设计为在高吞吐量下工作,预测100个$ms$数量级的最佳匹配代码完成。我们描述了该系统的架构,执行比较基于频率的方法和基于调用的马尔可夫链语言模型,并讨论了轻量级客户端设备上的Pythia模型服务的挑战。在2700个Python开源软件GitHub存储库上获得的离线评估结果显示,对于项目内和跨项目设置,前5名的准确率为92%,超过基线模型20%。
Comparative Analysis of Large Language Models for Context-Aware Code Completion using SAFIM Framework
University of California San Diego(加利福尼亚大学圣迭戈分校);Simon Fraser University(西蒙菲莎大学);Duke University(杜克大学);University of Amsterdam(阿姆斯特丹大学);Johns Hopkins University(约翰斯·霍普金斯大学)
When Neural Code Completion Models Size up the Situation: Attaining Cheaper and Faster Completion through Dynamic Model Inference
Beihang University(北京航空航天大学);Monash University(莫纳什大学);State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所计算机科学国家重点实验室);University of Chinese Academy of Sciences(中国科学院大学);Nanjing Institute of Software Technology(南京软件技术研究所);National University of Defense Technology(国防科技大学);Yunnan Key Laboratory of Software Engineering(云南省软件工程重点实验室)