Strategy plan
JoyCode Agent has developed a comprehensive error analysis and repair framework specifically tailored for the SWE-bench-Verified benchmark test. This framework systematically addresses code repository errors through multi-stage verification and an intelligent decision-making process.
Initially, a large language model is employed to generate targeted test cases based on the code repository and the provided error descriptions. Subsequently, operations are executed using the bash tool, while the deep thinking tool is utilized to analyze and decompose the problem. The editing tool then modifies the relevant code files to produce a fix diff. The system-generated diffs are validated against automatically generated test cases, and processed according to the validation results. For cases where the tests fail, the system first analyzes the root cause of the failure, and then applies CSR (Context Search Router) technology to search compressed traces, extracting similar trajectories as prior knowledge. Based on these, the system executes appropriate retry or learning strategies. Finally, the optimal diff is selected through a voting mechanism.
Core innovation point
End-to-End Verification Mechanism:Establishes a complete verification chain from test case generation to diff validation, ensuring the reliability of the repair solution.
Diverse Unit Test Generation Mechanism:The system automatically generates multi-type, multi-dimensional unit test cases for the code to be repaired, covering core functional paths and boundary scenarios, significantly improving the coverage and rigor of validation.
Intelligent Filtering and Analysis Mechanism:System-generated diffs are validated through automatically generated unit tests, filtering out those with high confidence. For diffs that do not pass, large models are leveraged for intelligent analysis to determine the cause of failure, enabling precise filtering and localization.
Trace Compression Mechanism:Key operation traces during the repair process are structured and summarized, significantly reducing the number of tokens required for similarity retrieval and improving the response speed and accuracy of subsequent case learning.
CSR Retrieval Algorithm:Utilizes the CSR (Context Search Router) algorithm to perform trace retrieval of failed test instances within the pool of successful instances under resource-constrained environments, quickly identifying similar historical issues.
Similar Case Learning Mechanism:Uses the compressed traces and traces retrieved by CSR as prior knowledge, and leverages large models for induction and summarization. This enables the system to learn from high-quality solutions, continuously enhancing the quality and reliability of subsequent repairs.
Voting Decision Optimization:Adopts a voting mechanism for generated results to improve the accuracy and stability of the final solution.
Highlights
Systematic Error Handling:Achieves fully automated processing throughout the entire workflow, from error identification and problem decomposition to solution generation.
Adaptive Learning Ability:Continuously improves repair strategies through a mechanism that learns from and reflects on successful cases.
Robustness Assurance:Employs multiple verification and classification mechanisms to ensure stable and reliable performance in complex environments.
Cost Control Optimization:Reduces sampling frequency, significantly reducing model invocation costs and enhancing the economic viability of real-world applications.
Scalable Architecture:A modular design allows the system to flexibly adapt to a wide range of code repair tasks.
Contributions
Contributors: Shaoqiang Zheng, Jiacheng Zhang and Junhao Shi
Project lead: Shaoqiang Zheng
Contact us
If you have any questions or would like to discuss JoyCode's SWE-bench technical solution, please contact us at zhengshaoqiang35@jd.com.
About JoyCode
JD Cloud JoyCode — Next-Generation Intelligent Coding IDE. Your 24/7 AI expert team.
Natural language programming and cloud hosting, ready to bring your ideas to life at any moment.
Download JoyCode:https://joycode.jd.com/