image: The process for context-based code reviewer recommendations
Credit: Dawei YUAN, Xiao PENG, Zijie CHEN, Tao ZHANG, Ruijia LEI
Code review is essential in software development, playing a vital role in enhancing product quality by catching mistakes early on. An integral part of this procedure is choosing the right reviewers to examine modifications to the code. Yet, in expansive open-source projects, pinpointing the ideal reviewers for certain changes can be quite complex. To address this, a research group led by Tao Zhang, in collaboration with Dawei Yuan and others, published their new research on 15 Jan 2025 in Frontiers of Computer Science co-published by Higher Education Press and Springer Nature.
The team proposed present the Code Context Based Reviewer Recommendation (CCB-RR), a model designed to suggest the ideal reviewers by analyzing changesets. This model factors in the paths of altered files and derives context from the changesets' titles and descriptions. Using KeyBERT, CCB-RR identifies pertinent keywords and gauges their semantic consistency across changesets. By amalgamating modified file paths, keyword data, and the context of code alterations, this model offers a holistic view of the changeset.
In the research, Due to the varied dimensions of contextual data, they enhanced the Context-Aware Network by employing KeyBERT [5] to derive keywords from source files and the Byte Pair Encoder (BPE) [6] method for code data processing. Within each network, the self-attention mechanism [7] is utilized to feature extraction and to capture global textual context.
They tested CCB-RR on four renowned open-source platforms: Android, OpenStack, Qt, and LibreOffice. The outcomes indicated that our model advanced performance in Top-k accuracy and MRR metrics. Remarkably, CCB-RR made accurate reviewer recommendations in 87% of cases within a Top-10 list. Furthermore, it achieved a Top-1 accuracy rate of 55% over the baselines, underscoring CCB-RR's proficiency in recommending code reviewers using our context-focused approach.
Future work aim to explore advanced contextual techniques for source files and evaluate more open-source projects to enhance our recommendation system.
DOI: 10.1007/s11704-023-3256-9
Journal
Frontiers of Computer Science
Method of Research
Experimental study
Subject of Research
Not applicable
Article Title
Code Context-Based Reviewer Recommendation
Article Publication Date
15-Jan-2025