@inproceedings{hai-etal-2025-impacts,
title = "On the Impacts of Contexts on Repository-Level Code Generation",
author = "Hai, Nam Le and
Nguyen, Dung Manh and
Bui, Nghi D. Q.",
editor = "Chiruzzo, Luis and
Ritter, Alan and
Wang, Lu",
booktitle = "Findings of the Association for Computational Linguistics: NAACL 2025",
month = apr,
year = "2025",
address = "Albuquerque, New Mexico",
publisher = "Association for Computational Linguistics",
url = "https://preview.aclanthology.org/fix-sig-urls/2025.findings-naacl.82/",
pages = "1496--1524",
ISBN = "979-8-89176-195-7",
abstract = "CodeLLMs are widely used for code generation, yet their ability to handle repository-level dependencies remains underexplored. We introduce RepoExec, a benchmark for evaluating repository-level code generation, focusing on executability, functional correctness, and dependency utilization. Our study evaluates 18 models, revealing that retaining full dependency context yields the best performance, while smaller context sizes can be misleading. Pretrained LLMs excel in correctness but often reimplement dependencies, while instruction-tuned models better utilize dependencies but sometimes introduce unnecessary complexity. We propose an instruction-tuning dataset that improves dependency handling and introduce a new metric, Dependency Invocation Rate (DIR), to measure context utilization. Experiments show that instruction-tuned models improve DIR by over 10{\%}, and multi-round debugging further enhances both correctness and dependency use. RepoExec provides a comprehensive framework to advance CodeLLMs for real-world applications. The dataset and source code are available at \url{https://github.com/FSoft-AI4Code/RepoExec}."
}
Markdown (Informal)
[On the Impacts of Contexts on Repository-Level Code Generation](https://preview.aclanthology.org/fix-sig-urls/2025.findings-naacl.82/) (Hai et al., Findings 2025)
ACL