UCL Discovery
UCL home » Library Services » Electronic resources » UCL Discovery

Large Language Model Based Code Completion is an Effective Genetic Improvement Mutation

Wang, Jingyuan; Hanna, Carol; Petke, Justyna; (2025) Large Language Model Based Code Completion is an Effective Genetic Improvement Mutation. In: Proceedings of the 2025 IEEE/ACM International Workshop on Genetic Improvement (GI). (pp. pp. 11-18). IEEE Computer Society: Ottawa, ON, Canada. Green open access

[thumbnail of Final_submission.pdf]
Preview
Text
Final_submission.pdf - Accepted Version

Download (689kB) | Preview

Abstract

In this work, we introduce a novel large language model (LLM)-based masking mutation operator for Genetic Improvement (GI), which leverages code completion capabilities of large language models to replace masked code segments with contextually relevant modifications. Our approach was tested on five open-source Java projects, where we compared its effectiveness against both traditional GI mutations and an existing LLM-based replacement mutation operator using random and local search algorithms. Results show that the masking mutation operator creates a search space with more compiling and test-passing patches, reducing model response time by up to 60.7 % compared to the replacement mutation. Additionally, it outperforms the replacement mutation in achieving the highest runtime improvement on four out of five projects and discovers more runtime-improving patches across all projects. However, combining the masking mutation with traditional GI mutations yielded inconsistent results, suggesting further investigation is needed. This study highlights the promise of LLM-based code completion to boost the efficiency and effectiveness of GI for automated software optimisation.

Type: Proceedings paper
Title: Large Language Model Based Code Completion is an Effective Genetic Improvement Mutation
Event: The 14th International Workshop on Genetic Improvement @ ICSE 2025
ISBN-13: 979-8-3315-0192-1
Open access status: An open access version is available from UCL Discovery
DOI: 10.1109/GI66624.2025.00011
Publisher version: https://doi.ieeecomputersociety.org/10.1109/GI6662...
Language: English
Additional information: This version is the author accepted manuscript. For information on re-use, please refer to the publisher’s terms and conditions.
UCL classification: UCL
UCL > Provost and Vice Provost Offices > UCL BEAMS
UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science > Dept of Computer Science
URI: https://discovery.ucl.ac.uk/id/eprint/10204242
Downloads since deposit
4Downloads
Download activity - last month
Download activity - last 12 months
Downloads by country - last 12 months

Archive Staff Only

View Item View Item