Abstract:At present,in the software code defect review and defect prediction,the researchers analyze the source code but ignore the code defect information.This paper analyzes the defect information and finds that the defect information has important reference value for the detection of similar defects.Based on this idea,this paper analyzes the information about the defect code in the software defect community Stack Overflow,and proposes a similar defect detection method based on the defect code feature analysis.First,this method analyzes the topic of the defect report by LDA model and classifies the defect report into different topics(categories)to statistically obtain the high-frequency defect categories;second,extracts features for the defect codes of the high-frequency defect categories;and finally constructs similarities based on the characteristics of the defect codes.Defect detection model.In order to verify the validity of the similar defect detection model,a diagnostic model is constructed based on the data defect data and the model is verified.The experimental results show that the method has a good effect on detecting similar defects in other codes.
亢振兴,赵逢禹,刘亚. Stack Overflow的缺陷代码特征分析与相似缺陷检测[J]. 小型微型计算机系统, 2021, 42(3): 661-665.
KANG Zhen-xing,ZHAO Feng-yu,LIU Ya. Defective Code Characteristics Analysis of Stack Overflow and Similar Defect Detection. Journal of Chinese Computer Systems, 2021, 42(3): 661-665.