Structuring Meaningful Code Review Automation in Developer Community
Zhenzhen Cao,Sijia Lv,Xinlong Zhang,Hui Li,Qian Ma,Tingting Li,Cheng Guo,Shikai Guo
DOI: https://doi.org/10.1016/j.engappai.2023.106970
IF: 8
2023-10-23
Engineering Applications of Artificial Intelligence
Abstract:Software code review is a crucial quality assurance procedure for software systems. As a result, some automated code review models have been proposed that jointly consider the reviewer's comments and code. It is worth noting that these previous models have not solved the problem of insufficient diversity of generated code, which can lead to a low accuracy of generated modified code. Therefore, we introduce a method, called SMILER (Structuring Meaningful Code Review), to improve the effectiveness of code review by enhancing the diversity of generated code. Specifically, SMILER consists of two models, where each model consists of four components, i.e., encoder , decoder , prior net and posterior net . The encoder and decoder learn parameters and generate possible code for automating the process of code review. In the prior net and posterior net, Gaussian noise is introduced to increase the diversity of the generated code and improve the performance of the model. Experimental studies on 17,194 code pairs and triplets demonstrate that SMILER outperforms state-of-the-art models from the perspectives of both the reviewer and developer, respectively, in terms of perfect prediction.
automation & control systems,computer science, artificial intelligence,engineering, electrical & electronic, multidisciplinary