LLMs Meet Library Evolution: Evaluating Deprecated API Usage in LLM-based Code Completion
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs), pre-trained or fine-tuned on large code corpora, have shown effectiveness in generating code completions. However, in LLM-based code completion, LLMs may struggle to use correct and up-to-date Application Programming Interfaces (APIs) due to the rapid and continuous evolution of libraries. While existing studies have highlighted issues with predicting incorrect APIs, the specific problem of deprecated API usage in LLM-based code completion has not been thoroughly investigated. To address this gap, we conducted the first evaluation study on deprecated API usage in LLM-based code completion. This study involved seven advanced LLMs, 145 API mappings from eight popular Python libraries, and 28,125 completion prompts. The study results reveal the status quo (i.e., API usage plausibility and deprecated usage rate) of deprecated API and replacing API usage in LLM-based code completion from the perspectives of model, prompt, and library, and indicate the root causes behind. Based on these findings, we propose two lightweight fixing approaches, REPLACEAPI and INSERTPROMPT, which can serve as baseline approaches for future research on mitigating deprecated API usage in LLM-based completion. Additionally, we provide implications for future research on integrating library evolution with LLM-driven software development.
Key facts. Cited by 29 papers in the map (data through 7 Oct 2026). First posted on arXiv 14 Jun 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 10; 2026: 18.
29 papers.
Sort:
By area:
- 2025Speed at the Cost of Quality: How Cursor AI Increases Short-Term Velocity and Long-Term Complexity in Open-Source Projectscited by 23
- 2025ReCode: Updating Code API Knowledge with Reinforcement Learningcited by 11
- 2025RustEvo^2: An Evolving Benchmark for API Evolution in LLM-based Rust Code Generationcited by 9
- 2024GitChameleon: Unmasking the Version-Switching Capabilities of Code Generation Modelscited by 6
- 2025CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrievalcited by 6
- 2025Rethinking Autonomy: Preventing Failures in AI-Driven Software Engineeringcited by 4
- 2026Environment-Aware Code Generation: How far are We?cited by 4
- 2025GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilitiescited by 2
- 2025An Empirical Study of OpenAI API Discussions on Stack Overflowcited by 1
- 2025Library Hallucinations in LLM-Generated Code: A Risk Analysis Grounded in Developer Queriescited by 1
- 2025Understanding Robustness of Model Editing in Code LLMscited by 1
- 2025A Study of Library Usage in Agent-Authored Pull Requestscited by 1
17 more
- 2026TimeMachine-bench: A Benchmark for Evaluating Model Capabilities in Repository-Level Migration Taskscited by 1
- 2026KCoEvo: A Knowledge Graph Augmented Framework for Evolutionary Code Generationcited by 1
- 2026The Shrinking Lifespan of LLMs in Sciencecited by 1
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Codecited by 1
- 2026Correct Code, Vulnerable Dependencies: A Large Scale Measurement Study of LLM-Specified Library Versionscited by 1
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Codecited by 1
- 2026Automated Modernization of Machine Learning Engineering Notebooks for Reproducibilitycited by 0
- 2026Toward Executable Repository-Level Code Generation via Environment Alignmentcited by 0
- 2026Stdlib or Third-Party? Empirical Performance and Correctness of LLM-Assisted Zero-Dependency Python Librariescited by 0
- 2026The Invisible Lottery: How Subtle Cues Steer Algorithm Choice in LLM Code Generationcited by 0
- 2026Beyond Pass Rate: A Multilingual, Execution-Grounded Evaluation of Open Code LLMscited by 0
- 2026LibEvoBench: Probing Temporal Knowledge Stratification in Code Generation Modelscited by 0
- 2026The Hitchhiker's Guide to Monoculture: AI Homogenizes Syntax, Not (Necessarily) Semanticscited by 0
- 2026Set-shifting Behavioral Test for Harnessed Agentscited by 0
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvementscited by 0
- 2026Characterizing the Quality Profile of AI-Generated C++ in Productioncited by 0
- 2026Can Agents Design Libraries for Agents?cited by 0
- 2026Can Agents Design Libraries for Agents?29 Sep 2026
- 2026Characterizing the Quality Profile of AI-Generated C++ in Production6 Aug 2026
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvements29 Jul 2026
- 2026Set-shifting Behavioral Test for Harnessed Agents15 Jul 2026
- 2026The Hitchhiker's Guide to Monoculture: AI Homogenizes Syntax, Not (Necessarily) Semantics12 Jul 2026
- 2026LibEvoBench: Probing Temporal Knowledge Stratification in Code Generation Models24 Jun 2026
- 2026Beyond Pass Rate: A Multilingual, Execution-Grounded Evaluation of Open Code LLMs7 Jun 2026
- 2026The Invisible Lottery: How Subtle Cues Steer Algorithm Choice in LLM Code Generation2 Jun 2026
- 2026Stdlib or Third-Party? Empirical Performance and Correctness of LLM-Assisted Zero-Dependency Python Libraries20 May 2026
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code13 May 2026
- 2026Correct Code, Vulnerable Dependencies: A Large Scale Measurement Study of LLM-Specified Library Versions7 May 2026
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code6 May 2026
17 more
- 2026The Shrinking Lifespan of LLMs in Science8 Apr 2026
- 2026Toward Executable Repository-Level Code Generation via Environment Alignment4 Apr 2026
- 2026KCoEvo: A Knowledge Graph Augmented Framework for Evolutionary Code Generation8 Mar 2026
- 2026Automated Modernization of Machine Learning Engineering Notebooks for Reproducibility6 Feb 2026
- 2026TimeMachine-bench: A Benchmark for Evaluating Model Capabilities in Repository-Level Migration Tasks30 Jan 2026
- 2026Environment-Aware Code Generation: How far are We?18 Jan 2026
- 2025A Study of Library Usage in Agent-Authored Pull Requests12 Dec 2025
- 2025Speed at the Cost of Quality: How Cursor AI Increases Short-Term Velocity and Long-Term Complexity in Open-Source Projects6 Nov 2025
- 2025Understanding Robustness of Model Editing in Code LLMs5 Nov 2025
- 2025Library Hallucinations in LLM-Generated Code: A Risk Analysis Grounded in Developer Queries26 Sep 2025
- 2025Rethinking Autonomy: Preventing Failures in AI-Driven Software Engineering15 Aug 2025
- 2025GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilities16 Jul 2025
- 2025ReCode: Updating Code API Knowledge with Reinforcement Learning25 Jun 2025
- 2025CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrieval31 May 2025
- 2025An Empirical Study of OpenAI API Discussions on Stack Overflow7 May 2025
- 2025RustEvo^2: An Evolving Benchmark for API Evolution in LLM-based Rust Code Generation21 Mar 2025
- 2024GitChameleon: Unmasking the Version-Switching Capabilities of Code Generation Models5 Nov 2024
- 2025Speed at the Cost of Quality: How Cursor AI Increases Short-Term Velocity and Long-Term Complexity in Open-Source Projectscited by 23
- 2025A Study of Library Usage in Agent-Authored Pull Requestscited by 1
- 2026Set-shifting Behavioral Test for Harnessed Agentscited by 0
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvementscited by 0
- 2026SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvements29 Jul 2026
- 2026Set-shifting Behavioral Test for Harnessed Agents15 Jul 2026
- 2025A Study of Library Usage in Agent-Authored Pull Requests12 Dec 2025
- 2025Speed at the Cost of Quality: How Cursor AI Increases Short-Term Velocity and Long-Term Complexity in Open-Source Projects6 Nov 2025
- 2025ReCode: Updating Code API Knowledge with Reinforcement Learningcited by 11
- 2025RustEvo^2: An Evolving Benchmark for API Evolution in LLM-based Rust Code Generationcited by 9
- 2024GitChameleon: Unmasking the Version-Switching Capabilities of Code Generation Modelscited by 6
- 2025CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrievalcited by 6
- 2026Environment-Aware Code Generation: How far are We?cited by 4
- 2025GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilitiescited by 2
- 2025An Empirical Study of OpenAI API Discussions on Stack Overflowcited by 1
- 2025Library Hallucinations in LLM-Generated Code: A Risk Analysis Grounded in Developer Queriescited by 1
- 2025Understanding Robustness of Model Editing in Code LLMscited by 1
- 2026TimeMachine-bench: A Benchmark for Evaluating Model Capabilities in Repository-Level Migration Taskscited by 1
- 2026KCoEvo: A Knowledge Graph Augmented Framework for Evolutionary Code Generationcited by 1
- 2026The Shrinking Lifespan of LLMs in Sciencecited by 1
12 most cited of 24 All 24 (JSON)
- 2026Can Agents Design Libraries for Agents?29 Sep 2026
- 2026Characterizing the Quality Profile of AI-Generated C++ in Production6 Aug 2026
- 2026The Hitchhiker's Guide to Monoculture: AI Homogenizes Syntax, Not (Necessarily) Semantics12 Jul 2026
- 2026LibEvoBench: Probing Temporal Knowledge Stratification in Code Generation Models24 Jun 2026
- 2026Beyond Pass Rate: A Multilingual, Execution-Grounded Evaluation of Open Code LLMs7 Jun 2026
- 2026The Invisible Lottery: How Subtle Cues Steer Algorithm Choice in LLM Code Generation2 Jun 2026
- 2026Stdlib or Third-Party? Empirical Performance and Correctness of LLM-Assisted Zero-Dependency Python Libraries20 May 2026
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code13 May 2026
- 2026Correct Code, Vulnerable Dependencies: A Large Scale Measurement Study of LLM-Specified Library Versions7 May 2026
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code6 May 2026
- 2026The Shrinking Lifespan of LLMs in Science8 Apr 2026
- 2026Toward Executable Repository-Level Code Generation via Environment Alignment4 Apr 2026
12 newest of 24 All 24 (JSON)