[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-86120-en":3,"doc-seo-86120-105":30,"detail-sidebar-cat-0-en-105":92},{"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":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},86120,1374391974468,"Eden","https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0",8,"Research & Report","Retrieval Oriented Code Representations in Agentic Bug Localization","LLM-based agents support software development, but repository-level bug localization depends on retrieving the right code context. This work studies file-level bug localization as a representation-driven retrieval problem and compares five code representations—file paths, raw source code, and three LLM-generated textual representations—across Long Code Arena (LCA) and SWE-bench Verified (SWE). Experiments evaluate lexical, semantic, and LLM retrieval plus LLM postretrieval ranking, quantifying representation cost via representation footprint. Results show role-aware summaries improve Hit@5 and cost-effectiveness, while raw code can be effective but expensive.","arXiv :2607 . 1 1046v 1 [ cs . SE] 13 Jul 2026  \nNoname manuscript No.  \n(will be inserted by the editor)  \nRetrieval-Oriented Code Representations in Agentic Bug Localization  \nGenevieve Caumartin 1,* · Tse-Hsun (Peter)  \nChen 1 · Diego Elias Costa 1  \nReceived: date / Accepted: date  \nAbstract LLM-based agents are increasingly being used to support software development, yet their performance in repository-level tasks depends on retrieving the right code context. Existing studies have explored file-level localization using traditional information retrieval over file pathsand raw source code. However, the role of textual code representations in retrieval and localization remains underexplored.  \nWe study file-level bug localization as a representation-driven retrieval problem. Across the Long Code Arena (LCA) and SWE-bench Verified (SWE) datasets, we compare five code representations: file paths, raw source code, and three LLM-generated textual representations. Our experiments include lexical, semantic, and LLM-based retrieval, followed by LLM-based postretrieval ranking. We quantify the cost incurred by a representation through representation footprint. We find that the choice of code representation affects both localization effectiveness and cost. Role-aware summaries outperform file-path representations by up to 40% Hit@5 while requiring a representation footprint 10.4 to 20.9 × smaller than raw source code. Combining complementary representation results and ranking retrieved candidates with an LLM provides further gains of up to 31 .9% and 42 .0%, respectively. Overall, role-aware summaries provide the best cost-effectiveness trade-off, while raw source code offers effectiveness in some settings at a significantly higher cost. A case study with Agentless reveals the utility of our techniques within a well-known pipeline, reaching 94% Hit@6 on file localization (+4.7% against the baseline) . Our findings suggest that code representation should be treated as a first-class design choice in agentic localization pipelines, guided by pipeline stage and cost-accuracy requirements.  \nKeywords information retrieval · bug localization · large language models · code representation · ranking  \nGenevieve Caumartin  \nE-mail: genevieve.caumartin@mail.concordia.ca  \nTse-Hsun (Peter) Chen  \nE-mail: [peterc@encs.concordia.ca](peterc@encs.concordia.ca)  \nDiego Elias Costa  \nE-mail: [diego.costa@concordia.ca](diego.costa@concordia.ca)  \n1 Department of Computer Science and Software Engineering, Gina Cody School of Engineering and Computer Science, Concordia University, Montreal, QC, Canada  \n* Corresponding author  \n1 Introduction  \nRecently, large language models (LLMs) have been increasingly used to support software development tasks (Li et al., 2025), including bug fixing, feature implementation and code reviews. One prominent application area is automated program repair, which typically consists of three phases: fault localization, patch generation and patch validation (Zhang et al., 2026) . The first phase, fault localization (or bug localization), requires identifying the code locations that are relevant to a bug before a patch can be generated or validated. This phase inherits the challenge of finding the relevant files within a large repository, which often contains hundreds to thousands of files. Repository-level localization is demanding because it involves navigating a complex code structure and understanding inter-file dependencies to localize the files where a bug should be fixed (Ma et al., 2025) . File-level retrieval is key: identifying the correct files affected by a bugis one of the first and most critical steps in the debugging process (Jain et al., 2024) . Accurate file-level localization narrows the search space for subsequent reasoning or patch generation, enabling downstream tools or developers to pinpoint faulty code snippets more efficiently. Recent evidence by Chang et al. (2025) suggests that improving the bug local","cbCaihWghsCWy9kn","https://ap.wps.com/l/cbCaihWghsCWy9kn","pdf",1648494,5,1,34,"English","en",105,"# Abstract\n# Introduction","[{\"question\":\"Why does retrieval depend on code representation in agentic bug localization?\",\"answer\":\"Repository-level localization requires transforming source files into retrievable units. Different textual representations change what retrievers and downstream LLMs can effectively use, affecting both localization effectiveness and cost.\"},{\"question\":\"What code representations are compared in the study?\",\"answer\":\"The study compares file paths, raw source code, and three LLM-generated textual representations, using representation-driven retrieval and an LLM-based postretrieval ranking step.\"},{\"question\":\"How do role-aware summaries and raw source code differ in performance and cost?\",\"answer\":\"Role-aware summaries outperform file-path representations by up to 40% Hit@5 while using a much smaller representation footprint than raw source code. Raw source code can yield effectiveness gains in some settings, but at significantly higher cost.\"}]",1784208642,86,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":87,"head_meta":89,"extra_data":91,"updated_unix":28},"retrieval-oriented-code-representations-in-agentic-bug-localization","",{"@graph":36,"@context":86},[37,54,69],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/research-report/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/retrieval-oriented-code-representations-in-agentic-bug-localization/86120/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":24,"description":14,"dateModified":62,"datePublished":63,"encodingFormat":61,"isAccessibleForFree":64,"interactionStatistic":65},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-07-26","2026-07-16",true,{"@type":66,"interactionType":67,"userInteractionCount":20},"InteractionCounter",{"@type":68},"ViewAction",{"@type":70,"mainEntity":71},"FAQPage",[72,78,82],{"name":73,"@type":74,"acceptedAnswer":75},"Why does retrieval depend on code representation in agentic bug localization?","Question",{"text":76,"@type":77},"Repository-level localization requires transforming source files into retrievable units. Different textual representations change what retrievers and downstream LLMs can effectively use, affecting both localization effectiveness and cost.","Answer",{"name":79,"@type":74,"acceptedAnswer":80},"What code representations are compared in the study?",{"text":81,"@type":77},"The study compares file paths, raw source code, and three LLM-generated textual representations, using representation-driven retrieval and an LLM-based postretrieval ranking step.",{"name":83,"@type":74,"acceptedAnswer":84},"How do role-aware summaries and raw source code differ in performance and cost?",{"text":85,"@type":77},"Role-aware summaries outperform file-path representations by up to 40% Hit@5 while using a much smaller representation footprint than raw source code. Raw source code can yield effectiveness gains in some settings, but at significantly higher cost.","https://schema.org",{"og:url":52,"og:type":88,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":90,"canonical":52},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":93},[94,98,102,106,110,115,120,123,128,131,135],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":95,"show_sort_weight":96,"slug":97},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":99,"show_sort_weight":100,"slug":101},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":103,"show_sort_weight":104,"slug":105},"Exam",70,"exam",{"id":20,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":20,"slug":138},19,"General","general"]