Int J Performability Eng ›› 2026, Vol. 22 ›› Issue (11): 644-654.doi: 10.23940/ijpe.26.11.p3.644654

Previous Articles     Next Articles

LLM-Assisted Software Fault Detection and Automated Bug Repair Using Mutation Testing: An Experimental Evaluation of Prompting and Test-Feedback Techniques

Sushil Bhardwaja,*, Neeraj Kumar Sharmab, Tejinder Pal Singh Brarc, and Indu Sharmad   

  1. aRIMT University, Punjab, India;
    bPanjab University, Chandigarh, India;
    cCGC University, Punjab, India;
    dChandigarh University, Punjab, India
  • Submitted on ; Revised on ; Accepted on
  • Contact: *E-mail address: sushilbhardwaj@rimt.ac.in

Abstract: The use of Large Language Models (LLMs) in automated software testing and debugging is a growing area of interest. This study is an experimental investigation of the effectiveness of LLM prompting techniques for software fault detection, fault localization, and automated bug repair using mutation testing. A total of 159 lines of code and 33 test cases were evaluated in four Python programs. 32 mutants were created with six mutation operators, and 28 mutants were killed, resulting in an overall mutation score of 87.5%. Three prompting strategies (zero-shot, few-shot, and iterative test-feedback) were compared based on Fault Detection Rate (FDR), Fault Localization Accuracy (FLA), Repair Success Rate (RSR), Precision, Recall, and F1-score. The few-shot prompting and the zero-shot prompting methods showed balanced detection performance with the highest FDR (92.9%) and F1-score (91.2%) respectively. The experimental findings showed that there was a significant difference between the performance of fault detection and fault debugging. The prompting strategies yielded high fault-detection performance, but their effectiveness was significantly reduced for fault localization. The results suggest that the evaluated LLM prompting techniques were more successful in detecting incorrect behavior than in accurately determining the specific code locations that are responsible for the behavior or in creating validated corrective changes.

Key words: large language models, mutation testing, automated bug repair, zero-shot prompting, few-shot prompting, test feedback