Termsslug: behavioral-preservation

Behavioral Preservation

行为保持

The property ensuring that program logic, inputs, outputs, and side effects remain identical during code refactoring or transfor

Curated Intelligence

1 items · Page 1/1
Hacker News AIT2·Models
78 pts
Study Shows LLMs Often Break Legacy Code During Modernization

A new study reveals that when LLMs modernize legacy PHP code without project context or execution feedback, they break significantly more working files than they repair. In contrast, the rule-based tool Rector demonstrates greater stability, while most files modified by LLMs required no changes to remain compatible with newer PHP versions. The research recommends evaluating LLM code transformation by separating behavioral preservation from modernization metrics and using a 'no-change' baseline.