# Migracja i modernizacja kodu z AI

EN: **AI-assisted code migration and modernisation** · id `codemigration` · aliases: code migration, legacy modernization, code translation, migracja kodu, modernizacja starszego kodu, framework upgrade

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Aplikacje LLM i agenci](https://aiatlasgraph.com/t/applications.md) › [Agenci kodujący](https://aiatlasgraph.com/t/aicoding.md) › Migracja i modernizacja kodu z AI

## Description

- PL: Modele i agenci przepisują duże ilości istniejącego kodu: aktualizacja bibliotek, zmiana interfejsów, tłumaczenie między językami.
- EN: Models and agents rewrite large amounts of existing code: library upgrades, interface changes, translation between languages.

## In one sentence

- PL: Sztuczna inteligencja pomaga przenieść stary program na nowsze narzędzia lub inny język, wykonując tysiące podobnych, żmudnych zmian.
- EN: AI helps move an old program to newer tools or another language by making thousands of similar, tedious changes.

## Problem it solves

- PL: Firmy latami odkładają aktualizację starego oprogramowania, bo ręczna zmiana tysięcy plików jest nudna, droga i ryzykowna.
- EN: Companies postpone updating old software for years because changing thousands of files by hand is dull, costly and risky.

## What it does

- PL: Jak przeprowadzka z pomocą ekipy: ty ustalasz, co gdzie ma trafić, a pomocnicy przenoszą setki pudeł, które potem sprawdzasz.
- EN: Like moving house with a crew: you decide where things go, helpers carry hundreds of boxes, and you check them afterwards.

## Everyday example

- PL: Bank musi zastąpić przestarzałą bibliotekę w setkach usług; asystent przygotowuje zmiany plik po pliku, a testy i programiści je zatwierdzają.
- EN: A bank must replace an outdated library across hundreds of services; an assistant prepares changes file by file, and tests and developers approve them.

## This concerns you if you…

- PL: utrzymujesz stary system, którego nikt nie chce ruszać
- PL: musisz zaktualizować wiele projektów naraz
- EN: maintain an old system nobody wants to touch
- EN: need to update many projects at once

## Keywords

legacy modernization · COBOL to Java · framework upgrade · codemods · AST rewriting · large-scale changes · OpenRewrite · code translation

## How it works

- PL: Narzędzia wyszukują miejsca do zmiany (często klasycznie, przez analizę składni), a model generuje poprawki dla każdego fragmentu. Kompilacja, testy i automatyczna weryfikacja odrzucają złe propozycje; zaakceptowane zmiany trafiają do przeglądu w małych paczkach.
- EN: Tools locate code to change (often classically, through syntax analysis), and a model generates edits for each location. Compilation, tests and automated validation reject bad candidates; accepted changes go to review in small batches.

## Limits

- PL: Bez dobrych testów błędy przechodzą niezauważone, a subtelne różnice semantyki między językami lub wersjami łatwo przeoczyć. Raporty sukcesu pochodzą głównie z doświadczeń firm, nie z kontrolowanych badań.
- EN: Without good tests errors slip through, and subtle semantic differences between languages or versions are easy to miss. Success reports come mostly from company experience, not controlled studies.

## Key terms

- PL: **kod legacy**: Stary, wciąż używany kod, trudny w utrzymaniu.
- PL: **AST**: Drzewo składni programu, pozwalające precyzyjnie znaleźć miejsca zmian.
- PL: **zmiana masowa**: Ta sama modyfikacja wprowadzana w wielu plikach lub projektach.
- EN: **legacy code**: Old code still in use and hard to maintain.
- EN: **AST**: A program's syntax tree, used to find change locations precisely.
- EN: **large-scale change**: The same modification applied across many files or projects.

## Know first

- [Zbiory testowe i regresje (Evaluation datasets and regression tests)](https://aiatlasgraph.com/t/evalsets.md)
- [Orkiestracja subagentów (Subagent orchestration)](https://aiatlasgraph.com/t/subagents.md)

## Sources

- [How is Google using AI for internal code migrations?](<https://arxiv.org/abs/2501.06972>) `google-code-migrations-2025` · by Stoyan Nikolov, Daniele Codecasa, Anna Sjövall, Maxim Tabachnyk, Satish Chandra, Siddharth Taneja, Celal Ziftci (Google) · sponsored
- [Migrating Code At Scale With LLMs At Google](<https://arxiv.org/abs/2504.09691>) `google-scale-migrations-2025` · by Celal Ziftci, Stoyan Nikolov, Anna Sjövall, Bo Kim, Daniele Codecasa, Max Kim · sponsored

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/codemigration · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
