Statement Types and Error Rates: How are they Related for Boosting Fault Localization?

Guangjie Li, Yi Ping Tang, Biyi Yi, Yan He, Junchao Li, Fei Ren, Zhongwu Lin, Leping Lib · 2024

Bugs lead to security vulnerabilities of software. To fix bugs, accurate fault localization is critical for software debugging. Consequently, dozens of approaches have been proposed to locate faulty code entities. Most of such approaches depend on dynamic execution of test cases, e.g., the coverage information of passed and failed test cases. Some static features of source code, e.g., size and complexity of software entities, are also leveraged for fault localization. Although types of statements, as typical static code features, have long been associated with bugs, there is no quantitative investigation on the relation between statement types and error rates of statements. It remains unknown whether and how statement types could be exploited to boost statement-level fine-grained fault localization. To this end, in this paper, we conduct a quantitative study on the relation between statement types and error rates. Our results suggest that types of statements do have significant influence on the error rates of statements.We further investigate whether it is effective to boost statement-level fault localization approaches by assigning priorities to different statement types according their average error rates. Our results suggest that it does improve the performance of the widely-used spectrum-based fault localization (SBFL) and mutation-based fault localization (MBFL) variants. The improvement on top-1 recall is up to 43.5% and 36.8%, respectively. The findings may inspire a new line of research in statement-level fine-grained fault location by exploiting statement types of statements.

Read the paper · More papers on PaperTik