Abstract

Providing novice programs with useful feedback on faulty programs can effectively help students fix their pro-grams and reduce the teacher's guidance pressure. Spectrum-Based Fault Localization (SBFL), which is a widely-studied and lightweight technique, can automatically generate a suspicious rank list to help users focus on potential faulty parts of the programs. However, the performance of SBFL on novice pro-grams is not satisfactory, and some of programs even do not meet the prerequisites for using SBFL. To improve the fault localization accuracy of SBFL in novice programs, we propose a novel Variable value Sequence Based Fault Localization (VSBFL) approach. Specifically, we firstly collect and compare the se-quence of variable values in the novice programs. Then we design a matching algorithm to find the logically similar programs and provide our fault localization technique with reliable comparison objects. To evaluate the effectiveness of VSBFL, we conduct empirical studies on 448 real novice programs. The experimental results show that VSBFL can significantly outperform the state-of-the-art fault localization techniques. In particular, VSBFL can improve 21.6% than SBFL and 21.3% than Variable-based Fault Localization (VFL) in terms of EXAM metric. Besides, when checking the Top-l/3/5 statements in the rank list generated by different fault localization techniques, using VSBFL can find more faults than SBFL and VFL. These results indicate that VSBFL can achieve better fault localization performance than other two baselines in novice programs.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call