A Just-in-time Software Defect Detection Method Using Generative Adversarial Networks

Nan Luo,Ying Ma,Jianmin Li,Yanqi Xie
DOI: https://doi.org/10.1109/icecai58670.2023.10176967
2023-01-01
Abstract:As a branch of software defect detection research, Juts-in-time software defect prediction mainly detects defects with the detection granularity of change level. Change-level defect detection means that when the project developer commits code, whether there are defects in the introduced code are detected. When the defect detection model classifies the code submitted by project developers as introducing defects to commit changes, developers need to modify their submitted changes to be classified as clean classes. Investigation shows that some project developers choose to ignore the classification results of the software defect detection model, and only modify the code structure in the submitted changes, but not the code semantics, so that the software defect detection model marks their submitted changes as clean changes. This action by the developer is often referred to as a semantically preserved change. This paper introduces a just-in-time software defect detection model based on generative adversarial networks. The semantic equivalent code segments are generated by the generative adversarial model, and the generated data and original data are used to train the defect detection model, to improve the performance of the software defect detection model. The proposed method is tested on six project datasets commonly used in the field of just-in-time defect detection. The experimental results show that the proposed method can effectively detect whether there are software defects introduced by semantically preserved changes in the submitted changes.
What problem does this paper attempt to address?