[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-85025-en":3,"doc-seo-85025-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},85025,1374391975076,"Riley","https://ap-avatar.wpscdn.com/avatar/14000253ca4ec9f6853?x-image-process=image/resize,m_fixed,w_180,h_180&k=1783305029341752051",8,"Research & Report","Bug Report Specification Refinement with Trajectory Guidance for Automated Program Repair","Bug reports often act as task specifications for repository-level automated program repair (APR) agents, yet they frequently omit repair-relevant details such as failure-inducing behavior, behavioral requirements, and implementation scope. This leads agents to inspect irrelevant code, infer incorrect requirements, or produce patches that fix only the reported symptom. TrajSpec refines bug reports by collecting trajectories from a prefix repository, structuring unverified trajectory-derived evidence hierarchically, drafting a revised report, and applying repository-based review. Evaluation on SWE-Bench Lite shows substantial Pass@1 gains.","Bug Report Specification Refinement with Trajectory Guidance for Automated Program Repair  \nS M Farah Al Fahim∗ , Md Nakhla Rafi∗ , Md Ahasanuzzaman∗ , Zeyang Ma∗ Dong Jae Kim†, Shaowei Wang‡, Tse-Hsun (Peter) Chen∗  \n∗ Software Performance, Analysis, and Reliability (SPEAR) Lab, Concordia University, Montreal, Canada  \n[smfarahal.fahim@mail.concordia.ca](smfarahal.fahim@mail.concordia.ca), [mdnakhla.rafi@mail.concordia.ca](mdnakhla.rafi@mail.concordia.ca), m [ahasa@live.concordia.ca](ahasa@live.concordia.ca)[m](m zeyang@encs.concordia.ca)[ ](m zeyang@encs.concordia.ca)[zeyang@encs.concordia.ca](m zeyang@encs.concordia.ca), [peterc@encs.concordia.ca](peterc@encs.concordia.ca)  \n† DePaul University, Chicago, USA [dkim121@depaul.edu](dkim121@depaul.edu)  \n‡ University of Manitoba, Winnipeg, Canada [Shaowei.Wang@umanitoba.ca](Shaowei.Wang@umanitoba.ca)  \narXiv :2607 .07882v 1 [ cs . SE] 8 Jul 2026  \nAbstract—Bug reports serve as task specifications for repository-level automated program repair (APR) agents, but they often describe only the observed failure and omit repairrelevant information such as the failure-inducing behavior, behavioral requirement, and implementation scope. As a result, a repair agent may inspect irrelevant code, infer an incorrect requirement, or generate a patch that addresses the reported symptom without restoring the intended repository behavior. We present TrajSpec, a trajectory-guided approach for repository-supported bug report specification refinement. Given an original report and a prefix repository, TrajSpec runs a trajectory-collection agent and uses the resulting unverified trajectory as a source of trajectoryderived specification evidence. It organizes this evidence into a three-level representation consisting of a high-level interpretation of the issue, diagnostic findings supporting that interpretation, and concrete repository observations. TrajSpec then generatesa draft refined report and applies repository-based review to remove unsupported claims, revise uncertain claims, and add repository-supported details. We evaluate TrajSpec on all 300 SWE-Bench Lite instances using Mini-SWE-Agent V2. TrajSpec’s refined reports improve Pass@1 from 41.00% to 59.67% with GPT-5-mini and from 54.67% to 64.33% with MiniMax M2.5. On a stratified sample of 100 instances, TrajSpec’s refined reports also improve Pass@1 from 41.00% to 71.00% with Agentless and from 47.00% to 72.00% with AutoCodeRover. Ablation results show that removing repository-based review or the hierarchical evidence representation reduces Pass@1 from 59.67% to 48.00% and 47.67%, respectively. Overall, TrajSpec provides actionable repository-supported context that consistently improves repair performance.  \nIndex Terms—Automated Program Repair, Bug Report Enhancement, Specification Refinement, Large Language Models, Repository-Level Repair, Software Maintenance  \nI. INTRODUCTION  \nLarge language models (LLMs) have enabled a new generation of repository-level automated program repair (APR) agents [1, 2, 3, 4, 5] . Given a bug report and a pre-fix repository snapshot, these agents search the repository, inspect source code, reason about the expected behavior, and generate patches that are validated against tests. Benchmarks such as SWE-Bench [6] have made this setting a central testbed for evaluating whether LLM-based agents can resolve real software issues from open-source repositories. In this setting, abug report is not only a communication artifact for developers. It is the primary task specification from which the repair agent  \nmust infer what behavior is wrong, what behavior should hold, and which parts of the repository are relevant to the fix.  \nHowever, the information needed to describe the symptoms of a bug is not necessarily sufficient to guide repository-level repair. Prior work has identified report elements that support bug understanding and diagnosis, including reproduction steps, observed and expected behavior, affected comp","cbCaidscbJbBzQgB","https://ap.wps.com/l/cbCaidscbJbBzQgB","pdf",325994,1,12,"English","en",105,"# Abstract\n# Introduction","[{\"question\":\"What limitation of bug reports harms repository-level automated program repair?\",\"answer\":\"Bug reports often describe only observed failures and omit repair-relevant information such as failure-inducing behavior, behavioral requirements, and implementation scope. This makes the repair agent’s inferred task specification incomplete or wrong.\"},{\"question\":\"How does TrajSpec refine a bug report using trajectory guidance?\",\"answer\":\"TrajSpec runs a trajectory-collection agent on the prefix repository, then uses the resulting unverified trajectory-derived evidence. It organizes evidence into a three-level representation and drafts a refined report.\"},{\"question\":\"What effect does repository-based review have on repair performance?\",\"answer\":\"Repository-based review removes unsupported claims, revises uncertain statements, and adds repository-supported details. Ablation shows removing this review lowers Pass@1 substantially.\"}]",1784200465,30,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"bug-report-specification-refinement-with-trajectory-guidance-for-automated-program-repair","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/bug-report-specification-refinement-with-trajectory-guidance-for-automated-program-repair/85025/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-17","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What limitation of bug reports harms repository-level automated program repair?","Question",{"text":75,"@type":76},"Bug reports often describe only observed failures and omit repair-relevant information such as failure-inducing behavior, behavioral requirements, and implementation scope. This makes the repair agent’s inferred task specification incomplete or wrong.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does TrajSpec refine a bug report using trajectory guidance?",{"text":80,"@type":76},"TrajSpec runs a trajectory-collection agent on the prefix repository, then uses the resulting unverified trajectory-derived evidence. It organizes evidence into a three-level representation and drafts a refined report.",{"name":82,"@type":73,"acceptedAnswer":83},"What effect does repository-based review have on repair performance?",{"text":84,"@type":76},"Repository-based review removes unsupported claims, revises uncertain statements, and adds repository-supported details. Ablation shows removing this review lowers Pass@1 substantially.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,122,127,130,134],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":45,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":45,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":28,"slug":121},"research-report",{"id":123,"doc_module":4,"doc_module_name":45,"category_name":124,"show_sort_weight":125,"slug":126},9,"Religion & Spirituality",20,"religion-spirituality",{"id":125,"doc_module":4,"doc_module_name":45,"category_name":128,"show_sort_weight":125,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":45,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":45,"category_name":136,"show_sort_weight":106,"slug":137},19,"General","general"]