Code completion, a highly valuable topic in the software development domain, has been increasingly promoted for use by recent advances in large language models (LLMs). To date, visible LLM-based code completion frameworks such as GitHub Copilot and GPT are trained using deep learning over vast quantities of unstructured text and open source code. As the paramount component and the cornerstone in daily programming tasks, code completion has largely boosted professionals’ efficiency in building real-world software systems. In contrast to this flourishing market, we find that code completion systems often output suspicious results, and to date, an automated testing and enhancement framework for code completion systems is not available. This research proposes CCTEST, a framework to test and repair code completion systems in blackbox settings. CCTEST features a set of novel mutation strategies, namely program structure-correlated (PSC) mutations, to generate mutated code completion inputs. Then, it detects inconsistent outputs, representing possibly erroneous cases, from all the completed code cases. Moreover, CCTEST repairs the code completion outputs by selecting the output that mostly reflects the “average” appearance of all output cases, as the final output of the code completion systems. We detected a total of 33,540 inputs (with a true positive rate of 86%) that can trigger erroneous cases from eight popular LLM-based code completion systems. With repairing, we show that the accuracy of code completion systems is notably increased by 40% and 67% with respect to BLEU score and Levenshtein edit similarity.
Thu 18 MayDisplayed time zone: Hobart change
11:00 - 12:30 | Program repair techniques and applicationsTechnical Track / Journal-First Papers / DEMO - Demonstrations at Meeting Room 104 Chair(s): Xuan-Bach D. Le University of Melbourne | ||
11:00 15mTalk | Better Automatic Program Repair by Using Bug Reports and Tests Together Technical Track Pre-print | ||
11:15 15mTalk | CCTEST: Testing and Repairing Code Completion Systems Technical Track Li Zongjie , Chaozheng Wang Harbin Institute of Technology, Zhibo Liu Hong Kong University of Science and Technology, Haoxuan Wang EPFL, Dong Chen HKUST, Shuai Wang Hong Kong University of Science and Technology, Cuiyun Gao Harbin Institute of Technology | ||
11:30 7mTalk | A Controlled Experiment of Different Code Representations for Learning-Based Program Repair Journal-First Papers Marjane Namavar University of British Columbia, Noor Nashid University of British Columbia, Ali Mesbah University of British Columbia (UBC) Link to publication Pre-print | ||
11:37 7mTalk | Patching Locking Bugs Statically with Crayons Journal-First Papers Juan Alfredo Cruz-Carlon IT University of Copenhagen, Mahsa Varshosaz IT University of Copenhagen, Denmark, Claire Le Goues Carnegie Mellon University, Andrzej Wąsowski IT University of Copenhagen, Denmark | ||
11:45 15mTalk | KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair Technical Track Nan Jiang Purdue University, Thibaud Lutellier University of Alberta, Yiling Lou Fudan University, Lin Tan Purdue University, Dan Goldwasser Purdue University, Xiangyu Zhang Purdue University Pre-print | ||
12:00 15mTalk | Rete: Learning Namespace Representation for Program Repair Technical Track Nikhil Parasaram University College London, Earl T. Barr University College London, Sergey Mechtaev University College London Link to publication Pre-print | ||
12:15 7mTalk | Cerberus: a Program Repair Framework DEMO - Demonstrations Ridwan Salihin Shariffdeen National University of Singapore, Martin Mirchev National University of Singapore, Yannic Noller National University of Singapore, Abhik Roychoudhury National University of Singapore | ||
12:22 7mTalk | Predicting Patch Correctness Based on the Similarity of Failing Test Cases Journal-First Papers Haoye Tian University of Luxembourg, Yinghua LI University of Luxembourg, Weiguo Pian University of Luxembourg, Abdoul Kader Kaboré SnT, University of Luxembourg, Kui Liu Huawei Software Engineering Application Technology Lab, Andrew Habib SnT, University of Luxembourg, Jacques Klein University of Luxembourg, Tegawendé F. Bissyandé SnT, University of Luxembourg |