ACL 2025long0 citations

Benchmarking Long-Context Language Models on Long Code Understanding

Jia Li, Xuyuan Guo, Lei Li, Kechi Zhang, Ge Li, Zhengwei Tao, Fang Liu, Chongyang Tao

Abstract

Current advanced long-context language models offer great potential for real-world software engineering applications. However, progress in this critical domain remains hampered by a fundamental limitation: the absence of a rigorous evaluation framework for long code understanding. To gap this obstacle, we propose a long code understanding benchmark LongCodeU from four aspects (8 tasks) to evaluate LCLMs’ long code understanding ability required for practical applications, including code unit perception, intra-code unit understanding, inter-code unit relation understanding, and long code documentation understanding. We evaluate 9 popular LCLMs on LongCodeU (i.e., 6 general models and 3 code models). Our experimental results reveal key limitations in current LCLMs’ capabilities for long code understanding. Particularly, the performance of LCLMs drops dramatically when the long code length is greater than 32K, falling far short of their claimed 128K to 1M context windows. In the four aspects, inter-code unit relation understanding is the most challenging for LCLMs. Our study provides valuable insights for optimizing LCLMs and driving advancements in software engineering.

BibTeX
@inproceedings{li-etal-2025-benchmarking,
    title = "Benchmarking Long-Context Language Models on Long Code Understanding",
    author = "Li, Jia  and
      Guo, Xuyuan  and
      Li, Lei  and
      Zhang, Kechi  and
      Li, Ge  and
      Li, Jia  and
      Tao, Zhengwei  and
      Liu, Fang  and
      Tao, Chongyang  and
      Zhu, Yuqi  and
      Jin, Zhi",
    editor = "Che, Wanxiang  and
      Nabende, Joyce  and
      Shutova, Ekaterina  and
      Pilehvar, Mohammad Taher",
    booktitle = "Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = jul,
    year = "2025",
    address = "Vienna, Austria",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.acl-long.1324/",
    doi = "10.18653/v1/2025.acl-long.1324",
    pages = "27309--27327",
    ISBN = "979-8-89176-251-0"
}
Benchmarking Long-Context Language Models on Long Code Understanding · ACL 2025