LLM-Based Automated Software Testing and Self-Healing Code Generation for Reliable Healthcare Software Systems Using Reinforcement Learning

Main Article Content

Latha H R, J. Gul Shaira Banu, Sumit Gupta, Seema H R, Rajgopal K.T, Pavithra A C

Abstract

Large language models trained on source code propose plausible repairs for defective programs, but they judge their own output poorly: the patch a model ranks first is often wrong while a correct patch sits lower in the same beam. This work separates generation from commitment. A frozen code language model proposes several candidates per defect and a policy trained by reinforcement learning decides which to commit, observing only whether the patch it chose passed. Two studies isolate where the difficulty lies. On the CodeXGLUE code-refinement benchmark the model reaches 23.43% exact match at rank one against an oracle ceiling of 40.71%, yet the learned selector recovers only 23.86%, closing 2.5% of the reachable gap. A supervised ranker holding every correctness label does no better, which identifies the descriptors rather than the learning algorithm as the binding constraint: signals computed without executing a patch barely separate correct repairs from incorrect ones. The second study supplies the missing signal by compiling and running each candidate against the program’s own tests. The same bandit formulation, now rewarded by measured outcomes and using no language model, fully repairs 5 of 31 programs and lifts the mean proportion of passing tests from 26.45% to 46.40%. Execution, not learned static ranking, is what makes patch selection work.

Article Details

Section
Articles