Abstract: Software defect prediction helps improve software quality and allocate software test resources reasonably. Many defect prediction models based on software metrics have been proposed. However, the existing software metrics are mainly focused on structure information of source code, and the semantic information is lacking. Compilation optimization is the result of deep analysis of program semantics, and intuitively we believe that it should reflect the semantic information of the program in some ways to help defect prediction. Based on the optimization options widely used in the current compiler, this paper extracts 40 compilation optimization metrics based on DDG of program, and proposes seven types of metrics models that designed by different metrics sets. The relationship between compilation optimization metrics and software defect predictions was evaluated by 10 commonly used classifiers. Experimental results show: a) Compilation optimization metrics have a significant impact on the recall rate of software defect prediction. b) Static code metrics combined with compilation optimization metrics can improve the performance of software defect prediction in most classifiers. c) Code size optimization metrics and performance optimization metrics have their characteristics, combined both of them can get better performance in software defect prediction.
Loading