Code Reviewer Recommendation Based on a Hypergraph with Multiplex Relationships

Yu Qiao, Jian Wang, Can Cheng, Wei Tang, Peng Liang, Yuqi Zhao, Bing Li · DOI

Introduction

Modern Code Review (MCR) is essential for maintaining software quality in large-scale open-source projects. However, the rapid growth of Pull Requests (PRs) has created a bottleneck, leading to increased review latency and reviewer fatigue. Selecting the appropriate reviewer is a complex task; existing tools often rely solely on historical review data, failing to capture the diverse roles developers play—such as creators, committers, and commenters. This paper introduces MIRRec, a recommendation system that utilizes hypergraphs to model these "multiplex" relationships, providing more accurate and context-aware reviewer suggestions.

Methodology: The MIRRec Framework

The core innovation of MIRRec is the use of a hypergraph to represent the intricate web of interactions within a software repository. Unlike traditional graphs that connect only two nodes at a time, a hyperedge can link multiple developers to a single PR, effectively capturing high-order collaborative patterns.

The MIRRec pipeline: from GitHub data extraction to hypergraph construction and ranking-based recommendation.

Multiplex Relationship Modeling

MIRRec constructs six types of hyperedges to represent developer behaviors:

  • PR-Creator/Committer/Reviewer: Linking PRs to their authors, code contributors, and historical reviewers.
  • PR-Issue/Review Commenter: Capturing participation in discussions.
  • PR-PR Similarity: Connecting PRs that modify similar file paths.

The system incorporates a time-sensitive decay function to prioritize recent expertise and an "experience attenuation" coefficient ($\mu$) to balance the influence of highly active contributors.

Experimental Evaluation

The authors evaluated MIRRec using a dataset of 48,374 PRs from ten diverse open-source projects, including Bitcoin, React, and Rails. The model's performance was measured against state-of-the-art baselines like RevFinder and HGRec using Accuracy (ACC@k) and Mean Reciprocal Rank (MRR).

Key Results and Discussion

MIRRec consistently outperformed existing methods. It achieved a 24.53% accuracy improvement over RevFinder and a 2.90% improvement over the previous hypergraph-based leader, HGRec.

Performance metrics (ACC and MRR) across different projects as a function of the experience attenuation coefficient μ.

Analysis revealed that historical reviewer and committer roles are the strongest indicators of future suitability. Interestingly, including "Review Commenter" data sometimes introduced noise, as these individuals are often already the assigned reviewers. The study also highlighted the importance of the "PR-Creator" relationship, acknowledging the deep domain knowledge authors possess regarding their specific modules.

Conclusion and Future Directions

MIRRec demonstrates that modeling the multifaceted roles of developers through hypergraphs significantly enhances reviewer recommendation. While the current model relies on historical "ground truth" (who actually reviewed), future work aims to incorporate review quality and developer workload. The researchers plan to deploy MIRRec as a GitHub Plugin to assist maintainers in real-time.

Summary updated

BibTeX
@inproceedings{qiao2024code,
  author = {Yu Qiao and Jian Wang and Can Cheng and Wei Tang and Peng Liang and Yuqi Zhao and Bing Li},
  title = {{Code Reviewer Recommendation Based on a Hypergraph with Multiplex Relationships}},
  booktitle = {SANER},
  year = {2024},
  doi = {10.1109/saner60148.2024.00049},
}
Figure