DOI: https://doi.org/10.1145/3808181
تاريخ النشر: 2026-06-30
المؤلف: Fangwen Mu وآخرون
الموضوع الرئيسي: أبحاث هندسة البرمجيات
نظرة عامة
تقدم ورقة البحث ExpeRepair، وهو إطار مبتكر لإصلاح البرامج الآلي (APR) يستفيد من نماذج اللغة الكبيرة (LLMs) مع معالجة القيود الرئيسية للطرق الحالية. غالبًا ما تتعامل الأساليب الحالية مع مشكلات البرمجيات بشكل منفصل وتعتمد على استراتيجيات تحفيز ثابتة، مما يقيّد قدرتها على التكيف مع السياقات المتنوعة. على النقيض من ذلك، يستلهم ExpeRepair من العمليات المعرفية البشرية، مستخدمًا نظام ذاكرة مزدوج يتكون من الذاكرة العرضية والذاكرة الدلالية. يتيح هذا الإطار التعلم المستمر من تجارب الإصلاح التاريخية، مما يمكّن من إعادة استخدام المعرفة السابقة بشكل تكيفي أثناء الاستدلال. بشكل محدد، ينظم ExpeRepair معرفة الإصلاح إلى نوعين من الذاكرة: الذاكرة العرضية لأمثلة الإصلاح الملموسة والذاكرة الدلالية للرؤى المجردة. أثناء الاستدلال، يقوم بتكوين تحفيزات واعية بالسياق بشكل ديناميكي من خلال دمج كلا نوعي الذاكرة، مما يعزز قدرته على التعميم عبر سيناريوهات متنوعة.
تم التحقق من فعالية ExpeRepair من خلال تقييمات على معايير SWE-Bench Lite وSWE-Bench Verified، حيث حقق درجات pass@1 بلغت 60.3% و74.6%، على التوالي، متفوقًا على طرق مفتوحة المصدر الأخرى. تؤكد هذه النتائج على أهمية الاستفادة من المعرفة التاريخية للإصلاح لتحسين الأداء في مهام إصلاح البرامج المعقدة. من خلال تقليد عملية تراكم المعرفة للمطورين البشريين، يظهر ExpeRepair تقدمًا كبيرًا في فعالية وكفاءة الإصلاح، مما يمثل مساهمة كبيرة في مجال هندسة البرمجيات والذكاء الاصطناعي. الإطار متاح للاستخدام العام على https://github.com/ExpeRepair/ExpeRepair.
مقدمة
تناقش مقدمة ورقة البحث مجال إصلاح البرامج الآلي (APR)، الذي يسعى إلى أتمتة تحديد وتصحيح الأخطاء في الشيفرة المصدرية، مما يقلل من عبء العمل على المطورين ويعزز موثوقية البرمجيات. ركزت طرق APR التقليدية بشكل أساسي على إصلاحات على مستوى الوظائف، معالجة مقاطع الشيفرة الصغيرة والمعزولة. ومع ذلك، لا يتماشى هذا النهج بشكل جيد مع صيانة البرمجيات في العالم الحقيقي، والتي غالبًا ما تتضمن إدارة قواعد الشيفرة الكبيرة، وتفسير المشكلات المعقدة، والتعامل مع الاعتماديات بين الملفات. أدت التطورات الأخيرة في نماذج اللغة الكبيرة (LLMs) إلى تحول نحو APR على مستوى المستودع، مما يقدم تحديات فريدة مثل التنقل في قواعد الشيفرة الكبيرة وفهم منطق البرنامج المعقد.
تصنف الورقة طرق APR المستندة إلى LLM الحديثة إلى نهجين رئيسيين: الوكالة والإجرائية. تعالج الطرق الوكيلة LLM كوكيل مستقل يتفاعل مع الأدوات ويعدل الشيفرة، بينما تتبع الطرق الإجرائية تسلسلًا ثابتًا من المهام دون اتخاذ قرارات مستقلة. على الرغم من إمكاناتها، تواجه كلا الطريقتين قيودًا كبيرة، لا سيما في إغفال تجربة الإصلاح التاريخية. تميل الطرق الحالية إلى معالجة كل خطأ بشكل منفصل، متجاهلة الأنماط المتكررة من المشكلات التي غالبًا ما تظهر في مشاريع البرمجيات. من خلال الاستفادة الفعالة من المعرفة التاريخية للإصلاح، يمكن تحسين كفاءة ومعدلات نجاح حل الأخطاء بشكل كبير.
طرق
شمل الإعداد التجريبي نهجًا منهجيًا للتحقيق في فرضية البحث. استخدمت الدراسة بيئة محكومة حيث تم التلاعب بالمتغيرات بدقة لتقييم آثارها على النتائج ذات الاهتمام. تم استخدام أدوات وتقنيات قياس محددة لضمان الدقة والموثوقية في جمع البيانات.
تم اختيار المشاركين بناءً على معايير محددة مسبقًا، وتمت مراقبة تفاعلاتهم مع الظروف التجريبية عن كثب. شمل الإعداد سلسلة من التجارب المصممة لتكرار السيناريوهات الواقعية، مما يسمح بتحليل شامل للظواهر قيد التحقيق. تم تحليل البيانات بعد ذلك باستخدام طرق إحصائية مناسبة لاستخلاص استنتاجات ذات مغزى من النتائج التي تم الحصول عليها.
نتائج
في هذا القسم، يتم تقييم أداء ExpeRepair عبر أربعة نماذج أساسية مختلفة: o1-mini، DeepSeek-R1، Claude 3.5 Sonnet، وClaude 4 Sonnet. تكشف النتائج، الموضحة في الشكل 3، عن تصنيف متسق لأداء النماذج عبر معيارين. يتفوق Claude 4 Sonnet على الآخرين، محققًا معدل pass@1 قدره 60.3% على SWE-Bench Lite، تليه Claude 3.5 Sonnet، DeepSeek-R1، وo1-mini، التي سجلت معدلات pass@1 قدرها 49.0% و41.7%، على التوالي.
تشير النتائج إلى أن ExpeRepair يحتفظ بفعالية بالقوى النسبية للنماذج الأساسية، مما يظهر أداءً محسنًا مع النماذج الأكثر قدرة. من الجدير بالذكر أنه حتى عند اقترانه بنماذج أقل قدرة مثل o1-mini وDeepSeek-R1، لا يزال ExpeRepair يقدم نتائج تنافسية، حيث حقق o1-mini أداءً في pass@1 قابلًا للمقارنة مع SpecRover بناءً على Claude 3.5 Sonnet. وهذا يشير إلى أن ExpeRepair يمكن أن يعزز أداء نماذج الأساس المختلفة، بغض النظر عن قدراتها الكامنة.
مناقشة
تسلط قسم المناقشة في ورقة البحث الضوء على قيود طرق إصلاح البرامج الآلي (APR) الحالية المستندة إلى نماذج اللغة الكبيرة (LLM)، التي تستخدم بشكل أساسي تحفيزات ثابتة ومصنوعة يدويًا. هذه التحفيزات غير كافية لمعالجة تقاليد الترميز المتنوعة والأنماط المعمارية الموجودة في مشاريع البرمجيات الواقعية، مما يجعل من غير العملي تخصيصها لكل مستودع أو نوع مشكلة. يجادل المؤلفون بأن نهجًا أكثر فعالية سيكون من خلال توليد تحفيزات ديناميكية تتكيف مع الخصائص المحددة للمستودع وسياق المشكلة، مستفيدة من تجارب الإصلاح التاريخية على غرار عمليات التعلم البشرية.
لمعالجة هذه التحديات، يقدم المؤلفون ExpeRepair، وهو طريقة جديدة لإصلاح البرامج الآلي تعتمد على LLM تستخدم نظام ذاكرة مزدوج مستوحى من علم الإدراك. يتكون هذا النظام من ذاكرة عرضية لتخزين عروض الإصلاح الملموسة وذاكرة دلالية لالتقاط الرؤى المجردة من الإصلاحات السابقة. يقوم ExpeRepair بتوليد تحفيزات واعية بالسياق بشكل ديناميكي من خلال استرجاع التجارب ذات الصلة من هذه الوحدات الذاكرية أثناء عملية الإصلاح. تظهر التقييمات التجريبية على معايير SWE-Bench Lite وVerified أن ExpeRepair يتفوق على الطرق الحالية الرائدة، محققًا درجات pass@1 قدرها 60.3% و74.6%، على التوالي. تؤكد النتائج على فعالية آلية الذاكرة المزدوجة في تعزيز أداء الإصلاح، مما يوفر إطارًا قويًا للتقدمات المستقبلية في إصلاح البرمجيات الآلي.
قيود
في هذا القسم، يعترف المؤلفون بوجود قيد كبير في نهجهم، الذي يعزز توليد الاختبارات والتصحيحات من خلال استخدام الذاكرتين العرضية والدلالية، ولكنه لا يعالج بشكل كافٍ تحديد الأخطاء. يبرزون أن تحديد الأخطاء أمر حاسم لإصلاح البرامج الفعال، ومع ذلك فإن التحقق من صحته يطرح تحديات بسبب غياب oracle آلي. على عكس توليد الاختبارات والتصحيحات، حيث يمكن التحقق من الصحة من خلال نتائج التنفيذ، لا يمكن تقييم دقة توقعات التحديد بشكل موثوق بناءً فقط على نجاح التصحيحات اللاحقة.
يقترح المؤلفون حلاً محتملاً يتمثل في تجميع تجارب التحديد بشكل انتقائي من محاولات الإصلاح الناجحة، على افتراض أن التصحيح الصحيح يشير إلى تحديد دقيق. ومع ذلك، يلاحظون أن هذه الطريقة المحافظة ستؤدي إلى مجموعة ذاكرة محدودة، مما يقلل من التنوع والتغطية لحالات التحديد. وبالتالي، يحددون دمج آلية قوية لتحديد الأخطاء تعتمد على الذاكرة كمنطقة حيوية للبحث المستقبلي.
DOI: https://doi.org/10.1145/3808181
Publication Date: 2026-06-30
Author(s): Fangwen Mu et al.
Primary Topic: Software Engineering Research
Overview
The research paper introduces ExpeRepair, an innovative framework for automated program repair (APR) that leverages Large Language Models (LLMs) while addressing key limitations of existing methods. Current approaches often tackle software issues in isolation and depend on static prompting strategies, which restrict their adaptability to varied contexts. In contrast, ExpeRepair is inspired by human cognitive processes, utilizing a dual-memory system comprising episodic and semantic memories. This framework allows for continuous learning from historical repair experiences, enabling the adaptive reuse of past knowledge during inference. Specifically, ExpeRepair organizes repair knowledge into two types of memory: episodic memory for concrete repair examples and semantic memory for abstract insights. During inference, it dynamically composes context-aware prompts by integrating both memory types, enhancing its ability to generalize across diverse scenarios.
The effectiveness of ExpeRepair is validated through evaluations on the SWE-Bench Lite and SWE-Bench Verified benchmarks, where it achieved pass@1 scores of 60.3% and 74.6%, respectively, outperforming other open-source methods. These findings underscore the importance of leveraging historical repair knowledge to improve performance in complex program repair tasks. By mimicking the knowledge accumulation process of human developers, ExpeRepair demonstrates significant advancements in repair effectiveness and efficiency, marking a substantial contribution to the field of software engineering and AI. The framework is available for public use at https://github.com/ExpeRepair/ExpeRepair.
Introduction
The introduction of the research paper discusses the field of Automated Program Repair (APR), which seeks to automate the identification and correction of bugs in source code, thereby reducing developer workload and enhancing software reliability. Traditional APR methods have primarily focused on function-level repairs, addressing small, isolated code snippets. However, this approach does not align well with real-world software maintenance, which often involves managing extensive codebases, interpreting complex issues, and dealing with inter-file dependencies. Recent advancements in Large Language Models (LLMs) have prompted a shift towards repository-level APR, which presents unique challenges such as navigating large codebases and understanding intricate program logic.
The paper categorizes recent LLM-based APR methods into two main approaches: agentic and procedural. Agentic methods treat the LLM as an autonomous agent that interacts with tools and modifies code, while procedural methods follow a fixed sequence of tasks without autonomous decision-making. Despite their potential, both approaches face significant limitations, particularly in neglecting historical repair experience. Current methods tend to treat each bug in isolation, overlooking the recurring patterns of issues that often arise in software projects. By effectively harnessing historical repair knowledge, the efficiency and success rates of bug resolution could be significantly enhanced.
Methods
The experimental setup involved a systematic approach to investigate the research hypothesis. The study utilized a controlled environment where variables were meticulously manipulated to assess their effects on the outcomes of interest. Specific instruments and measurement techniques were employed to ensure accuracy and reliability in data collection.
Participants were selected based on predefined criteria, and their interactions with the experimental conditions were closely monitored. The setup included a series of trials designed to replicate real-world scenarios, allowing for a comprehensive analysis of the phenomena under investigation. Data were subsequently analyzed using appropriate statistical methods to draw meaningful conclusions from the results obtained.
Results
In this section, the performance of ExpeRepair is evaluated across four different foundation models: o1-mini, DeepSeek-R1, Claude 3.5 Sonnet, and Claude 4 Sonnet. The results, illustrated in Figure 3, reveal a consistent ranking of model performance across two benchmarks. Claude 4 Sonnet outperforms the others, achieving a pass@1 rate of 60.3% on SWE-Bench Lite, followed by Claude 3.5 Sonnet, DeepSeek-R1, and o1-mini, which recorded pass@1 rates of 49.0% and 41.7%, respectively.
The findings indicate that ExpeRepair effectively retains the relative strengths of the underlying models, demonstrating enhanced performance with more capable models. Notably, even when paired with less capable models like o1-mini and DeepSeek-R1, ExpeRepair still delivers competitive results, with o1-mini achieving pass@1 performance comparable to SpecRover based on Claude 3.5 Sonnet. This suggests that ExpeRepair can enhance the performance of various foundation models, regardless of their inherent capabilities.
Discussion
The discussion section of the research paper highlights the limitations of current Large Language Model (LLM)-based automated program repair (APR) methods, which predominantly utilize static, manually crafted prompts. These prompts are inadequate for addressing the diverse coding conventions and architectural patterns present in real-world software projects, making it impractical to customize them for each repository or issue type. The authors argue that a more effective approach would involve dynamic prompt generation that adapts to the specific characteristics of the repository and the context of the issue, drawing on historical repair experiences akin to human learning processes.
To address these challenges, the authors introduce ExpeRepair, a novel LLM-based APR method that employs a dual-memory system inspired by cognitive science. This system comprises an episodic memory for storing concrete repair demonstrations and a semantic memory for capturing abstract insights from past repairs. ExpeRepair dynamically generates context-aware prompts by retrieving relevant experiences from these memory modules during the repair process. Experimental evaluations on the SWE-Bench Lite and Verified benchmarks demonstrate that ExpeRepair outperforms existing state-of-the-art methods, achieving pass@1 scores of 60.3% and 74.6%, respectively. The findings underscore the effectiveness of the dual-memory mechanism in enhancing repair performance, providing a robust framework for future advancements in automated software repair.
Limitations
In this section, the authors acknowledge a significant limitation of their approach, which enhances test and patch generation through the use of episodic and semantic memories, but does not adequately address bug localization. They highlight that bug localization is crucial for effective program repair, yet verifying its correctness poses challenges due to the absence of an automated oracle. Unlike test and patch generation, where correctness can be validated through execution outcomes, the accuracy of localization predictions cannot be reliably assessed based solely on the success of subsequent patches.
The authors propose a potential solution of selectively accumulating localization experiences from successful repair attempts, under the assumption that a correct patch indicates accurate localization. However, they note that this conservative method would yield a limited memory set, reducing both the diversity and coverage of localization cases. Consequently, they identify the integration of a robust, memory-based bug localization mechanism as a vital area for future research.
