paperbot · PL 论文追踪

全部论文 待读 收藏

P2 AdaptEval: A Benchmark for Evaluating Large Language Models on Code Snippet Adaptation

AdaptEval:评估大语言模型在代码片段适配上的基准
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 3/10 · 该论文属于 LLM 在代码片段适配任务上的评测基准,与程序语言和代码复用相关,但未涉及用户核心关注的静态分析、Agentic 程序分析、浮点程序分析、贝叶斯程序分析,也不是用 LLM 改进静态分析/形式化验证,且研究目标本身偏向评估 LLM 能力。引用 0 inbox
Tanghaoran Zhang, Xinjun Mao, Shangwen Wang, Yuxin Zhao, Yao Lu, Jin Zhang, Zhang Zhang, Kang Yang, Yue Yu
crossref: 2026-09-12

AI 速览

一句话:提出 AdaptEval,首个评估大语言模型代码片段适配能力的基准,含真实上下文、多粒度标注与细粒度测试。

针对代码复用中的代码片段适配缺乏 LLM 评估基准这一问题,本文提出 AdaptEval。该基准从开发者实践中构建任务,保留 Stack Overflow 与 GitHub 的丰富上下文;对每个任务在任务级和适配级标注需求,以覆盖多样适配场景;并采用适配级与函数级两层测试实现细粒度评估。基于 AdaptEval,作者首次实证评估六个指令微调 LLM 和三个推理 LLM。结果表明,AdaptEval 能从多角度评测 LLM 的适配能力,并揭示其当前局限,尤其是难以遵循显式指令。

问题
代码复用中的代码片段适配是重要活动,但此前没有基准评估 LLM 在此任务上的表现,使其实际效用不明确。
方法
提出 AdaptEval:从 Stack Overflow 和 GitHub 的开发者实践构建任务并保留真实上下文,在任务级与适配级标注需求,并结合适配级和函数级测试进行细粒度评估。
评估
对六个指令微调 LLM 和三个推理 LLM 开展首次实证研究,从多角度评估其代码片段适配能力,并分析其难以遵循显式指令等局限。
原文摘要(Abstract)

Recent advancements in large language models (LLMs) have automated various software engineering tasks, with benchmarks emerging to evaluate their capabilities. However, for adaptation, a critical activity during code reuse, there is no benchmark to assess LLMs’ performance, leaving their practical utility in this area unclear. To fill this gap, we propose AdaptEval, a benchmark designed to evaluate LLMs on code snippet adaptation. Unlike existing benchmarks, AdaptEval incorporates the following three distinctive features: First, practical context. Tasks in AdaptEval are derived from developers’ practices, preserving rich contextual information from Stack Overflow and GitHub communities. Second, multi-granularity annotation. Each task is annotated with requirements at both task and adaptation levels, supporting the evaluation of LLMs across diverse adaptation scenarios. Third, fine-grained evaluation. AdaptEval includes a two-tier testing framework combining adaptation-level and function-level tests, which enables evaluating LLMs’ performance across various individual adaptations. Based on AdaptEval, we conduct the first empirical study to evaluate six instruction-tuned LLMs and especially three reasoning LLMs on code snippet adaptation. Experimental results demonstrate that AdaptEval enables the assessment of LLMs’ adaptation capabilities from various perspectives. It also provides critical insights into their current limitations, particularly their struggle to follow explicit instructions. We hope AdaptEval can facilitate further investigation and enhancement of LLMs’ capabilities in code snippet adaptation, supporting their real-world applications.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9280,
  title = {AdaptEval: A Benchmark for Evaluating Large Language Models on Code Snippet Adaptation},
  author = {Tanghaoran Zhang and Xinjun Mao and Shangwen Wang and Yuxin Zhao and Yao Lu and Jin Zhang and Zhang Zhang and Kang Yang and Yue Yu},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00103}
}