What a diff makes: automating code migration with large language models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Rosenfeld, Katherine A., Kerr, Cliff C., Lundin, Jessica
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911244153257984
author Rosenfeld, Katherine A.
Kerr, Cliff C.
Lundin, Jessica
author_facet Rosenfeld, Katherine A.
Kerr, Cliff C.
Lundin, Jessica
contents 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% of required changes in a single run, increasing to 80% with multiple runs, with 47% of changes generated perfectly.
format Preprint
id arxiv_https___arxiv_org_abs_2511_00160
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle What a diff makes: automating code migration with large language models
Rosenfeld, Katherine A.
Kerr, Cliff C.
Lundin, Jessica
Software Engineering
Artificial Intelligence
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% of required changes in a single run, increasing to 80% with multiple runs, with 47% of changes generated perfectly.
title What a diff makes: automating code migration with large language models
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2511.00160