• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2022, Vol. 44 ›› Issue (12): 2187-2195.

• Software Engineering • Previous Articles     Next Articles

A lightweight software fault localization method based on statement complexity

 HE Hai-jiang   

  1. (College of Computer Engineering and Applied Mathematics,Changsha University,Changsha 410022,China)
  • Received:2021-11-25 Revised:2022-04-13 Accepted:2022-12-25 Online:2022-12-25 Published:2023-01-04

Abstract: In the program debugging process, software fault localization (SBFL) technology based on the program spectrum can provide effective help. In order to improve the performance of SBFL, a software fault localization method based on learning to rank is proposed, which combines program spectrum and static attributes of code statements. The optimal fault localization model is learned by the linear ranking support vector machine. The static attributes of code statements include the number of program entities such as local variables, class attributes, logical operators, and method invocations. On 22 actual fault projects developed in C, C++ and Java languages, the fault localization model was trained on the form of cross engineering. Experimental results confirm that the proposed method reduces the worst strategy EXAM by 37.1% and the average strategy EXAM by 22.6% compared with the optimal SBFL. Three types of lightweight features of program statements are also compared: structured categories, variable spectrum and static attributes. The time complexity of the proposed method is low, and it can recommend a sequence of sentences that may fail in real time.

Key words: software fault localization, program spectrum, variable spectrum, program static attri- bute, learning to rank, cross project