{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,8]],"date-time":"2026-10-08T11:35:39Z","timestamp":1791459339078,"version":"4.3.4"},"reference-count":53,"publisher":"Association for Computing Machinery (ACM)","issue":"8","funder":[{"DOI":"10.13039\/501100012226","name":"Fundamental Research Funds for the Central Universities","doi-asserted-by":"crossref","award":["226-2025-00171"],"award-info":[{"award-number":["226-2025-00171"]}],"id":[{"id":"10.13039\/501100012226","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2026,8,31]]},"abstract":"<jats:p>\n                    Large Language Models (LLMs) have demonstrated remarkable capabilities in code generation tasks. However,\n                    <jats:italic toggle=\"yes\">repository-level code generation<\/jats:italic>\n                    presents unique challenges, particularly due to the need to utilize information spread across multiple files within a repository. Specifically, successful generation depends on a solid grasp of both general, context-agnostic knowledge and specific, context-dependent knowledge. While LLMs are widely used for the context-agnostic aspect, existing retrieval-based approaches sometimes fall short as they are limited in obtaining a broader and deeper repository context. In this article, we present\n                    <jats:italic toggle=\"yes\">\n                      <jats:sc>CatCoder<\/jats:sc>\n                    <\/jats:italic>\n                    , a novel code generation framework designed for statically typed programming languages.\n                    <jats:sc>CatCoder<\/jats:sc>\n                    enhances repository-level code generation by integrating relevant\n                    <jats:italic toggle=\"yes\">c<\/jats:italic>\n                    ode\n                    <jats:italic toggle=\"yes\">a<\/jats:italic>\n                    nd\n                    <jats:italic toggle=\"yes\">t<\/jats:italic>\n                    ype context. Specifically, it leverages static analyzers to extract type dependencies and merges this information with retrieved code to create comprehensive prompts for LLMs. To evaluate the effectiveness of\n                    <jats:sc>CatCoder<\/jats:sc>\n                    , we adapt and construct benchmarks that include 199 Java tasks and 90 Rust tasks. The results show that\n                    <jats:sc>CatCoder<\/jats:sc>\n                    outperforms the RepoCoder baseline by up to 14.44% and 17.35%, in terms of compile@\n                    <jats:inline-formula content-type=\"math\/tex\">\n                      <jats:tex-math notation=\"LaTeX\" version=\"MathJax\">\\( k \\)<\/jats:tex-math>\n                    <\/jats:inline-formula>\n                    and pass@\n                    <jats:inline-formula content-type=\"math\/tex\">\n                      <jats:tex-math notation=\"LaTeX\" version=\"MathJax\">\\( k \\)<\/jats:tex-math>\n                    <\/jats:inline-formula>\n                    scores. In addition, the generalizability of\n                    <jats:sc>CatCoder<\/jats:sc>\n                    is assessed using various LLMs, including both code-specialized models and general-purpose models. Our findings indicate consistent performance improvements across all models, which underlines the practicality of\n                    <jats:sc>CatCoder<\/jats:sc>\n                    . Furthermore, we evaluate the time consumption of\n                    <jats:sc>CatCoder<\/jats:sc>\n                    in a large open source repository, and the results demonstrate the scalability of\n                    <jats:sc>CatCoder<\/jats:sc>\n                    .\n                  <\/jats:p>","DOI":"10.1145\/3779217","type":"journal-article","created":{"date-parts":[[2025,12,15]],"date-time":"2025-12-15T18:28:43Z","timestamp":1765823323000},"page":"1-25","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":3,"title":["<scp>CatCoder<\/scp>\n                    : Repository-Level Code Generation with Relevant Code and Type Context"],"prefix":"10.1145","volume":"35","author":[{"ORCID":"https:\/\/orcid.org\/0009-0006-6059-5191","authenticated-orcid":false,"given":"Zhiyuan","family":"Pan","sequence":"first","affiliation":[{"name":"The State Key Laboratory of Blockchain and Data Security, Zhejiang University, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0093-3292","authenticated-orcid":false,"given":"Xing","family":"Hu","sequence":"additional","affiliation":[{"name":"The State Key Laboratory of Blockchain and Data Security, Zhejiang University, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-6302-3256","authenticated-orcid":false,"given":"Xin","family":"Xia","sequence":"additional","affiliation":[{"name":"The State Key Laboratory of Blockchain and Data Security, Zhejiang University, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4111-4189","authenticated-orcid":false,"given":"Xiaohu","family":"Yang","sequence":"additional","affiliation":[{"name":"The State Key Laboratory of Blockchain and Data Security, Zhejiang University, Hangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,7,16]]},"reference":[{"key":"e_1_3_2_1_2","unstructured":"Hugging Face. 2024. all-mpnet-base-v2. Retrieved May 2024 from https:\/\/huggingface.co\/sentence-transformers\/all-mpnet-base-v2"},{"key":"e_1_3_2_2_2","unstructured":"LLVM Foundation. 2024. clangd. Retrieved May 2024 from https:\/\/clangd.llvm.org"},{"key":"e_1_3_2_3_2","unstructured":"Google. 2024. CodeGemma: Open Code Models Based on Gemma. Retrieved May 2024 from https:\/\/goo.gle\/codegemma"},{"key":"e_1_3_2_4_2","unstructured":"crates.io. 2024. Rust Package Registry. Retrieved May 2024 from https:\/\/crates.io\/"},{"key":"e_1_3_2_5_2","unstructured":"Eclipse Foundation. 2024. Eclipse JDT LS. Retrieved May 2024 from https:\/\/projects.eclipse.org\/projects\/eclipse.jdt.ls"},{"key":"e_1_3_2_6_2","unstructured":"The Rust Team. 2024. How to Write Documentation\u2014The Rustdoc Book. Retrieved May 2024 from https:\/\/doc.rust-lang.org\/rustdoc\/how-to-write-documentation.html"},{"key":"e_1_3_2_7_2","unstructured":"Hugging Face. 2024. The AI community building the future.. Retrieved May 2024 from https:\/\/huggingface.co\/"},{"key":"e_1_3_2_8_2","unstructured":"Meta. 2024. Introducing Meta Llama 3: The Most Capable Openly Available LLM to Date. Retrieved May 2024 from https:\/\/ai.meta.com\/blog\/meta-llama-3"},{"key":"e_1_3_2_9_2","unstructured":"Microsoft. 2024. Language Server Protocol Specification\u20143.17. Retrieved May 2024 from https:\/\/microsoft.github.io\/language-server-protocol\/specifications\/lsp\/3.17\/specification\/"},{"key":"e_1_3_2_10_2","unstructured":"The Rust Team. 2024. Rust-Analyzer. Retrieved May 2024 from https:\/\/rust-analyzer.github.io\/"},{"key":"e_1_3_2_11_2","unstructured":"The Rust Team. 2024. Rust Programming Language. Retrieved May 2024 from https:\/\/www.rust-lang.org"},{"key":"e_1_3_2_12_2","unstructured":"TIOBE Software BV. 2024. TIOBE Index. Retrieved May 2024 from https:\/\/www.tiobe.com\/tiobe-index\/"},{"key":"e_1_3_2_13_2","doi-asserted-by":"publisher","DOI":"10.52202\/075280-1401"},{"key":"e_1_3_2_14_2","unstructured":"Jacob Austin Augustus Odena Maxwell Nye Maarten Bosma Henryk Michalewski David Dohan Ellen Jiang Carrie Cai Michael Terry Quoc Le et al. 2021. Program synthesis with large language models. arXiv:2108.07732. Retrieved from https:\/\/arxiv.org\/abs\/2108.07732"},{"key":"e_1_3_2_15_2","unstructured":"Jinze Bai Shuai Bai Yunfei Chu Zeyu Cui Kai Dang Xiaodong Deng Yang Fan Wenbin Ge Yu Han Fei Huang et al. 2023. Qwen technical report. arXiv:2309.16609. Retrieved from https:\/\/arxiv.org\/abs\/2309.16609"},{"key":"e_1_3_2_16_2","doi-asserted-by":"publisher","unstructured":"Federico Cassano John Gouwar Daniel Nguyen Sydney Nguyen Luna Phipps-Costin Donald Pinckney Ming-Ho Yee Yangtian Zi Carolyn Jane Anderson Molly Q. Feldman et al. 2023. MultiPL-E: A scalable and polyglot approach to benchmarking neural code generation. IEEE Transactions on Software Engineering 49 7 (July 2023) 3675\u20133691. DOI: 10.1109\/TSE.2023.3267446","DOI":"10.1109\/TSE.2023.3267446"},{"key":"e_1_3_2_17_2","unstructured":"Mark Chen Jerry Tworek Heewoo Jun Qiming Yuan Henrique Ponde de Oliveira Pinto Jared Kaplan Harri Edwards Yuri Burda Nicholas Joseph Greg Brockman et al. 2021. Evaluating large language models trained on code. arXiv:2107.03374. Retrieved from https:\/\/arxiv.org\/abs\/2107.03374"},{"key":"e_1_3_2_18_2","doi-asserted-by":"publisher","DOI":"10.1145\/1571941.1572114"},{"key":"e_1_3_2_19_2","doi-asserted-by":"publisher","DOI":"10.52202\/075280-2023"},{"key":"e_1_3_2_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3639219"},{"key":"e_1_3_2_21_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.findings-emnlp.139"},{"key":"e_1_3_2_22_2","unstructured":"Daya Guo Shuo Ren Shuai Lu Zhangyin Feng Duyu Tang Shujie Liu Long Zhou Nan Duan Alexey Svyatkovskiy Shengyu Fu et al. 2020. GraphCodeBERT: Pre-training code representations with data flow. arXiv:2009.08366. Retrieved from https:\/\/arxiv.org\/abs\/2009.08366"},{"key":"e_1_3_2_23_2","unstructured":"Daya Guo Qihao Zhu Dejian Yang Zhenda Xie Kai Dong Wentao Zhang Guanting Chen Xiao Bi Y. Wu Y. K. Li et al. 2024. DeepSeek-Coder: When the large language model meets programming\u2014The rise of code intelligence. arXiv:2401.14196. Retrieved from https:\/\/arxiv.org\/abs\/2401.14196"},{"key":"e_1_3_2_24_2","unstructured":"Ari Holtzman Jan Buys Li Du Maxwell Forbes and Yejin Choi. 2019. The curious case of neural text degeneration. arXiv:1904.09751. Retrieved from https:\/\/arxiv.org\/abs\/1904.09751"},{"key":"e_1_3_2_25_2","unstructured":"Hamel Husain Ho-Hsiang Wu Tiferet Gazit Miltiadis Allamanis and Marc Brockschmidt. 2019. CodeSearchNet challenge: Evaluating the state of semantic code search. arXiv:1909.09436. Retrieved from https:\/\/arxiv.org\/abs\/1909.09436"},{"key":"e_1_3_2_26_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/D18-1192"},{"key":"e_1_3_2_27_2","doi-asserted-by":"publisher","DOI":"10.1145\/2610384.2628055"},{"key":"e_1_3_2_28_2","doi-asserted-by":"publisher","DOI":"10.1145\/3600006.3613165"},{"key":"e_1_3_2_29_2","doi-asserted-by":"publisher","DOI":"10.52202\/068431-1549"},{"key":"e_1_3_2_30_2","doi-asserted-by":"publisher","DOI":"10.52202\/079017-1837"},{"key":"e_1_3_2_31_2","unstructured":"Raymond Li Loubna Ben Allal Yangtian Zi Niklas Muennighoff Denis Kocetkov Chenghao Mou Marc Marone Christopher Akiki Jia Li Jenny Chim et al. 2023. StarCoder: May the source be with you! arXiv:2305.06161. Retrieved from https:\/\/arxiv.org\/abs\/2305.06161"},{"key":"e_1_3_2_32_2","first-page":"47832","volume-title":"Proceedings of the International Conference on Representation Learning","author":"Liu Tianyang","year":"2024","unstructured":"Tianyang Liu, Canwen Xu, and Julian McAuley. 2024. RepoBench: Benchmarking repository-level code auto-completion systems. In Proceedings of the International Conference on Representation Learning. B. Kim, Y. Yue, S. Chaudhuri, K. Fragkiadaki, M. Khan, and Y. Sun (Eds.), Vol. 2024, 47832\u201347850."},{"key":"e_1_3_2_33_2","unstructured":"Anton Lozhkov Raymond Li Loubna Ben Allal Federico Cassano Joel Lamy-Poirier Nouamane Tazi Ao Tang Dmytro Pykhtar Jiawei Liu Yuxiang Wei et al. 2024. StarCoder 2 and The Stack v2: The next generation. arXiv:2402.19173. Retrieved from https:\/\/arxiv.org\/abs\/2402.19173"},{"key":"e_1_3_2_34_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.acl-long.431"},{"key":"e_1_3_2_35_2","doi-asserted-by":"publisher","DOI":"10.1162\/tacl_a_00369"},{"key":"e_1_3_2_36_2","unstructured":"Erik Nijkamp Bo Pang Hiroaki Hayashi Lifu Tu Huan Wang Yingbo Zhou Silvio Savarese and Caiming Xiong. 2022. CodeGen: An open large language model for code with multi-turn program synthesis. arXiv:2203.13474. Retrieved from https:\/\/arxiv.org\/abs\/2203.13474"},{"key":"e_1_3_2_37_2","unstructured":"Shuo Ren Daya Guo Shuai Lu Long Zhou Shujie Liu Duyu Tang Neel Sundaresan Ming Zhou Ambrosio Blanco and Shuai Ma. 2020. CodeBLEU: A method for automatic evaluation of code synthesis. arXiv:2402.19173. Retrieved from https:\/\/arxiv.org\/abs\/2402.19173"},{"key":"e_1_3_2_38_2","first-page":"109","article-title":"Okapi at TREC-3","volume":"109","author":"Robertson Stephen E.","year":"1995","unstructured":"Stephen E. Robertson, Steve Walker, Susan Jones, Micheline M. Hancock-Beaulieu, and Mike Gatford. 1995. Okapi at TREC-3. Nist Special Publication Sp 109 (1995), 109.","journal-title":"Nist Special Publication Sp"},{"key":"e_1_3_2_39_2","unstructured":"Baptiste Roziere Jonas Gehring Fabian Gloeckle Sten Sootla Itai Gat Xiaoqing Ellen Tan Yossi Adi Jingyu Liu Tal Remez J\u00e9r\u00e9my Rapin et al. 2023. Code Llama: Open foundation models for code. arXiv:2308.12950. Retrieved from https:\/\/arxiv.org\/abs\/2308.12950"},{"key":"e_1_3_2_40_2","doi-asserted-by":"publisher","DOI":"10.5555\/3618408.3619722"},{"key":"e_1_3_2_41_2","volume-title":"Proceedings of the 34th International Conference on Neural Information Processing Systems (NIPS \u201920)","author":"Song Kaitao","year":"2020","unstructured":"Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and Tie-Yan Liu. 2020. MPNet: Masked and permuted pre-training for language understanding. In Proceedings of the 34th International Conference on Neural Information Processing Systems (NIPS \u201920). Curran Associates Inc., Red Hook, NY, Article 1414, 11 pages."},{"key":"e_1_3_2_42_2","unstructured":"Hugo Touvron Louis Martin Kevin Stone Peter Albert Amjad Almahairi Yasmine Babaei Nikolay Bashlykov Soumya Batra Prajjwal Bhargava Shruti Bhosale et al. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv:2307.09288. Retrieved from https:\/\/arxiv.org\/abs\/2307.09288"},{"key":"e_1_3_2_43_2","first-page":"40","volume-title":"Proceedings of the Open Source Information Retrieval Workshop at the ACM SIGIR Conference (OSIR@SIGIR)","author":"Trotman Andrew","year":"2012","unstructured":"Andrew Trotman, Xiangfei Jia, and Matt Crane. 2012. Towards an efficient and effective search engine. In Proceedings of the Open Source Information Retrieval Workshop at the ACM SIGIR Conference (OSIR@SIGIR), 40\u201347."},{"key":"e_1_3_2_44_2","unstructured":"Michele Tufano Dawn Drain Alexey Svyatkovskiy Shao Kun Deng and Neel Sundaresan. 2020. Unit test case generation with transformers and focal context. arXiv:2009.05617. Retrieved from https:\/\/arxiv.org\/abs\/2009.05617"},{"key":"e_1_3_2_45_2","volume-title":"Advances in Neural Information Processing Systems","author":"Vaswani Ashish","year":"2017","unstructured":"Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, \u0141. Ukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems. I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (Eds.), Vol. 30, Curran Associates, Inc."},{"key":"e_1_3_2_46_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2023.emnlp-main.68"},{"key":"e_1_3_2_47_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.emnlp-main.685"},{"key":"e_1_3_2_48_2","first-page":"53270","volume-title":"Proceedings of the 41st International Conference on Machine Learning","author":"Wu Di","year":"2024","unstructured":"Di Wu, Wasi Uddin Ahmad, Dejiao Zhang, Murali Krishna Ramanathan, and Xiaofei Ma. 2024. Repoformer: Selective retrieval for repository-level code completion. In Proceedings of the 41st International Conference on Machine Learning. Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp (Eds.), Proceedings of Machine Learning Research, Vol. 235, PMLR, 53270\u201353290."},{"key":"e_1_3_2_49_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00129"},{"key":"e_1_3_2_50_2","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3623316"},{"key":"e_1_3_2_51_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.findings-emnlp.21"},{"key":"e_1_3_2_52_2","doi-asserted-by":"publisher","DOI":"10.1145\/3650212.3652115"},{"key":"e_1_3_2_53_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2023.emnlp-main.151"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3779217","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,7,18]],"date-time":"2026-07-18T08:17:51Z","timestamp":1784362671000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3779217"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,7,16]]},"references-count":53,"journal-issue":{"issue":"8","published-print":{"date-parts":[[2026,8,31]]}},"alternative-id":["10.1145\/3779217"],"URL":"https:\/\/doi.org\/10.1145\/3779217","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,7,16]]},"assertion":[{"value":"2025-01-08","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-11-13","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-07-16","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}