The paper examines how static analysis tools can detect and mitigate hallucinations in code generated by large language models, especially when libraries are involved. It reports that such tools can identify 16–70% of all errors and 14–85% of library hallucinations, with performance varying by model and dataset. Manual analysis further bounds their effectiveness between 48.5% and 77%, indicating that while static analysis is a cost‑effective approach, it cannot fully solve the hallucination problem.
By Clarissa Miranda-Pena, Andrew Reeson, C\'ecile Paris, Josiah Poon, Jonathan K. Kummerfeld
arXiv:2608.30025v1 Announce Type: new
Abstract: Large language models (LLMs) frequently generate source code containing vulnerabilities, yet little work studies the internal mechanisms that distingui...
By Hao Yan, Ziyu Yao
arXiv:2505. 13553v3 Announce Type: replace-cross Abstract: The hallucination of code generation models hinders their applicability to systems requiring higher safety standards.
By Jaewoo Jeong, Taesoo Kim, Sangdon Park
The paper introduces CodeScan, a black-box, vulnerability-oriented scanning framework designed to detect data poisoning and backdoor attacks in code generation large language models (LLMs). CodeScan operates by analyzing structural similarities across multiple code generations, normalizing them with abstract syntax tree (AST) techniques, and then applying LLM-based vulnerability analysis to identify recurring insecure patterns. Evaluations on 117 models across three architectures and multiple sizes show over 97% detection accuracy with fewer false positives compared to prior methods.
By Shenao Yan, Shan Jin, Shimaa Ahmed, Sunpreet Singh Arora, Yiwei Cai, Yizhen Wang, Yuan Hong
The paper investigates whether code large language models (CodeLLMs) inadvertently reproduce proprietary or sensitive code by evaluating seven state‑of‑the‑art training data detection (TDD) methods on eight CodeLLMs. It introduces CodeSnitch, a benchmark of 9,000 function‑level code samples across three languages, each labeled as included or excluded from training data, and applies mutation strategies based on the Type‑1 to Type‑4 code clone taxonomy to test TDD robustness. The study offers a systematic assessment of current TDD techniques for code and suggests directions for developing more effective detection methods.
By Tianlin Li, Yunxiang Wei, Zhiming Li, Aishan Liu, Qing Guo, Xianglong Liu, Dongning Sun, Yang Liu
arXiv:2606. 03852v1 Announce Type: cross Abstract: Large language models often generate code with bugs.
By Yinsheng Yao, Hongxiang Zhang, Weixi Tong, Tianyi Zhang