What a diff makes: automating code migration with large language models
Katherine A. Rosenfeld, Cliff C. Kerr, Jessica Lundin

TL;DR
This paper investigates using large language models to automate code migration, improving compatibility across software versions, and introduces tools and datasets to facilitate further research in this area.
Contribution
It presents a novel approach leveraging LLMs for code migration, along with a dataset and open-source tool, AIMigrate, to support future development.
Findings
LLMs with context diffs outperform out-of-the-box models.
AIMigrate correctly identified 65% of changes in real-world migration.
Multiple runs increased accuracy to 80%, with 47% perfect changes.
Abstract
Modern software programs are built on stacks that are often undergoing changes that introduce updates and improvements, but may also break any project that depends upon them. In this paper we explore the use of Large Language Models (LLMs) for code migration, specifically the problem of maintaining compatibility with a dependency as it undergoes major and minor semantic version changes. We demonstrate, using metrics such as test coverage and change comparisons, that contexts containing diffs can significantly improve performance against out of the box LLMs and, in some cases, perform better than using code. We provide a dataset to assist in further development of this problem area, as well as an open-source Python package, AIMigrate, that can be used to assist with migrating code bases. In a real-world migration of TYPHOIDSIM between STARSIM versions, AIMigrate correctly identified 65%…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Software System Performance and Reliability
