Self-Healing AI: An Autonomous Deep Learning Approach for Software Error Correction

Authors

Keywords:

self-healing software, automated program repair, deep learning, fault localisation, anomaly detection, software reliability

Abstract

Software failures in production are usually corrected by engineers after users have been affected. Self-healing systems aim to shorten that cycle by detecting an error, locating its cause, and producing a validated correction with little human involvement. This paper presents a self-healing framework with four deep learning components: a bidirectional LSTM that detects abnormal behaviour in runtime logs, a statement-level fault localiser, a transformer that generates candidate patches, and a test-based validator that accepts a patch only if the failing test passes and the existing tests remain green. The framework was evaluated by simulation on 395 Defects4J bugs and 40 QuixBugs programs and compared with SequenceR, CoCoNuT, CURE, Recoder and a fine-tuned CodeT5 under the same candidate budget. The framework produced correct patches for 79 of 395 Defects4J bugs (20.0%) and 30 of 40 QuixBugs programs (75.0%). It was significantly better than SequenceR, CoCoNuT and CURE (the last only marginally), but its advantage over Recoder (67 correct patches) was not statistically significant (p = 0.271). Removing fault localisation reduced correct patches from 79 to 52. The results suggest that automated correction is feasible for a fifth of single-location bugs and that accurate fault localisation matters more than the choice of generator.

Downloads

Download data is not yet available.

References

Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. de O., Kaplan, J., et al. (2021). Evaluating large language models trained on code. arXiv:2107.03374.

Chen, Z., Kommrusch, S., Tufano, M., Pouchet, L.-N., Poshyvanyk, D., & Monperrus, M. (2019). SequenceR: Sequence-to-sequence learning for end-to-end program repair. IEEE Transactions on Software Engineering, 47(9), 1943–1959.

Du, M., Li, F., Zheng, G., & Srikumar, V. (2017). DeepLog: Anomaly detection and diagnosis from system logs through deep learning. Proceedings of the ACM SIGSAC Conference on Computer and Communications Security, 1285–1298.

Gazzola, L., Micucci, D., & Mariani, L. (2019). Automatic software repair: A survey. IEEE Transactions on Software Engineering, 45(1), 34–67.

Jiang, N., Lutellier, T., & Tan, L. (2021). CURE: Code-aware neural machine translation for automatic program repair. Proceedings of the 43rd International Conference on Software Engineering, 1161–1173.

Just, R., Jalali, D., & Ernst, M. D. (2014). Defects4J: A database of existing faults to enable controlled testing studies for Java programs. Proceedings of the International Symposium on Software Testing and Analysis, 437–440.

Le Goues, C., Nguyen, T., Forrest, S., & Weimer, W. (2012). GenProg: A generic method for automatic software repair. IEEE Transactions on Software Engineering, 38(1), 54–72.

Lin, D., Koppel, J., Chen, A., & Solar-Lezama, A. (2017). QuixBugs: A multi-lingual program repair benchmark set based on the Quixey Challenge. Proceedings of SPLASH Companion, 55–56.

Lutellier, T., Pham, H. V., Pang, L., Li, Y., Wei, M., & Tan, L. (2020). CoCoNuT: Combining context-aware neural translation models using ensemble for program repair. Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis, 101–114.

Monperrus, M. (2018). Automatic software repair: A bibliography. ACM Computing Surveys, 51(1), 17.

Tufano, M., Watson, C., Bavota, G., Di Penta, M., White, M., & Poshyvanyk, D. (2019). An empirical study on learning bug-fixing patches in the wild via neural machine translation. ACM Transactions on Software Engineering and Methodology, 28(4), 19.

Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems, 30, 5998–6008.

Wang, Y., Wang, W., Joty, S., & Hoi, S. C. H. (2021). CodeT5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation. Proceedings of EMNLP, 8696–8708.

Xia, C. S., & Zhang, L. (2022). Less training, more repairing please: Revisiting automated program repair via zero-shot learning. Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, 959–971.

Zhu, Q., Sun, Z., Xiao, Y., Zhang, W., Yuan, K., Xiong, Y., & Zhang, L. (2021). A syntax-guided edit decoder for neural program repair. Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, 341–353.

Downloads

Published

3 December 2026

Issue

Section

Original Research Articles

How to Cite

Amit Mishra. (2026). Self-Healing AI: An Autonomous Deep Learning Approach for Software Error Correction. Scientific Journal of Artificial Intelligence and Blockchain Technologies, 3(4), 1-5. https://sjaibt.org/index.php/j/article/view/191