|
|
Code context-based reviewer recommendation |
Dawei YUAN1, Xiao PENG1, Zijie CHEN1, Tao ZHANG1(), Ruijia LEI2 |
1. School of Computer Science and Engineering, Macau University of Science and Technology, Macao 999078, China 2. Faculty of Science, University of Amsterdam, Amsterdam WB 1018, Netherlands |
|
|
Abstract Code review is a critical process in software development, contributing to the overall quality of the product by identifying errors early. A key aspect of this process is the selection of appropriate reviewers to scrutinize changes made to source code. However, in large-scale open-source projects, selecting the most suitable reviewers for a specific change can be a challenging task. To address this, we introduce the Code Context Based Reviewer Recommendation (CCB-RR), a model that leverages information from changesets to recommend the most suitable reviewers. The model takes into consideration the paths of modified files and the context derived from the changesets, including their titles and descriptions. Additionally, CCB-RR employs KeyBERT to extract the most relevant keywords and compare the semantic similarity across changesets. The model integrates the paths of modified files, keyword information, and the context of code changes to form a comprehensive picture of the changeset. We conducted extensive experiments on four open-source projects, demonstrating the effectiveness of CCB-RR. The model achieved a Top-1 accuracy of 60%, 55%, 51%, and 45% on the Android, OpenStack, QT, and LibreOffice projects respectively. For Mean Reciprocal Rank (MRR), CCB achieved 71%, 62%, 52%, and 68% on the same projects respectively, thereby highlighting its potential for practical application in code reviewer recommendation.
|
Keywords
code reviewer recommendation
code context
pull request
|
Corresponding Author(s):
Tao ZHANG
|
Just Accepted Date: 18 October 2023
Issue Date: 12 March 2024
|
|
1 |
X, Xia D, Lo X, Wang X Yang . Who should review this change?: Putting text and file location analyses together for more accurate recommendations. In: Proceedings of the 31st IEEE International Conference on Software Maintenance and Evolution. 2015, 261–270
|
2 |
F, Shull C Seaman . Inspecting the history of inspections: an example of evidence-based technology diffusion. IEEE Software, 2008, 25( 1): 88–90
|
3 |
A, Chueshev J, Lawall R, Bendraou T Ziadi . Expanding the number of reviewers in open-source projects by recommending appropriate developers. In: Proceedings of the 36th IEEE International Conference on Software Maintenance and Evolution. 2020, 499–510
|
4 |
P, Thongtanunam C, Tantithamthavorn R G, Kula N, Yoshida H, Iida K I Matsumoto . Who should review my code? A file location-based code-reviewer recommendation approach for modern code review. In: Proceedings of the 22nd International Conference on Software Analysis, Evolution, and Reengineering. 2015, 141–150
|
5 |
Goto I, Tanaka H. Detecting untranslated content for neural machine translation. In: Proceedings of the 1st Workshop on Neural Machine Translation. 2017, 47–55
|
6 |
F Stahlberg . Neural machine translation: a review. Journal of Artificial Intelligence Research, 2020, 69: 343–418
|
7 |
A, Vaswani N, Shazeer N, Parmar J, Uszkoreit L, Jones A N, Gomez Ł, Kaiser I Polosukhin . Attention is all you need. In: Proceedings of the 31st International Conference on Neural Information Processing Systems. 2017, 6000–6010
|
8 |
Yu Y, Wang H, Yin G, Wang T. Reviewer recommendation for pull-requests in GitHub: what can we learn from code review and bug assignment? Information and Software Technology, 2016, 74: 204−218
|
9 |
M B, Zanjani H, Kagdi C Bird . Automatically recommending peer reviewers in modern code review. Transactions on Software Engineering, 2016, 42( 6): 530–543
|
10 |
A, Bacchelli C Bird . Expectations, outcomes, and challenges of modern code review. In: Proceedings of the 35th International Conference on Software Engineering. 2013, 712–721
|
11 |
P C, Rigby M A Storey . Understanding broadcast based peer review on open source software projects. In: Proceedings of the 33rd International Conference on Software Engineering. 2011, 541–550
|
12 |
Y, Yu H, Wang V, Filkov P, Devanbu B Vasilescu . Wait for it: determinants of pull request evaluation latency on GitHub. In: Proceedings of the 12th Working Conference on Mining Software Repositories. 2015, 367–371
|
13 |
Y, Tymchuk A, Mocci M Lanza . Code review: veni, ViDI, vici. In: Proceedings of the 22nd International Conference on Software Analysis, Evolution, and Reengineering. 2015, 151–160
|
14 |
X, Qiu T, Sun Y, Xu Y, Shao N, Dai X Huang . Pre-trained models for natural language processing: a survey. Science China Technological Sciences, 2020, 63( 10): 1872–1897
|
15 |
V, Lavrenko W B Croft . Relevance-based language models. ACM SIGIR Forum, 2017, 51( 2): 260–267
|
16 |
T, Mikolov I, Sutskever K, Chen G, Corrado J Dean . Distributed representations of words and phrases and their compositionality. In: Proceedings of the 26th International Conference on Neural Information Processing Systems. 2013, 3111–3119
|
17 |
J, Pennington R, Socher C Manning . GloVe: global vectors for word representation. In: Proceedings of the 19th Conference on Empirical Methods in Natural Language Processing. 2014, 1532–1543
|
18 |
L R, Cherney R C, Kaye J B, Lee Vuuren S van . Impact of personal relevance on acquisition and generalization of script training for aphasia: a preliminary analysis. American Journal of Speech-Language Pathology, 2015, 24( 4): S913–S922
|
19 |
N, Lourie Bras R, Le C, Bhagavatula Y Choi . UNICORN on RAINBOW: a universal commonsense reasoning model on a new multitask benchmark. In: Proceedings of the 35th AAAI Conference on Artificial Intelligence. 2021, 13480–13488
|
20 |
Z, Yang Z, Dai Y, Yang J, Carbonell R, Salakhutdinov Q V Le . XLNet: generalized autoregressive pretraining for language understanding. In: Proceedings of the 33rd International Conference on Neural Information Processing Systems. 2019, 517
|
21 |
Z, Liu W, Lin Y, Shi J Zhao . A robustly optimized BERT pre-training approach with post-training. In: Proceedings of the 20th China National Conference on Chinese Computational Linguistics. 2021, 471–484
|
22 |
Chi P H, Chung P H, Wu T H, Hsieh C C, Chen Y H, Li S W, Lee H Y. Audio albert: a lite bert for self-supervised learning of audio representation. In: Proceedings of 2021 IEEE Spoken Language Technology Workshop. 2021, 344−350
|
23 |
T B, Brown B, Mann N, Ryder M, Subbiah J, Kaplan P, Dhariwal A, Neelakantan P, Shyam G, Sastry A, Askell S, Agarwal A, Herbert-Voss G, Krueger T, Henighan R, Child A, Ramesh D M, Ziegler J, Wu C, Winter C, Hesse M, Chen E, Sigler M, Litwin S, Gray B, Chess J, Clark C, Berner S, McCandlish A, Radford I, Sutskever D Amodei . Language models are few-shot learners. In: Proceedings of the 34th International Conference on Neural Information Processing Systems. 2020, 159
|
24 |
C, Hannebauer M, Patalas S, Stünkel V Gruhn . Automatically recommending code reviewers based on their expertise: an empirical comparison. In: Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering. 2016, 99−110
|
25 |
E, Doğan E, Tüzün K A, Tecimer H A Güvenir . Investigating the validity of ground truth in code reviewer recommendation studies. In: Proceedings of the 13th International Symposium on Empirical Software Engineering and Measurement. 2019, 1−6
|
26 |
X, Ye Y, Zheng W, Aljedaani M W Mkaouer . Recommending pull request reviewers based on code changes. Soft Computing, 2021, 25( 7): 5619–5632
|
27 |
M, Fejzer P, Przymus K Stencel . Profile based recommendation of code reviewers. Journal of Intelligent Information Systems, 2018, 50( 3): 597–619
|
28 |
X Ye . Learning to rank reviewers for pull requests. IEEE Access, 2019, 7: 85382–85391
|
29 |
N, Firoozeh A, Nazarenko F, Alizon B Daille . Keyword extraction: issues and methods. Natural Language Engineering, 2020, 26( 3): 259–291
|
30 |
J, Piskorski N, Stefanovitch G, Jacquet A Podavini . Exploring linguistically-lightweight keyword extraction techniques for indexing news articles in a multilingual set-up. In: Proceedings of the 16th EACL Hackashop on News Media Content Analysis and Automated Report Generation. 2021, 35−44
|
31 |
F, Weninger J, Geiger M, Wöllmer B, Schuller G Rigoll . Feature enhancement by deep LSTM networks for ASR in reverberant multisource environments. Computer Speech & Language, 2014, 28( 4): 888–902
|
32 |
N, Jiang T, Lutellier L Tan . CURE: code-aware neural machine translation for automatic program repair. In: Proceedings of the 43rd International Conference on Software Engineering. 2021, 1161−1173
|
33 |
A, Ouni R G, Kula K Inoue . Search-based peer reviewers recommendation in modern code review. In: Proceedings of the 32nd International Conference on Software Maintenance and Evolution. 2016, 367−377
|
34 |
M, Chouchen A, Ouni M W, Mkaouer R G, Kula K Inoue . WhoReview: a multi-objective search-based approach for code reviewers recommendation in modern code review. Applied Soft Computing, 2021, 100: 106908
|
35 |
R, Campos V, Mangaravite A, Pasquali A, Jorge C, Nunes A Jatowt . YAKE! Keyword extraction from single documents using multiple local features. Information Sciences, 2020, 509: 257–289
|
36 |
N M, Nasrabadi R A King . Image coding using vector quantization: a review. IEEE Transactions on Communications, 1988, 36( 8): 957–971
|
37 |
Lima Junior M L, de D M, Soares A, Plastino L Murta . Automatic assignment of integrators to pull requests: the importance of selecting appropriate attributes. Journal of Systems and Software, 2018, 144: 181–196
|
38 |
E, Mirsaeedi P C Rigby . Mitigating turnover with code review recommendation: balancing expertise, workload, and knowledge distribution. In: Proceedings of the 42nd International Conference on Software Engineering. 2020, 1183−1195
|
39 |
W H A, Al-Zubaidi P, Thongtanunam H K, Dam C, Tantithamthavorn A Ghose . Workload-aware reviewer recommendation using a multi-objective search-based approach. In: Proceedings of the 16th ACM International Conference on Predictive Models and Data Analytics in Software Engineering. 2020, 21−30
|
40 |
V Balachandran . Reducing human effort and improving quality in peer code reviews using automatic static analysis and reviewer recommendation. In: Proceedings of the 35th International Conference on Software Engineering. 2013, 931−940
|
41 |
S, Asthana R, Kumar R, Bhagwan C, Bird C, Bansal C, Maddila S, Mehta B Ashok . WhoDo: automating reviewer suggestions at scale. In: Proceedings of the 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 2019, 937−945
|
42 |
G, Salton C Buckley . Term-weighting approaches in automatic text retrieval. Information Processing & Management, 1988, 24( 5): 513–523
|
43 |
R, Mihalcea P Tarau . TextRank: bringing order into text. In: Proceedings of the 2nd Conference on Empirical Methods in Natural Language Processing. 2004, 404−411
|
44 |
G, Erkan D R Radev . LexRank: graph-based lexical centrality as salience in text summarization. Journal of Artificial Intelligence Research, 2004, 22: 457–479
|
45 |
T D, Nguyen M T Luong . WINGNUS: keyphrase extraction utilizing document logical structure. In: Proceedings of the 5th International Workshop on Semantic Evaluation. 2010, 166−169
|
46 |
S, Rebai A, Amich S, Molaei M, Kessentini R Kazman . Multi-objective code reviewer recommendations: balancing expertise, availability and collaborations. Automated Software Engineering, 2020, 27( 3-4): 301–328
|
47 |
H A, Çetin E, Doğan E Tüzün . A review of code reviewer recommendation studies: challenges and future directions. Science of Computer Programming, 2021, 208: 102652
|
48 |
Kong D, Chen Q, Bao L, Sun C, Xia X, Li S. Recommending code reviewers for proprietary software projects: a large scale study. In: Proceedings of 2022 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER). 2022, 630−640
|
49 |
R, Li P, Liang P Avgeriou . Code reviewer recommendation for architecture violations: an exploratory study. In: Proceedings of the 27th International Conference on Evaluation and Assessment in Software Engineering. 2023, 42−51
|
|
Viewed |
|
|
|
Full text
|
|
|
|
|
Abstract
|
|
|
|
|
Cited |
|
|
|
|
|
Shared |
|
|
|
|
|
Discussed |
|
|
|
|