{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,30]],"date-time":"2026-06-30T19:13:10Z","timestamp":1782846790269,"version":"3.54.5"},"reference-count":55,"publisher":"Association for Computing Machinery (ACM)","issue":"FSE","license":[{"start":{"date-parts":[[2026,6,30]],"date-time":"2026-06-30T00:00:00Z","timestamp":1782777600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/legalcode"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Softw. Eng."],"published-print":{"date-parts":[[2026,6,30]]},"abstract":"<jats:p>The increasing prevalence of software vulnerabilities highlights the need for effective Automatic Vulnerability Repair (AVR) tools. While LLM-based approaches are promising, they struggle to incorporate structured security knowledge from sources like CWE and NVD. Current methods either use this information superficially by concatenating the CWE-ID into the input prompt, yielding negligible benefits, or rely on few-shot learning with rigid, non-generalizable examples, which limits their effectiveness in real-world scenarios.<\/jats:p>\n                  <jats:p>To address this gap, we propose VulKey, an LLM-based AVR framework that leverages a hierarchical abstraction of expert knowledge to guide patch generation. Our novel three-level abstraction formulates repair strategies in terms of CWE type, syntactic actions, and semantic key elements. This approach captures the essence of a security fix with greater generality than concrete examples and more semantic richness than traditional syntax-based templates, overcoming the coverage limitations of prior methods.<\/jats:p>\n                  <jats:p>VulKey is implemented as a two-stage pipeline: first, expert knowledge matching predicts an appropriate repair pattern for the vulnerability; second, repair code generation uses a pattern-guided, fine-tuned LLM to produce secure patches.<\/jats:p>\n                  <jats:p>On the real-world C\/C++ dataset PrimeVul, VulKey achieves 31.5% repair accuracy, surpassing the best baseline by 7.6% and outperforming leading tools such as VulMaster and GPT-5. Moreover, VulKey demonstrates cross-language and cross-model generalizability, with state-of-the-art performance on the Java benchmark Vul4J. These results underscore the importance of structured expert knowledge in advancing AVR effectiveness.<\/jats:p>\n                  <jats:p>Our work demonstrates that explicitly modeling and integrating expert security knowledge through hierarchical patterns is a crucial step toward building more effective and reliable AVR tools.<\/jats:p>","DOI":"10.1145\/3808117","type":"journal-article","created":{"date-parts":[[2026,6,30]],"date-time":"2026-06-30T17:06:14Z","timestamp":1782839174000},"page":"2465-2487","source":"Crossref","is-referenced-by-count":0,"title":["VulKey: Automated Vulnerability Repair Guided by Domain-Specific Repair Patterns"],"prefix":"10.1145","volume":"3","author":[{"ORCID":"https:\/\/orcid.org\/0009-0007-5557-4916","authenticated-orcid":false,"given":"Jia","family":"Li","sequence":"first","affiliation":[{"name":"Chinese University of Hong Kong, Hong Kong, Hong Kong"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5158-6716","authenticated-orcid":false,"given":"Zhuangbin","family":"Chen","sequence":"additional","affiliation":[{"name":"Sun Yat-sen University, Zhu Hai, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3338-8561","authenticated-orcid":false,"given":"Yuxin","family":"Su","sequence":"additional","affiliation":[{"name":"Sun Yat-sen University, Zhu Hai, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3666-5798","authenticated-orcid":false,"given":"Michael R.","family":"Lyu","sequence":"additional","affiliation":[{"name":"Chinese University of Hong Kong, Hong Kong, Hong Kong"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,6,30]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1109\/TDSC.2021.3125270"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/3475960.3475985"},{"key":"e_1_2_1_3_1","unstructured":"BigCode. 2024. Data Portraits. https:\/\/stack.dataportraits.org\/."},{"key":"e_1_2_1_4_1","first-page":"1877","volume-title":"Advances in Neural Information Processing Systems","volume":"33","author":"Brown Tom B.","year":"2020","unstructured":"Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language Models are Few-Shot Learners. In Advances in Neural Information Processing Systems, Vol. 33. Curran Associates, Inc., Red Hook, NY, USA, 1877-1901. https:\/\/proceedings.neurips.cc\/ paper\/2020\/hash\/1457c0d6bfcb4967418bfb8ac142f64a-Abstract.html"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/3524842.3528482"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.2139\/ssrn.5025384"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/3607199.3607242"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2022.3147265"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2022.3156637"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1177\/001316446002000104"},{"key":"e_1_2_1_11_1","unstructured":"The MITRE Corporation. 2025. Common Vulnerabilities and Exposures. https:\/\/www.cve.org\/."},{"key":"e_1_2_1_12_1","unstructured":"The MITRE Corporation. 2025. Common Weakness Enumeration. https:\/\/cwe.mitre.org\/."},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.52202\/075280-0441"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE55347.2025.00038"},{"key":"e_1_2_1_15_1","unstructured":"Ben Edwards. 2024. A Global View of the CISA KEV Catalog: Prevalence and Remediation. Technical Report. Bitsight. https:\/\/www.bitsight.com\/resources\/slicing-through-cisas-kev-catalog"},{"key":"e_1_2_1_16_1","unstructured":"Hugging Face. 2023. codet5p-220m. https:\/\/huggingface.co\/Salesforce\/codet5p-220m."},{"key":"e_1_2_1_17_1","unstructured":"Hugging Face. 2023. Quantization. https:\/\/huggingface.co\/docs\/transformers\/main\/en\/main_classes\/quantization."},{"key":"e_1_2_1_18_1","unstructured":"Hugging Face. 2023. starcoderbase. https:\/\/huggingface.co\/bigcode\/starcoderbase."},{"key":"e_1_2_1_19_1","unstructured":"Hugging Face. 2024. CodeLlama-70b-hf. https:\/\/huggingface.co\/codellama\/CodeLlama-70b-hf."},{"key":"e_1_2_1_20_1","unstructured":"Hugging Face. 2024. DeepSeek-Coder-V2-Lite-Base. https:\/\/huggingface.co\/deepseek-ai\/DeepSeek-Coder-V2-Lite- Base."},{"key":"e_1_2_1_21_1","unstructured":"Hugging Face. 2024. Qwen2.5-Coder-32B. https:\/\/huggingface.co\/Qwen\/Qwen2.5-Coder-32B."},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/3379597.3387501"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/3637528.3671470"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.findings-emnlp.139"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/w17-3207"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/3540250.3549098"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2015.64"},{"key":"e_1_2_1_28_1","unstructured":"GitHub. 2026. CodeQL. https:\/\/codeql.github.com\/."},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3377811.3380323"},{"key":"e_1_2_1_30_1","volume-title":"LoRA: Low-Rank Adaptation of Large Language Models. In The Tenth International Conference on Learning Representations (ICLR). OpenReview.net, Virtual Event. https:\/\/openreview.net\/forum?id=nZeVKeeFYf9","author":"Hu Edward J.","year":"2022","unstructured":"Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. 2022. LoRA: Low-Rank Adaptation of Large Language Models. In The Tenth International Conference on Learning Representations (ICLR). OpenReview.net, Virtual Event. https:\/\/openreview.net\/forum?id=nZeVKeeFYf9"},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3696450"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE55347.2025.00030"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.2307\/2529310"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3236024.3236079"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/3293882.3330577"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510147"},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/3468264.3473122"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00180"},{"key":"e_1_2_1_39_1","first-page":"4481","volume-title":"34th USENIX Security Symposium (USENIX Security 25)","author":"Nong Yu","year":"2025","unstructured":"Yu Nong, Haoran Yang, Long Cheng, Hongxin Hu, and Haipeng Cai. 2025. APPATCH: automated adaptive prompting large language models for real-world software vulnerability patching. In 34th USENIX Security Symposium (USENIX Security 25). USENIX Association, Seattle, WA, USA, 4481-4500. https:\/\/www.usenix.org\/conference\/usenixsecurity25\/ presentation\/nong"},{"key":"e_1_2_1_40_1","unstructured":"OpenAI. 2024. ChatGPT. https:\/\/openai.com\/blog\/chatgpt\/."},{"key":"e_1_2_1_41_1","first-page":"46","article-title":"Pattern matching: The gestalt approach. Dr","volume":"13","author":"Ratcliff John W","year":"1988","unstructured":"John W Ratcliff, David E Metzener, et al. 1988. Pattern matching: The gestalt approach. Dr. Dobb\u015b Journal 13, 7 (1988), 46.","journal-title":"Dobb\u015b Journal"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","DOI":"10.1561\/1500000019"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2308.12950"},{"key":"e_1_2_1_44_1","unstructured":"US-CERT Security. 2025. National Vulnerability Database. https:\/\/nvd.nist.gov\/."},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1109\/ACCESS.2025.3546700"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/3699711"},{"key":"e_1_2_1_47_1","unstructured":"SonarSource. 2026. SonarQube. https:\/\/www.sonarsource.com\/products\/sonarqube\/."},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/3180155.3180250"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.emnlp-main.685"},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/3597926.3598135"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1145\/3650212.3680323"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3650212.3680359"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1145\/3691620.3695555"},{"key":"e_1_2_1_54_1","doi-asserted-by":"publisher","DOI":"10.1145\/3708522"},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3639222"}],"container-title":["Proceedings of the ACM on Software Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3808117","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,6,30]],"date-time":"2026-06-30T18:41:56Z","timestamp":1782844916000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3808117"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,6,30]]},"references-count":55,"journal-issue":{"issue":"FSE","published-print":{"date-parts":[[2026,6,30]]}},"alternative-id":["10.1145\/3808117"],"URL":"https:\/\/doi.org\/10.1145\/3808117","relation":{},"ISSN":["2994-970X"],"issn-type":[{"value":"2994-970X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,6,30]]}}}