Method, device and equipment for improving code migration quality based on differential testing
By inserting logging code into the source code and migration code and performing differential testing, the problem of poor quality migration code generated by the code agent was solved, achieving efficient code generation and repair, and improving the quality and generation efficiency of migration code.
CN121764479BActive Publication Date: 2026-07-24INST OF SOFTWARE - CHINESE ACAD OF SCI
Patent Information
- Application Number
- CN202610263419.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-05
- Publication Date
- 2026-07-24
- Estimated Expiration
- 2046-03-05
Smart Images

Figure CN121764479B_ABST
Abstract
The application provides a method, device and equipment for improving code migration quality based on differential testing, relates to the technical field of machine learning, and aims to solve the defect that the quality of migration code generated by code agent for code migration is poor and improve the quality of the generated migration code. The method comprises the following steps: inserting log code into the source code and the migration code respectively; obtaining a first log file corresponding to the source code and a second log file corresponding to the migration code based on the log code in the process of running the source code and the migration code; comparing and analyzing the first log file and the second log file to determine abnormal log information, wherein the abnormal log information is used to indicate that the characteristic variables corresponding to the logic segments at the same position in the source code and the migration code are not matched; determining the difference code segment from the source code and the migration code based on the abnormal log information; and repairing the migration code based on the abnormal log information and the difference code segment to obtain the repaired migration code.
Need to check novelty before this filing date? Find Prior Art
Citation Information
Patent Citations
Language migration detection method and device, equipment and storage medium
CN120610737A
Code log-based data processing method and device, equipment and storage medium
CN121166519A
