一句话:提出基于超图的评审历史建模方法与推荐器 HGRec,刻画一个 PR 多评审者的高阶关系,提高准确率与推荐多样性。
现代代码评审是 pull-request 开发范式的关键实践,但在参与者众多的开源项目中找到合适评审者十分困难。现有评审者推荐器通常先建模评审历史再预测评审者,却未充分建模一个 PR 可能对应多个评审者且他们通过公开评论相互影响这一高阶关系。本文采用超图技术建模该关系,并开发推荐器 HGRec。作者在 12 个开源项目、超过 87K 个 PR 和 680K 条评论上,从准确率和推荐分布两方面进行评估。结果表明,HGRec 在推荐准确率上优于当前最优推荐器;同时,在排名前三的准确推荐器中,HGRec 更可能推荐多样化的评审者,有助于缓解核心评审者的工作负载拥塞问题。由于超图是自然且可解释的评审历史表示,该工作也为容纳更多实体类型与现实关系提供了可能。
Modern code review is a critical and indispensable practice in a pull-request development paradigm that prevails in Open Source Software (OSS) development. Finding a suitable reviewer in projects with massive participants thus becomes an increasingly challenging task. Many reviewer recommendation approaches (recommenders) have been developed to support this task which apply a similar strategy, i.e. modeling the review history first then followed by predicting/recommending a reviewer based on the model. Apparently, the better the model reflects the reality in review history, the higher recommender's performance we may expect. However, one typical scenario in a pull-request development paradigm, i.e. one Pull-Request (PR) (such as a revision or addition submitted by a contributor) may have multiple reviewers and they may impact each other through publicly posted comments, has not been modeled well in existing recommenders. We adopted the hypergraph technique to model this high-order relationship (i.e. one PR with multiple reviewers herein) and developed a new recommender, namely HGRec, which is evaluated by 12 OSS projects with more than 87K PRs, 680K comments in terms of accuracy and recommen-dation distribution. The results indicate that HGRec outperforms the state-of-the-art recommenders on recommendation accuracy. Besides, among the top three accurate recommenders, HGRec is more likely to recommend a diversity of reviewers, which can help to relieve the core reviewers' workload congestion issue. Moreover, since HGRec is based on hypergraph, which is a natural and interpretable representation to model review history, it is easy to accommodate more types of entities and realistic relationships in modern code review scenarios. As the first attempt, this study reveals the potentials of hypergraph on advancing the pragmatic solutions for code reviewer recommendation.