API-Repo: API-centric Repository-level Code Completion
Code completion is one of the most common and important functions in software development. To complete code in a repository, code snippets from other files (i.e. cross-file context) is often needed. Text similarity-based retrieval is able to find some relevant code snippets and improve completion results, but it ignores the intention of retrieval. When programmers need retrieval, they may want to (1) find code snippets with similar process, or (2) find APIs that may be called by the unfinished code. To this end, we propose API-Repo, an API-centric repository-level code completion framework. In this framework, APIs have two uses: (1) focusing on the similarity of API calls when retrieving similar code snippets; (2) retrieving user-defined APIs that may be called by the unfinished code. \funcrepo{} first collects all functions in the repository to build a function repository. It extracts API calls in each function and performs similar function retrieval to find code snippets with the most similar API calls, which indicates that they have similar processes. And it performs base class retrieval and related API retrieval to find APIs that may be called by the unfinished code. Three retrieval results are combined with the unfinished code for generation. We conduct experiments on five code LLMs with 7B parameters and two datasets. Experiments show that our method outperforms the baseline methods in code match and identifier match metrics. On RepoEval dataset, the two metrics increase by 2.94%/3.14% respectively, and on CrossCodeEval dataset, the two metrics increased by 4.58%/5.52% respectively.
Sat 21 JunDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
11:00 - 13:00 | Session7: AI for Software Engineering IIIResearch Track at Cosmos 3C Chair(s): Lina Gong Nanjing University of Aeronautics and Astronautic | ||
11:00 15mTalk | Brevity is the Soul of Wit: Condensing Code Changes to Improve Commit Message Generation Research Track Hongyu Kuang Nanjing University, Ning Zhang Nanjing University, Hui Gao Nanjing University, Xin Zhou Nanjing University, Wesley Assunção North Carolina State University, Xiaoxing Ma Nanjing University, Dong Shao Nanjing University, Guoping Rong Nanjing University, He Zhang Nanjing University | ||
11:15 15mTalk | DesDD: A Design-Enabled Framework with Dual-Layer Debugging for LLM-based Iterative API Orchestrating Research Track Zhuo Cheng Jiangxi normal University, Zhou Zou Jiangxi Normal University, Qing Huang School of Computer Information Engineering, Jiangxi Normal University, Zhenchang Xing CSIRO's Data61, Wei Zhang Jiangxi Meteorological Disaster Emergency Early Warning Center, Jiangxi Meteorological Bureau, Shaochen Wang Jiangxi Normal Univesity, Xueting Yi Jiangxi Meteorological Disaster Emergency Early Warning Center, Jiangxi Meteorological Bureau, Huan Jin School of Information Engineering, Jiangxi University of Technology, Zhiping Liu College of Information Engineering, Gandong University, Zhaojin Lu Jiangxi Tellhow Animation College, Tellhow Group Co.,LTD | ||
11:30 15mTalk | AUCAD: Automated Construction of Alignment Dataset from Log-Related Issues for Enhancing LLM-based Log Generation Research Track Hao Zhang Nanjing University, Dongjun Yu Nanjing University, Lei Zhang Nanjing University, Guoping Rong Nanjing University, YongdaYu Nanjing University, Haifeng Shen Southern Cross University, He Zhang Nanjing University, Dong Shao Nanjing University, Hongyu Kuang Nanjing University | ||
11:45 15mTalk | Enhancement Report Approval Prediction: A Comparative Study of Large Language Models Research Track | ||
12:00 15mTalk | MetaCoder: Generating Code from Multiple Perspectives Research Track chen xin , Zhijie Jiang National University of Defense Technology, Yong Guo National University of Defense Technology, Zhouyang Jia National University of Defense Technology, Si Zheng National University of Defense Technology, Yuanliang Zhang National University of Defense Technology, Shanshan Li National University of Defense Technology | ||
12:15 15mTalk | API-Repo: API-centric Repository-level Code Completion Research Track Zhihao Li State Key Laboratory for Novel Software and Technology, Nanjing University, Chuanyi Li Nanjing University, Changan Niu Software Institute, Nanjing University, Ying Yan State Key Laboratory for Novel Software and Technology, Nanjing University, Jidong Ge Nanjing University, Bin Luo Nanjing University | ||
12:30 15mTalk | AdaptiveLLM: A Framework for Selecting Optimal Cost-Efficient LLM for Code-Generation Based on CoT Length Research Track Junhang Cheng Beihang University, Fang Liu Beihang University, Chengru Wu Beihang University, Li Zhang Beihang University Pre-print Media Attached File Attached | ||
12:45 15mTalk | Lightweight Probabilistic Coverage Metrics for Efficient Testing of Deep Neural Networks Research Track Yining Yin Nanjing University, Yang Feng Nanjing University, Shihao Weng Nanjing University, Xinyu Gao , Jia Liu Nanjing University, Zhihong Zhao Nanjing University |
Cosmos 3C is the third room in the Cosmos 3 wing.
When facing the main Cosmos Hall, access to the Cosmos 3 wing is on the left, close to the stairs. The area is accessed through a large door with the number “3”, which will stay open during the event.