arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.05654cs.SE
收藏

使用编程语言知识单元为拉取请求推荐审阅者:一项实证研究

Using Knowledge Units of Programming Languages to Recommend Reviewers for Pull Requests: An Empirical Study

Md Ahasanuzzaman, Gustavo A. Oliva, Ahmed E. Hassan

AI总结:

本研究提出基于编程语言知识单元的代码审阅者推荐器KUREC,实证表明其性能与最佳基线相当且更稳定,组合推荐器整体更优。

摘要:

代码审查是软件开发中质量保证的关键要素。为给定的代码变更确定合适的审阅者,需要理解变更代码的特征、识别每位潜在审阅者的技能(专业知识档案),并在两者之间找到良好的匹配。为促进这一任务,我们设计了一个基于编程语言知识单元(KUs)的代码审阅者推荐器。我们将知识单元定义为由给定编程语言的一个或多个构建块所提供的、一组内聚的关键能力。我们使用Java编程语言的认证考试来操作化我们的知识单元。我们从GitHub上10个积极维护的Java项目中检测知识单元,这些项目涵盖290K次提交和65K个拉取请求(PRs)。接下来,我们基于检测到的知识单元生成开发者专业知识档案。最后,这些基于知识单元的专业知识档案被用于构建一个代码审阅者推荐器(KUREC)。在研究问题1(RQ1)中,我们观察到KUREC的表现与表现最佳的基线推荐器(RF)相当。从实践角度来看,我们强调KUREC的性能比RF更稳定(四分位距更低),因此更一致且可能更值得信赖。接下来,在研究问题2(RQ2)中,我们通过将KUREC与我们的基线推荐器相结合,设计了三个新的推荐器。这些新的组合推荐器在性能上优于KUREC和各个单独的基线。最后,在研究问题3(RQ3)中,我们评估了当KUREC和组合推荐器的推荐偏离地面真值时,这些推荐的合理性如何。综合所有研究问题的结果,我们得出结论:KUREC和其中一个组合推荐器(AD_FREQ)总体上优于我们所研究的基线推荐器。因此,该领域的未来工作应(i)将基于知识单元的推荐器视为基线,以及(ii)对组合推荐器进行实验。

英文摘要:

Code review is a key element of quality assurance in software development. Determining the right reviewer for a given code change requires understanding the characteristics of the changed code, identifying the skills of each potential reviewer (expertise profile), and finding a good match between the two. To facilitate this task, we design a code reviewer recommender that operates on the knowledge units (KUs) of a programming language. We define a KU as a cohesive set of key capabilities that are offered by one or more building blocks of a given programming language. We operationalize our KUs using certification exams for the Java programming language. We detect KUs from 10 actively maintained Java projects from GitHub, spanning 290K commits and 65K pull requests (PRs). Next, we generate developer expertise profiles based on the detected KUs. Finally, these KU-based expertise profiles are used to build a code reviewer recommender (KUREC). In RQ1, we observe that KUREC performs as well as the top-performing baseline recommender (RF). From a practical standpoint, we highlight that KUREC's performance is more stable (lower interquartile range) than that of RF, thus making it more consistent and potentially more trustworthy. Next, in RQ2 we design three new recommenders by combining KUREC with our baseline recommenders. These new combined recommenders outperform both KUREC and the individual baselines. Finally, in RQ3 we evaluate how reasonable the recommendations from KUREC and the combined recommenders are when those deviate from the ground truth. Taking together the results from all RQs, we conclude that KUREC and one of the combined recommenders (AD_FREQ) are overall superior to the baseline recommenders that we studied. Future work in the area should thus (i) consider KU-based recommenders as baselines and (ii) experiment with combined recommenders.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑