Tuesday 04 March 2025
The quest for efficient and effective code fixing has been a long-standing challenge in the world of software engineering. With the advent of large language models, researchers have made significant progress in developing AI-powered solutions to tackle this problem. A recent study presents an innovative approach that combines retrieval and editing tasks to create a robust framework for resolving real-world issues.
The researchers started by collecting a massive dataset of issue descriptions, corresponding codebases, and oracle code modifications from GitHub repositories. They then applied instance-level data filtering to ensure the quality of their training data. The resulting dataset, SWE- Fixer-Train-110K, serves as the foundation for their model.
The core of their framework is a two-module system: a code file retrieval module and a code editing module. The retrieval module employs BM25 along with a lightweight model to achieve coarse-to-fine file retrieval. This allows it to identify relevant files in the codebase that require modifications. The code editing module, on the other hand, utilizes another model to generate patches for the identified files.
To evaluate their approach, the researchers trained two models separately: a 72B editor model and a 7B retriever model. They then assessed their performance on the SWE-Bench Lite and Verified benchmarks, achieving state-of-the-art results among open-source models with scores of 24.7% and 32.8%, respectively.
One notable aspect of their framework is its ability to generate detailed reasoning processes for each code modification. This not only provides transparency but also allows developers to understand the logic behind the suggested changes. The researchers achieved this by including file documentation, which contains information about class names, method names, and function definitions, along with the edited code snippets.
The edited output patch examples demonstrate how the model generates precise and relevant modifications. For instance, in one example, the original code snippet contains a check for dot characters in endpoint names, whereas the edited code snippet raises an error if such characters are present. This shows that the model can effectively identify and address specific issues.
This research has significant implications for software development and maintenance. By leveraging large language models to automate code fixing, developers can focus on higher-level tasks, such as design and architecture, while reducing the time and effort spent on debugging and testing. Furthermore, the transparency provided by the generated reasoning processes can facilitate collaboration and knowledge sharing among team members.
The future of AI-assisted code fixing holds much promise.
Cite this article: “AI-Powered Code Fixing Framework Achieves State-of-the-Art Results”, The Science Archive, 2025.
Code Fixing, Ai-Powered, Software Engineering, Large Language Models, Code Retrieval, Code Editing, Patch Generation, Reasoning Processes, Transparency, Collaboration







