Cited by 43Software Testing and Debugging TechniquesSoftware Engineering ResearchWeb Application Security Vulnerabilities

Enhanced automated code vulnerability repair using large language models

Open access
de-Fitero-Dominguez, David, Garcia-Lopez, Eva, Garcia-Cabot, Antonio, Martinez-Herraiz, Jose-Javier·2024·Engineering Applications of Artificial Intelligence

Abstract

This research addresses the complex challenge of automated repair of code vulnerabilities, vital for enhancing digital security in an increasingly technology-driven world. The study introduces a novel and efficient format for the representation of code modification, using advanced Large Language Models (LLMs) such as Code Llama and Mistral. These models, fine-tuned on datasets featuring C/C++ code vulnerabilities, significantly improve the accuracy and adaptability of automated code repair techniques. A key finding is the enhanced repair accuracy of these models when compared to previous methods such as VulRepair, which underscores their practical utility and efficiency. The research also offers a critical assessment of current evaluation metrics, such as “Perfect Predictions”, and their limitations in reflecting the true capabilities of automated repair models in real-world scenarios. Following this, it underscores the importance of using test datasets devoid of train samples, emphasizing the need for dataset integrity to enhance the effectiveness of LLMs in code repair tasks. The significance of this work is its contribution to digital security, setting new standards for automated code vulnerability repair and paving the way for future advancements in the fields of cybersecurity and artificial intelligence. The study does not only highlight the potential of LLMs in enhancing code security but also fosters further exploration and research in these crucial areas.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1016/j.engappai.2024.109291

Cites

68 of 88 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • de-Fitero-Dominguez et al. (2024)'s fine-tuning on structured C code vulnerabilities enables automatic code repair without manual intervention.

    “The output of LLM is also structured and can be directly patched, which enables the code to be repaired automatically without manual intervention.”

    From When LLMs meet cybersecurity: a systematic literature review (2025) · cites this paper as de-Fitero-Dominguez et al. (2024)

    The Data format section (pp. 9–10) describes structured model output that specifies where additions, replacements, and deletions go, and says this simplifies applying changes to the original code. The Material and methods section (p. 7) confirms fine-tuning on C/C++ vulnerability datasets. Our copy does not establish that repairs are applied automatically without manual intervention. (LLM, conf=0.82)

    Experimental — accuracy not yet measured

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Flagged first, then by citations

Research works printed but not linked: 11

  1. Berabi, B., He, J., Raychev, V., & Vechev, M. (2021). TFix: Learning to Fix Coding Errors with a Textto-Text Transformer. In M. Meila & T. Zhang (Eds.), Proceedings of the 38th International Conference on Machine Learning (Vol. 139, pp. 780-791). PMLR. https://proceedings.mlr.press/v139/berabi21a.html
  2. Final published version in the Engineering Applications of Artificial Intelligence journal. Volume 138, Part A, December 2024, 109291
  3. Farahbod, K., Shayo, C., & Varzandeh, J. (2020). Cybersecurity indices and cybercrime annual loss and economic impacts. Journal of Business and Behavioral Sciences , 32 (1), 63-71.
  4. Final published version in the Engineering Applications of Artificial Intelligence journal. Volume 138, Part A, December 2024, 109291
  5. Jain, N., Chiang, P ., Wen, Y ., Kirchenbauer, J., Chu, H.-M., Somepalli, G., Bartoldson, B. R., Kailkhura, B., Schwarzschild, A., Saha, A., Goldblum, M., Geiping, J., & Goldstein, T. (2023). NEFTune: Noisy Embeddings Improve Instruction Finetuning (arXiv:2310.05914). arXiv. https://doi.org/10.48550/arXiv.2310.05914 · DOI
  6. Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., Sutskever, I., & others. (2019). Language models are unsupervised multitask learners. OpenAI Blog , 1 (8), 9.
  7. Final published version in the Engineering Applications of Artificial Intelligence journal. Volume 138, Part A, December 2024, 109291
  8. Tunstall, L., von Werra, L., & Wolf, T. (2022). Natural Language Processing with Transformers . O'Reilly Media, Inc.
  9. Final published version in the Engineering Applications of Artificial Intelligence journal. Volume 138, Part A, December 2024, 109291
  10. Zhou, X., Cao, S., Sun, X., & Lo, D. (2024). Large Language Model for Vulnerability Detection and Repair: Literature Review and the Road Ahead (arXiv:2404.02525). arXiv. https://doi.org/10.48550/arXiv.2404.02525 · DOI
  11. Zhou, X., Kim, K., Xu, B., Han, D., & Lo, D. (2024). Multi-LLM Collaboration + Data-Centric Innovation = 2x Better Vulnerability Repair (arXiv:2401.15459). arXiv. https://doi.org/10.48550/arXiv.2401.15459 · DOI

Cited by

Sorted by citations

Authors
de-Fitero-Dominguez, D., Garcia-Lopez, E., Garcia-Cabot, A., & Martinez-Herraiz, J.-J.
Affiliations
Universidad de Alcalá (ES)
Venue
Engineering Applications of Artificial Intelligence
Publisher
Elsevier BV
Published
2024-12
Volume
138
Pages
109291
ISSN
0952-1976 (ISSN-L)
OpenAlex
W4402393484
Cited by
43
References
74
Citations by year
2026: 21 · 2025: 18 · 2024: 4
FWCI
44.00
Type
journal article
Language
en
Open access
Locations
  • Engineering Applications of Artificial Intelligence (publishedVersion, cc-by-nc-nd)
  • e_Buah (publishedVersion, cc-by-nc-nd)
  • arXiv (Cornell University) (submittedVersion, cc-by-nc-sa)
  • arXiv (Cornell University)
Funders
European Space Agency (TASE-UAH-23.032)
Topics
  • Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Information Systems › Web Application Security Vulnerabilities
Keywords
automated program repair, large language models, C/C++ vulnerabilities, CodeLlama, Mistral, evaluation metrics, code security

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review