Warehouse-level software problem localization method and warehouse-level software problem localization apparatus
By employing an architecture that integrates navigators and inspectors, the problem of balancing breadth and depth in software issue localization is solved, achieving efficient and accurate warehouse-level software issue localization.
Patent Information
- Application Number
- CN202611047100.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-11-27
AI Technical Summary
In existing technologies, it is difficult to balance the breadth of the search and the depth of the analysis in software problem localization, resulting in inaccurate or inefficient root cause localization.
The architecture employs a navigator and an inspector working together. The navigator is responsible for global file-level search, while the inspector is responsible for local function-level analysis. By tracing the root cause of problems through cross-file call relationships, it achieves multi-round local search and feedback.
It improves the recall and accuracy of warehouse-level software problem localization, reduces the accumulation of historical information in a single context, and enhances the accuracy and efficiency of localization decisions.
Smart Images

Figure CN123178243A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software engineering, and in particular to a method and apparatus for locating warehouse-level software problems. Background Technology
[0002] Code problem localization can locate the relevant files or functions in the code repository based on received software defect reports, functional anomaly descriptions, or maintenance requirements, providing directly usable localization clues for subsequent manual or automated program repair.
[0003] In some related technologies, code retrieval based on vector similarity is often employed. This approach encodes the natural language problem description and code entities into the same vector space and returns candidate files, classes, or functions based on similarity. Therefore, it primarily relies on static semantic matching between the problem description and the code text, typically returning files or functions superficially related to the problem description, lacking tracing of the root cause. In other related technologies, an intelligent agent uses interactive tools to conduct multi-step exploration to locate the problem code. However, in this approach, the agent has a heavy workload and struggles to balance the breadth of the search and the depth of analysis during problem localization.
[0004] There is currently no effective solution to the problem that software problem localization in related technologies struggles to balance the breadth of search and the depth of analysis. Summary of the Invention
[0005] This embodiment provides a warehouse-level software problem localization method and a warehouse-level software problem localization device to solve the problem in related technologies that it is difficult to balance the breadth of search and the depth of analysis in software problem localization.
[0006] Firstly, this embodiment provides a repository-level software problem localization method, including:
[0007] Using a pre-built navigator, based on a pre-given software problem description and the structure of the code repository where the problem is to be located, the entry file for the current round is determined and dispatched to the inspector; the navigator is a trained agent for code file location and inspector scheduling; the inspector is a trained agent for performing local deep code analysis on the code file.
[0008] The dispatched inspector, starting from the entry file, identifies the target code entity corresponding to the software problem description and identifies candidate code in the entry file; when the target code entity has a cross-file call relationship, it locates the code region associated with the target code entity along the cross-file call relationship and identifies the candidate code, until it is determined that the local search of the current round is completed, and returns the local search results of the current round containing the candidate code to the navigator;
[0009] The navigator determines whether the software problem localization is complete based on the local search results of the current round. If not, it determines the entry file for the next round and dispatches the entry file to the inspector for local search until the local search results of the corresponding round confirm that the software problem localization is complete.
[0010] In some embodiments, a pre-built navigator determines the entry file for the current round to be dispatched to the inspector based on a pre-given software problem description and the structure of the code repository to be located, including:
[0011] Using a pre-built navigator, a global search state for the current round is established based on a pre-given software problem description and the code repository structure to be located; the global search state includes a candidate code set, a set of visited files, and a queue of files to be visited.
[0012] The entry file for the current round is determined from the queue of files to be accessed and dispatched to the inspector.
[0013] In some of these embodiments, determining the entry file for the next round includes:
[0014] Update the candidate code in the local search results of the current round to the candidate code set, update the entry file of the current round to the visited file set, and remove the entry file of the current round from the file queue to be visited;
[0015] Based on the updated global search status, determine the entry file for the next round.
[0016] In some embodiments, when there are multiple entry files in the current round, dispatching the entry files to the inspector includes:
[0017] The different entry files in the current round are dispatched to different inspectors, so that each inspector performs a local search for the current round with an independent context for the dispatched entry file; the inspector corresponds one-to-one with the entry file.
[0018] In some embodiments, the dispatched inspector, starting from the entry file, identifies target code entities corresponding to the software problem description and identifies candidate code within the entry file, including:
[0019] The dispatched inspector, starting from the entry file, calls a code reading tool to read code entity distribution information from the entry file;
[0020] Determine the target code entity corresponding to the software problem description from the code entity distribution information;
[0021] The target code entity is subjected to code implementation analysis, and candidate code corresponding to the software problem description is determined based on the results of the code implementation analysis.
[0022] In some embodiments, when the target code entity has cross-file call relationships, locating the code region associated with the target code entity along the cross-file call relationships and identifying the candidate code includes:
[0023] Along the cross-file call relationship, using the caller query tool and the callee query tool, candidate code corresponding to the software problem description is identified from the cross-file code region associated with the target code entity.
[0024] In some embodiments, before determining the entry file for the current round to be dispatched to the inspector based on a pre-defined software problem description and the structure of the code repository to be located, using a pre-built navigator, the method further includes training the inspector and the navigator; the training process for the inspector and the navigator includes:
[0025] Construct a first demonstration trajectory and a second demonstration trajectory; the first demonstration trajectory indicates the determination of the entry file and the scheduling of the checker based on the software problem description; the second demonstration trajectory indicates the reading of the entry file, identification of candidate code, and tracing of call relationships.
[0026] Based on the first demonstration trajectory, the constructed first intelligent agent is trained to obtain an initial navigator;
[0027] Based on the second demonstration trajectory, the constructed second agent is trained to obtain an initial checker;
[0028] Based on a preset local localization reward function and a set of local real localization samples, the initial checker is trained to obtain a trained checker.
[0029] Using the trained checker as a fixed feedback module for the initial navigator, the initial navigator is trained based on a preset global positioning reward function to obtain the trained navigator.
[0030] In some embodiments, the local positioning reward function is a function that measures the quality of local positioning and the success rate of tool invocation.
[0031] In some embodiments, the global positioning reward function is a function that measures the quality of global positioning and the success rate of tool invocation.
[0032] Secondly, this embodiment provides a warehouse-level software problem localization device, including: a dispatch module, a local search module, and a judgment module; wherein:
[0033] The dispatch module is used to determine the entry file of the current round and dispatch it to the inspector based on a pre-given software problem description and the code repository structure to be located, using a pre-built navigator; the navigator is a trained agent for code file location and inspector scheduling; the inspector is a trained agent for performing local deep code analysis on the code file.
[0034] The local search module is used to determine the target code entity corresponding to the software problem description in the entry file and identify candidate code by using the dispatched inspector, starting from the entry file; when the target code entity has a cross-file call relationship, it locates the code region associated with the target code entity along the cross-file call relationship and identifies the candidate code, until it is determined that the local search of the current round is completed, and returns the local search results of the current round containing the candidate code to the navigator;
[0035] The judgment module is used to determine, through the navigator, whether the software problem localization has been completed based on the local search results of the current round; if not, it determines the entry file for the next round and dispatches the entry file for the next round to the inspector for local search, until the software problem localization is determined to be completed based on the local search results of the corresponding round.
[0036] Compared with related technologies, this embodiment provides a warehouse-level software problem localization method and a warehouse-level software problem localization device. The repository-level software problem localization method utilizes a pre-built navigator to determine the entry file for the current round and dispatch it to the inspector based on a pre-given software problem description and the code repository structure to be localized. The navigator is a trained agent for code file localization and inspector scheduling. The inspector is a trained agent for performing local deep code analysis on the code file. The dispatched inspector, starting from the entry file, identifies the target code entity corresponding to the software problem description and identifies candidate code within the entry file. When the target code entity has cross-file call relationships, it locates the code region associated with the target code entity along the cross-file call relationships and identifies candidate code until the local search for the current round is complete. The navigator then returns the local search results for the current round, containing candidate code. The navigator uses the local search results for the current round to determine whether software problem localization is complete. If not, it determines the entry file for the next round and dispatches it to the inspector for local search until the local search results for the corresponding round confirm the completion of software problem localization. It can improve the recall and accuracy of warehouse-level software problem localization by combining the collaboration of navigators and inspectors, taking into account both the breadth of file-level search and the depth of function-level analysis.
[0037] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0038] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0039] Figure 1 This is a flowchart of a repository-level software problem localization method according to an embodiment of this application;
[0040] Figure 2 This is a combined architecture diagram of the navigator and inspector according to an embodiment of this application;
[0041] Figure 3 This is a structural block diagram of a warehouse-level software problem localization device according to an embodiment of this application. Detailed Implementation
[0042] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0043] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this application do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," "third," etc., used in this application are merely to distinguish similar objects and do not represent a specific order of objects.
[0044] This embodiment provides a method for locating warehouse-level software problems. Figure 1 This is a flowchart of the repository-level software problem localization method in this embodiment, such as... Figure 1 As shown, the process includes the following steps:
[0045] Step S101: Using a pre-built navigator, based on a pre-given software problem description and the code repository structure for locating the problem, determine the entry file for the current round and dispatch it to the inspector; the navigator is a trained agent for locating code files and scheduling inspectors; the inspector is a trained agent for performing local deep code analysis on code files.
[0046] Specifically, the navigator can be a trained agent used for code file location and inspector scheduling. The agent can be a computer program capable of perceiving the environment, making autonomous decisions, and taking actions to achieve a specific goal. The software problem description can be a software defect report in natural language, a description of functional anomalies, or maintenance requirements. The code repository structure can be the overall layout of code folders, subfolders, and the hierarchical relationships, naming conventions, and functional partitions within a code repository.
[0047] The entry file can be a code file selected by the navigator from a queue of code files to be accessed, which needs to be dispatched to the inspector for local searching in the current round. The navigator, as a globally coordinating module, maintains the search state at the code repository level. Based on the software problem description, it performs a file-level search and selects the code file related to the software problem description as the entry file. Then, it dispatches the entry file to the inspector for local searching. The inspector can also be a trained agent, acting as a local analysis module. It independently analyzes the functions, class methods, and call relationships of the code around the dispatched entry file and feeds back the location of the identified candidate code and the basis for the analysis to the navigator. Understandably, the navigator and inspector can be implemented using the same large language model instance, or they can be implemented using large language model instances of different sizes or capabilities. For example, the navigator can use a planning model with stronger planning capabilities, while the inspector can use a more efficient code model. The candidate code can be functions or class methods that are suspected of exhibiting abnormal behavior or functional defects related to the aforementioned software problem description in their specific implementation.
[0048] Step S102: Using the dispatched inspector, starting from the entry file, determine the target code entity corresponding to the software problem description in the entry file and identify candidate code; when there is a cross-file call relationship between the target code entity, locate the code region associated with the target code entity along the cross-file call relationship and identify candidate code, until it is determined that the local search of the current round is completed, and return the local search results of the current round containing candidate code to the navigator.
[0049] The inspector starts with the entry file dispatched by the navigator and independently conducts a local search process. During this local search, the context used by the inspector only includes the software problem description and the corresponding entry file information, and does not accumulate the search trajectory of previous rounds of the navigator. The inspector can first read the function, class, and class method structure in the entry file to obtain the code entity distribution of the entry file. Then, based on this code entity distribution, it filters out code entities that are semantically related to the software problem description as target code entities. Afterward, based on its own reasoning, the inspector can further read the specific implementation of functions or class methods in the target code entities to determine whether the code in the target code entities may cause abnormal behavior or functional defects in the software problem description. If so, the corresponding function or class method is identified as candidate code.
[0050] Specifically, in this embodiment, the inspector's local search is not limited to the entry file itself. When candidate code in the target code entity depends on external logic, the inspector can also query the caller and callee of the target code entity, tracing the corresponding code region across files along cross-file call relationships (including cross-file call chains, class method dependencies, or configuration resolution processes). Therefore, the inspector can discover the root causes of problems hidden in deep call relationships while maintaining the depth of local analysis.
[0051] During the local search process of the inspector, when the inspector determines through its own reasoning that there is no relevant code (such as functions or class methods) that needs to be searched further, it will exit the local search of the current round, return the candidate code (suspicious functions or class methods) identified in the current round to the navigator, and can also provide corresponding analysis and explanations as well as the local exploration trajectory corresponding to the current round.
[0052] Step S103: Using the navigator, determine whether the software problem localization is complete based on the local search results of the current round; if not, determine the entry file for the next round and dispatch the entry file for the next round to the inspector for local search, until the software problem localization is completed based on the local search results of the corresponding round.
[0053] The navigator then uses the local search results returned by the inspector to infer whether the evidence found is sufficient to support code location. If so, the search can be terminated and the final location result output; otherwise, the navigator will continue to determine new entry files and dispatch them to the inspector for a new round of local search. The entry files are different in different rounds, and entry files that have already been searched will not be searched again.
[0054] Both the navigator and the inspector can invoke different intelligent agent tools during the global search and the local search, respectively. The tools available to the navigator and inspector will be introduced below. The final localization result can output only the location of the problematic code, or it can simultaneously output the code location, confidence ranking, and downstream repair suggestions.
[0055] Table 1 lists the intelligent agent tools that the navigator can use. Intelligent agent tools can be external functions or interfaces that are actively invoked by the intelligent agent to perform specific atomic operations. Intelligent agent tools encapsulate the interaction capabilities between the intelligent agent and the environment (such as file systems, code libraries, APIs, databases, etc.) into standardized callable units, thereby extending the intelligent agent's ability to complete complex tasks. There are no dependencies between different intelligent agent tools; the navigator can autonomously determine the invocation order and number of invocations of intelligent agent tools based on task progress and inference needs.
[0056] Table 1
[0057]
[0058] When starting the next round of entry file selection, the navigator can invoke either the file content search tool (find_files_by_content) or the filename search tool (find_files_by_name) to identify new code files corresponding to the software problem description as entry files. Alternatively, it can select entry files from the queue of code files to be accessed using other methods. After determining the entry file, the navigator can invoke the dispatch tool to send the entry file to the inspector for function-level in-depth analysis. Furthermore, when the navigator confirms that the evidence found in the current round is sufficient to support code location, it invokes the exit tool (exit) to terminate the search and output the final code location results.
[0059] Table 2 lists the intelligent agent tools that the inspector can use. Similarly, there are no dependencies between different intelligent agent tools. The inspector can autonomously determine the order and number of times to call the intelligent agent tools based on task progress and inference needs.
[0060] Table 2
[0061]
[0062] The inspector can read the function, class, and class method structure of the dispatched entry file by calling the `get_methods_of_class` tool, the `get_file_functions` tool, and the `get_file_classes` tool, thus obtaining the code entity distribution of the entry file. Based on the software problem description, target code entities are filtered out, and the specific implementations of functions or class methods related to the software problem description are read using the `get_code_of_function` and `get_code_of_class_method` tools to determine whether they might cause the same abnormal behavior or functional defects as described in the software problem description. Furthermore, when a function related to the software problem description depends on external logic, the inspector can also trace relevant code regions across files by calling the `get_callers` and `get_callees` tools, following cross-file call chains, class method dependencies, or configuration resolution processes.
[0063] When the inspector determines that there are no relevant functions that need to be searched further, it can call the exit tool to return the candidate code (suspicious functions or class methods) identified in the current round, the corresponding analysis description, and the local search trajectory of the current round as the local search results of the current round.
[0064] In addition to the tools shown in Tables 1 and 2 above, appropriate calling tools can be selected based on the programming language. For example, Python can use Abstract Syntax Tree (AST) and call graph tools, Java can use class hierarchy and method signature parsing tools, and JavaScript / TypeScript can use module dependency and type inference tools.
[0065] In related technologies, code localization based on problem descriptions can be broadly categorized into two types: the first is code localization methods based on semantic similarity; the second is single-agent localization methods based on large language models. The first type of method encodes the natural language problem description and code entities into the same vector space and returns candidate files, classes, or functions according to similarity. This type of method is simple to implement and has a fast retrieval speed. However, because it relies on static text or code representations, it struggles to understand cross-file call relationships, data flow dependencies, and root cause logic. Therefore, it tends to return code that is literally similar to the problem description but is not the root cause in a higher order, resulting in low accuracy in root cause localization.
[0066] The second type of approach typically involves a single agent interacting with the code repository using tools such as file reading, code searching, and dependency checking. Within the same agent's execution paradigm (ReAct) trajectory, the agent continuously observes, considers, and invokes these tools, ultimately outputting the localization result. Compared to the static retrieval of the first type of approach, the second type possesses stronger code understanding capabilities. However, because the exploration trajectory of this type of approach is usually stored in a single context, as the number of steps increases, historical observations, code snippets, and intermediate inferences continuously occupy the context window, causing subsequent localization decisions to be interfered with by redundant information within the context window. Although some related technologies propose pruning the context based on relevance, in large code repositories, as the number of relevant code locations continues to increase, the context pressure will continue to rise. Furthermore, many related technologies rely on a single agent autonomously balancing the breadth of file-level search and the depth of function-level analysis required for repository-level code localization, placing high demands on model planning and code analysis capabilities. In some related technologies, a file-level breadth search is performed first, followed by a function-level depth search on candidate files. This single-round workflow is insufficient for complex localization tasks that require multiple rounds of retrieval, gradual understanding of the problem, and discovery of root causes.
[0067] Therefore, the following technical limitations still exist in the related technologies: semantic similarity-based methods cannot handle multi-level code call relationships and lack the ability to locate root causes; existing single-agent methods have the problem of continuous accumulation of a single context, which easily squeezes the effective inference space of the model; existing single-agent methods usually entrust the file-level breadth and function-level depth analysis to the same agent for coordination, and the flat structure is difficult to stably handle warehouse-level localization tasks with hierarchical features.
[0068] This embodiment constructs a navigator-inspector collaborative architecture through steps S101 to S103, dividing the code repository search process into two layers: file-level global coordination and function-level local analysis. The navigator is responsible for file-level breadth-of-field search and inspector scheduling; the inspector performs function-level depth-of-field analysis around the entry file specified by the navigator. This layered design reduces the accumulation of historical information in a single context and supports multiple rounds of search and feedback, thus achieving a direct balance between file-level breadth-of-field search and function-level depth-of-field analysis, improving the recall and accuracy of repository-level problem localization. Furthermore, by avoiding the continuous accumulation of historical information in a single context, it also reduces the interference of redundant information on subsequent localization decisions.
[0069] More specifically, compared to code retrieval based solely on semantic similarity in related technologies, this embodiment reads code entities and traces the relationship between callers and callees through an inspector, and can also locate the root cause of problems along cross-file call chains. By having the navigator and inspector work in independent contexts, information redundancy and inference space compression caused by continuous accumulation of context can be significantly reduced. Through hierarchical division of labor between the navigator and inspector, global file-level search and local function-level analysis are decoupled, overcoming the problem that single-agent flat search cannot balance breadth and depth.
[0070] Through steps S101 to S103, a pre-built navigator, based on a pre-given software problem description and the code repository structure for problem localization, determines the entry file for the current round and dispatches it to the inspector. The navigator is a trained agent for code file localization and inspector scheduling. The inspector is a trained agent for performing local deep code analysis on the code file. The dispatched inspector, starting from the entry file, identifies the target code entity corresponding to the software problem description and identifies candidate code within the entry file. When the target code entity has cross-file call relationships, it locates the code region associated with the target code entity along the cross-file call relationships and identifies candidate code until the local search for the current round is completed. The navigator then returns the local search results for the current round, containing candidate code. The navigator, based on the local search results for the current round, determines whether software problem localization is complete. If not, it determines the entry file for the next round and dispatches it to the inspector for local search until the local search results for the corresponding round confirm the completion of software problem localization. It can improve the recall and accuracy of warehouse-level software problem localization by combining the collaboration of navigators and inspectors, taking into account both the breadth of file-level search and the depth of function-level analysis.
[0071] In one embodiment, determining the entry file for the current round to be dispatched to the inspector based on a pre-defined software problem description and the code repository structure for which the problem needs to be located, using a pre-built navigator, may include: establishing a global search state for the current round based on the pre-defined software problem description and the code repository structure for which the problem needs to be located; the global search state includes a candidate code set, a set of visited files, and a queue of files to be visited; and determining the entry file for the current round from the queue of files to be visited and dispatching it to the inspector.
[0072] In the current round t, the navigator maintains the corresponding global search state Z. t :
[0073] ;
[0074] Among them, S t This represents a set of candidate code, used to store functions or class methods related to the software problem description returned by the inspector; E t This represents the set of accessed files, used to record code files that have already been accessed, avoiding duplicate scheduling; Q t This represents the queue of files to be accessed, used to hold candidate files that may require further analysis later. The queue of files to be accessed is Q. tThe ranking methods can include, but are not limited to: keyword matching, embedding similarity, call graph distance, historical feedback confidence, learned ranking models, or multi-factor weighted strategies. In each round of inference, the navigator will rank the data according to the current global search state Z. t Decide on the next round of search actions.
[0075] The interaction between the navigator and the inspector will be explained next. The navigator and inspector directly employ a multi-round dispatch and feedback mechanism. When the navigator calls the dispatch tool in round t, it will retrieve the files from the pending access queue Q. t Select entry file set U t , among which, U t It is Q t A subset of can be denoted as: |·| represents the number of elements in the set. If the maximum allowed parallelism of the checkers is P, then at most P checkers are allowed at any given time. Understandably, this parallelism P can be dynamically adjusted based on machine resources, repository size, problem complexity, or historical runtime, and is not necessarily limited to a fixed value. When U t If the number of entry files in the system is greater than P, then U can be used. t Divided into Small batches:
[0076] ;
[0077] Different small batches do not overlap, and .set up Indicates that the first step has been completed. The temporary global state after a small batch, and let .
[0078] Within each mini-batch, each inspector analyzes its own entry file within an independent context, returning candidate code, supporting explanations (related notes), and local search trajectory. The navigator updates its global search status based on the inspector feedback and determines whether to initiate the next round of entry file selection and inspector dispatch, or to terminate the search and obtain the final location result.
[0079] Therefore, this embodiment decouples file-level breadth-of-field search from function-level depth-of-field analysis through collaborative localization by the navigator and inspectors. The navigator focuses on global search, state maintenance, and scheduling decisions, while the inspectors can focus on local code logic analysis and call chain tracing. Furthermore, the navigator and each inspector have their own independent context, which avoids the continuous accumulation of all inference paths within a single context, thereby improving the accuracy of localization and the efficiency of context utilization in complex code repositories.
[0080] In one embodiment, determining the entry file for the next round includes: updating the candidate code in the local search results of the current round to the candidate code set, updating the entry file of the current round to the visited file set, removing the entry file of the current round from the file queue to be visited; and determining the entry file for the next round based on the updated global search status.
[0081] Based on the navigator's global search state and the interaction between the navigator and the inspector, whenever the inspector returns a local search result to the navigator, the navigator updates the candidate code set with the candidate code returned by the inspector, adds the dispatched entry file and files visited in the inspector's trajectory to the current visited file set, and removes the entry file for the current round from the queue of files to be visited. Then, based on the updated global search state, the navigator determines the entry file for the next round from the queue of files to be visited.
[0082] Once all small batches have been processed, the current dispatch cycle ends. The navigator uses the last temporary state as the global state for the next cycle. If the evidence for code location is still insufficient at this point, the navigator will continue searching or re-dispatch the checker. If the evidence is sufficient, the final location result can be output. This dynamic update mechanism for the global search state allows subsequent small-batch local searches to skip previously visited code files, thereby reducing repeated searches of code files.
[0083] In one embodiment, when there are multiple entry files in the current round, the entry files are dispatched to the inspectors. Specifically, this may include: dispatching different entry files in the current round to different inspectors, so that each inspector performs a local search for the current round with an independent context for the dispatched entry files; there is a one-to-one correspondence between the inspectors and the entry files.
[0084] The specific process of dispatching multiple entry files to different inspectors can be referred to the example of the interaction process between the navigator and the inspector in the above embodiment, and will not be repeated here. This embodiment can retain the efficiency advantages of parallel analysis by multiple inspectors, improve the overall positioning efficiency, and ensure that the local depth search between different inspectors is independent of each other, thereby avoiding the continuous accumulation of inference trajectories in a single context and improving the positioning accuracy and context utilization efficiency in complex code repositories.
[0085] In one embodiment, the dispatched inspector, starting from the entry file, identifies the target code entities corresponding to the software problem description and identifies candidate code within the entry file. Specifically, this may include:
[0086] The dispatched inspector, starting from the entry file, calls the code reading tool to read the code entity distribution information from the entry file; the target code entity corresponding to the software problem description is determined from the code entity distribution information; the code implementation analysis is performed on the target code entity, and the candidate code corresponding to the software problem description is determined based on the code implementation analysis results.
[0087] The code reading tools invoked by the inspector can be referenced in Table 2 above. Specifically, they can be obtained by calling the `get_methods_of_class` tool, the `get_file_functions` tool, and the `get_file_classes` tool to read the function, class, and class method structure of the dispatched entry file, thus obtaining the code entity distribution of the entry file. The `get_code_of_function` tool and the `get_code_of_class_method` tool read the specific implementations of functions or class methods in the target code entity that are relevant to the software problem description, thereby determining whether they might lead to the same abnormal behavior or functional defects as described in the software problem description. By correctly invoking different tools, the inspector can improve the efficiency and accuracy of code file reading.
[0088] Furthermore, in one embodiment, when a target code entity has a cross-file call relationship, locating the code region associated with the target code entity along the cross-file call relationship and identifying candidate code may include:
[0089] Along the cross-file call relationship, using the caller query tool and the callee query tool, candidate code corresponding to the software problem description is identified from the cross-file code region associated with the target code entity.
[0090] For details, please refer to Table 2 above. The inspector can trace relevant code regions across files by calling the caller query tool (get_callers) and the callee query tool (get_callees), following the cross-file call chain, class method dependency relationships, or configuration resolution process. In this embodiment, by reading code entities and tracing the caller-callee relationship through the inspector, the root cause of the problem can be located along the cross-file call chain.
[0091] Additionally, in one embodiment, before determining the entry file for the current round to be dispatched to the inspector based on a pre-defined software problem description and the code repository structure to be located, using a pre-built navigator, the above-mentioned repository-level software problem localization method further includes training the inspector and the navigator; the training process of the inspector and the navigator includes:
[0092] The process involves constructing a first demonstration trajectory and a second demonstration trajectory. The first demonstration trajectory indicates the determination of the entry file and the scheduling of the checker based on the software problem description. The second demonstration trajectory indicates the reading of the entry file, identification of candidate code, and tracing of call relationships. Based on the first demonstration trajectory, the constructed first agent is trained to obtain an initial navigator. Based on the second demonstration trajectory, the constructed second agent is trained to obtain an initial checker. Based on a preset local localization reward function and a set of local real localization samples, the initial checker is trained to obtain a trained checker. Using the trained checker as a fixed feedback module for the initial navigator, the initial navigator is trained based on a preset global localization reward function to obtain a trained navigator.
[0093] In this embodiment, the agents are first warmed up by supervised fine-tuning using a demonstration trajectory to obtain a pre-trained navigator and inspector. Then, the inspector is trained first, followed by the navigator, and local and global rewards are used to optimize the inspector and navigator respectively. This improves the navigator and inspector's capabilities in tool invocation, code search, and multi-agent collaboration.
[0094] The training process consists of two phases. The first phase is supervised fine-tuning warm-up, which involves learning standardized tool calls, output formats, and basic search behaviors. The second phase is component-based reinforcement learning, used to optimize the local function-level analysis capabilities of the inspector and its global coordination capabilities with the navigator. In the supervised fine-tuning warm-up phase, demonstration trajectories are constructed for both the navigator and the inspector. A first demonstration trajectory is constructed for the navigator, which can be generated using a powerful large language model or manually labeled. For the navigator, this first demonstration trajectory demonstrates how to locate and construct the queue of files to be accessed based on software file descriptions, how to maintain the global search state, and how to invoke tools to select entry files and schedule inspectors. A second demonstration trajectory is constructed for the inspector, which demonstrates how to invoke tools to read the entry file structure, filter candidate code, analyze code implementation, trace call relationships, and return the location of candidate code.
[0095] After obtaining the first and second demonstration trajectories, these sample trajectories can be filtered to remove those with incorrect tool call formats, tool execution failures, non-standard output formats, or incorrect final positioning results. Then, the filtered and retained sample trajectories are used to perform supervised fine-tuning training on the navigator and checker, enabling them to master basic ReAct-style search behavior, tool call specifications, and result output formats, thus obtaining the initial navigator and initial checker.
[0096] After supervised fine-tuning and warm-up, component-based reinforcement learning is further employed to optimize the navigator and checker. In this stage, the navigator and checker are not treated as single agents for one-time training; instead, different reward signals are set based on the different functions of the navigator and checker.
[0097] The process begins with training an inspector. The inspector's function is to perform in-depth analysis at the local function level around a given entry file. Therefore, the training objective is to improve the inspector's ability to identify functions and class methods relevant to the software problem description within the local access scope. During training, a local true location set is constructed based on the range of code files actually accessed in the inspector's search trajectory. The candidate code set returned by the inspector is then compared with this local true location set to obtain a local location reward. The initial inspector is then trained based on the local location reward function to obtain the trained inspector.
[0098] Next, the navigator is trained. The trained inspector is used as a fixed feedback module of the navigator, and the global localization reward function is used to train the navigator's global coordination ability. Based on the software problem description, code repository structure, and inspector feedback, the navigator selects a file search tool, maintains a queue of files to be accessed, schedules the inspector, and integrates multiple rounds of local search results, ultimately outputting the global code localization result.
[0099] The reinforcement learning algorithm can employ Proximal Policy Optimization (PPO), Decoupled Prune and Dynamic Sampling Policy Optimization (DAPO), Group Relative Policy Optimization (GRPO), or other policy optimization algorithms. The localization quality in the reward function can utilize the F1 function, or alternatively, Top-k accuracy (Acc@k), Normalized Decay Cumulative Gain (nDCG@k), or other recall metrics. This embodiment does not impose specific limitations on these metrics.
[0100] This embodiment adopts a two-stage agent training process. First, supervised fine-tuning warms up the model so that it can master the tool calling format and basic exploration behavior. Then, component-based reinforcement learning is used to improve the local analysis capability of the inspector and the global scheduling capability of the navigator, which can improve the performance of the navigator and the inspector respectively.
[0101] In one embodiment, the aforementioned local positioning reward function is a function that measures the quality of local positioning and the success rate of tool invocation. Specifically, for the inspector, the local positioning reward function consists of a reward for the accuracy of local positioning and a reward for tool execution. Let... Indicates the inspector trajectory The set of local real locations corresponding to the inspector is defined as the set of code files accessed in the process.
[0102] ;
[0103] in, Indicates a code location; Represents a code file; This represents a function or class method within the code file. Assume the set of candidate code locations within the inspector's scope is... The local localization reward function of the inspector can be expressed as:
[0104] ;
[0105] Represent two sets , The degree of matching between sets. For the tool to perform reward weighting, it is possible to take . This indicates the success rate of navigator tool call execution, with a value range of [value missing]. If the checker's tool call violates format requirements, references a non-existent file or symbol, or the execution process terminates abnormally, the corresponding tool call is considered unsuccessful. When the value is empty, it indicates that there are no real relevant code locations within the inspector's access range that can be used for supervision. This trajectory cannot provide effective local localization training signals, so it needs to be excluded during retraining.
[0106] Therefore, based on the design of this local localization reward function, the inspector can be optimized into an agent that is better at function-level local search, code logic understanding, and call chain tracing, and adheres to the tool calling protocol, reducing the probability of invalid calls and abnormal termination.
[0107] In another embodiment, the global positioning reward function is a function that measures the quality of global positioning and the success rate of tool invocation. Specifically, for a navigator, the global positioning reward function may consist of a global positioning accuracy reward and a tool execution reward. Assume that the final set of predicted code locations output by the navigator is... The collection of code locations related to real-world problems is as follows The navigator trajectory is Then the global positioning reward function of the navigator can be expressed as:
[0108] ;
[0109] in, This indicates the set-level matching degree between the predicted location set and the actual location set; This indicates the success rate of navigator tool call execution, with a value range of [value missing]. ; For the tool to perform reward weighting, it is possible to take If a navigator's tool call violates format requirements, references a non-existent file or symbol, or terminates abnormally, the corresponding tool call is considered unsuccessful. The set-level F1 value can be calculated using the following formula:
[0110] ;
[0111] Where A and B represent two sets of code locations, The range of values is .
[0112] This embodiment can optimize the navigator into an agent that is better at global file search, state maintenance, checker scheduling and multi-round evidence integration, and adheres to the tool invocation protocol, reducing the probability of invalid calls and abnormal termination.
[0113] The following example, a code issue localization task in a Django project, will illustrate the practical application of the repository-level software issue localization method. In this example, the software issue is described as: "When media objects of three or more Django form components are merged, the system incorrectly triggers a built-in runtime warning (MediaOrderConflictWarning)." The root cause of this software issue is not directly located at the position corresponding to the warning text, but rather originates from an intermediate merge step in the media object merging process. This intermediate merge step introduces unnecessary order constraints, leading to a false alarm of the aforementioned warning. For this software issue description, the software issue description and the Django code repository structure are given first. Then, the navigator initializes the global search state, including initializing the candidate code set, the visited file set, and the queue of files to be visited. Subsequently, based on keywords in the software issue description, the navigator invokes a file content search tool. For example, using keywords related to media order conflict such as "media order conflict" and "MediaOrderConflictWarning," the navigator searches the code repository to identify code files related to the software issue description as candidate files. Simultaneously, the navigator can also invoke a filename search tool to find code files related to form components. After the file-level breadth-of-field search described above, the navigator identified two candidate files: one at the path "django / forms / widgets.py" and the other at the path "django / contrib / gis / forms / widgets.py". The navigator added these two code files to the queue of files to be accessed.
[0114] Next, the navigator uses the two files mentioned above as two entry files and dispatches them to two inspectors. Each inspector performs function-level deep analysis in an independent context, without inheriting the navigator's previous complete search trajectory.
[0115] The first inspector was assigned to "django / forms / widgets.py". This inspector first read the class and function structure of this file and located the core class "Media" related to media object handling. Then, the inspector further analyzed the "__add__" and "merge" methods in the "Media" class. By reading the specific code implementation of these two methods, the inspector found that the "__add__" method mainly performs list concatenation operations and does not itself perform media order conflict detection; therefore, the root cause of the problem is more likely in the "merge" method. Subsequently, the inspector continued to trace upwards along the call relationships, analyzing the technical function "media_property" and the class factory "MediaDefiningClass.__new__", establishing a complete call chain from component media property generation to media object merging, and filling in the suspicious function locations.
[0116] The second inspector was assigned to "django / contrib / gis / forms / widgets.py". Upon analysis, this inspector discovered that the Geographic Data Processing (GIS) form component class within this file did not contain the core media merging logic. Therefore, the inspector traced the code dependencies across files to "django / forms / widgets.py" and independently identified the merging method "Media.merge" as a key suspicious method. Further, the inspector used a caller query tool to analyze the direct call relationships of the "Media.merge" method, confirming that the "Media._js" and "Media._css" methods were direct callers of the "Media.merge" method. This call chain analysis enabled the system not only to locate the core merging method "Media.merge" but also to discover the "Media._js" and "Media._css" methods, which are directly related to the actual media resource merging process.
[0117] After the two inspectors complete their local in-depth analysis, the navigator collects the candidate code, analysis notes (supporting explanations), and local search trajectories returned by the two inspectors, and updates the global search state. Specifically, the navigator adds the positions of candidate code such as the "Media.merge", "Media.__add__", "Media._js", "Media._css", and "media_property" methods to the candidate code set, adds the two entry files and files accessed by the inspectors across files to the visited file set, and removes the analyzed code files from the pending file queue.
[0118] Finally, the navigator determines based on the global state that the current evidence covers the key code locations of the problem, thus terminating the search and outputting the final location result. In this example, the top five candidate code locations that can be output include: the "Media.merge" method, the "Media.__add__" method, the "Media._js" method, the "Media._css" method, and the "media_property" method. Among them, the "Media.merge" method is the core merging method that introduces the incorrect order constraint, and the "Media._js" and "Media._css" methods are the call methods directly related to media resource merging, both of which were successfully covered.
[0119] In the example above, after completing one round of relevant file searches, the navigator dispatches the entry file to the inspector. After the inspector returns its results, the navigator summarizes the evidence and provides the final result. It should be noted that although this example can be completed in one round, the repository-level software problem localization method described in this embodiment can support multiple iterations.
[0120] Figure 2 This is a diagram illustrating the combined architecture of the navigator and inspector in this embodiment. Figure 2 As shown, where Figure 2 The left side shows the implementation of the inference architecture based on navigators and inspectors; Figure 2The right side illustrates the training process of the agent. Specifically, given a software problem description and code repository structure, the navigator, based on the ReAct paradigm, performs thinking, action, and observation in a loop, invoking various tools such as file reading, dispatching, and exiting tools (as shown in Table 1) to achieve global coordination. The navigator's global search state includes a set of files to be accessed, a queue of accessed files, and a set of candidate code. In each round of code localization, the navigator determines the entry file and dispatches it to the inspector for local in-depth analysis (e.g., dispatching entry file A to the inspector), and after multiple rounds of searching and dispatching, obtains the final localization result. The inspector, also based on the ReAct paradigm, performs thinking, action, and observation around the assigned entry file. By invoking various tools as shown in Table 2, candidate code is identified for the code entities in the entry file, and cross-file tracing is performed (for example, candidate code is identified for functions a1, a2, and a3 in file A, and based on dependencies, candidate code is identified for functions b1, b2, and b3 in file B, and based on dependencies, candidate code is identified for functions c1, c2, and c3 in file C). The identified candidate code and local search trajectory are returned to the navigator.
[0121] During training, for the inspector, an initial inspector is first obtained through supervised fine-tuning. Then, component-based reinforcement learning is used to improve the local analysis capabilities of the initial inspector. The optimized inspector can perform local deep search around a given entry file, identifying candidate code. The inspector is trained based on the local localization reward function. For the navigator, an initial navigator is first obtained through supervised fine-tuning. Then, component-based reinforcement learning is used to improve the navigator's global scheduling capabilities. The optimized navigator can maintain the global search state, select entry files to dispatch to the inspector, receive and summarize the local search results from the inspector, and obtain the final localization result. The navigator can be trained based on the global localization reward function. The local localization reward function consists of local localization quality evaluation and tool invocation success rate evaluation; the global localization reward function consists of global localization quality evaluation and tool invocation success rate evaluation.
[0122] This embodiment also provides a warehouse-level software problem localization device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0123] Figure 3 This is a structural block diagram of the warehouse-level software problem localization device 30 in this embodiment, as shown below. Figure 3 As shown, the warehouse-level software problem localization device 30 includes: a dispatch module 31, a local search module 32, and a judgment module 33; wherein:
[0124] The dispatch module 31 is used to determine the entry file of the current round and dispatch it to the inspector based on the pre-given software problem description and the code repository structure to be located, using a pre-built navigator. The navigator is a trained agent for code file location and inspector scheduling. The inspector is a trained agent for performing local deep code analysis on the code file. The local search module 32 is used to determine the target code entity corresponding to the software problem description and identify candidate code in the entry file, starting from the dispatched inspector. When there is a cross-file call relationship between the target code entity and the target code entity, the module locates the code region associated with the target code entity along the cross-file call relationship and identifies candidate code until the local search of the current round is determined to be completed. The module then returns the local search results of the current round containing candidate code to the navigator. The judgment module 33 is used to determine whether the software problem location is completed based on the local search results of the current round, using the navigator. If not, the module determines the entry file of the next round and dispatches it to the inspector for local search until the local search results of the corresponding round determine that the software problem location is completed.
[0125] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0126] The aforementioned repository-level software problem localization device 30 can improve the recall and accuracy of repository-level software problem localization by combining the collaboration of the navigator and the inspector, taking into account both the breadth of file-level search and the depth of function-level analysis.
[0127] In one embodiment, the dispatch module 31 is specifically used to establish the global search state of the current round based on the software problem description and code repository structure through the navigator; the global search state includes a candidate code set, a set of visited files, and a queue of files to be visited; and to determine the entry file of the current round from the queue of files to be visited and dispatch it to the inspector.
[0128] In one embodiment, the determination module 33 is specifically used to update the candidate code in the local search results of the current round to the candidate code set, update the entry file of the current round to the visited file set, remove the entry file of the current round from the file queue to be visited, and determine the entry file of the next round based on the updated global search status.
[0129] In one embodiment, when there are multiple entry files in the current round, the dispatch module 31 is specifically used to dispatch the different entry files in the current round to different checkers, so that each checker can perform a local search for the current round with an independent context for the dispatched entry files; the checker corresponds one-to-one with the entry file.
[0130] In one embodiment, the local search module 32 is specifically used to, through the dispatched inspector, starting from the entry file, call the code reading tool to read the code entity distribution information from the entry file; determine the target code entity corresponding to the software problem description from the code entity distribution information; perform code implementation analysis on the target code entity; and determine the candidate code corresponding to the software problem description based on the code implementation analysis results.
[0131] In one embodiment, the local search module 32 is specifically used to identify candidate code corresponding to the software problem description from the cross-file code region associated with the target code entity, by using the caller query tool and the callee query tool, along the cross-file call relationship.
[0132] In one embodiment, the warehouse-level software problem localization device 30 further includes a training module for constructing a first demonstration trajectory and a second demonstration trajectory. The first demonstration trajectory indicates the determination of the entry file and the scheduling of the checker based on the software problem description. The second demonstration trajectory indicates the reading of the entry file, identification of candidate code, and tracking of call relationships. Based on the first demonstration trajectory, a first intelligent agent is trained to obtain an initial navigator. Based on the second demonstration trajectory, a second intelligent agent is trained to obtain an initial checker. Based on a preset local localization reward function and a set of local real localization samples, the initial checker is trained to obtain a trained checker. Using the trained checker as a fixed feedback module for the initial navigator, the initial navigator is trained based on a preset global localization reward function to obtain a trained navigator.
[0133] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.
[0134] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0135] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0136] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.
[0137] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0138] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A warehouse-level software problem localization method, characterized in that, include: Using a pre-built navigator, based on a pre-given software problem description and the structure of the code repository where the problem is to be located, the entry file for the current round is determined and dispatched to the inspector; the navigator is a trained intelligent agent used for code file location and inspector scheduling. The inspector is a trained agent used to perform local deep code analysis on code files; Using the dispatched inspector, starting from the entry file, the target code entity corresponding to the software problem description is determined and candidate code is identified in the entry file; When the target code entity has a cross-file call relationship, the code region associated with the target code entity is located along the cross-file call relationship and the candidate code is identified until the local search of the current round is completed, and the local search results of the current round containing the candidate code are returned to the navigator. The navigator determines whether the software problem localization is complete based on the local search results of the current round. If not, it determines the entry file for the next round and dispatches the entry file to the inspector for local search until the local search results of the corresponding round confirm that the software problem localization is complete.
2. The warehouse-level software problem localization method according to claim 1, characterized in that, Using a pre-built navigator, based on a pre-given software problem description and the code repository structure for problem localization, the entry file for the current round is determined and dispatched to the inspector, including: Using a pre-built navigator, a global search state for the current round is established based on a pre-given software problem description and the code repository structure to be located; the global search state includes a candidate code set, a set of visited files, and a queue of files to be visited. The entry file for the current round is determined from the queue of files to be accessed and dispatched to the inspector.
3. The warehouse-level software problem localization method according to claim 2, characterized in that, Determine the entry file for the next round, including: Update the candidate code in the local search results of the current round to the candidate code set, update the entry file of the current round to the visited file set, and remove the entry file of the current round from the file queue to be visited; Based on the updated global search status, determine the entry file for the next round.
4. The warehouse-level software problem localization method according to claim 1, characterized in that, When there are multiple entry files in the current round, the entry files are dispatched to the inspector, including: The different entry files in the current round are dispatched to different inspectors, so that each inspector performs a local search for the current round with an independent context for the dispatched entry file; the inspector corresponds one-to-one with the entry file.
5. The warehouse-level software problem localization method according to claim 1, characterized in that, Using the dispatched inspector, starting from the entry file, the system identifies the target code entity corresponding to the software problem description and identifies candidate code within the entry file, including: The dispatched inspector, starting from the entry file, calls a code reading tool to read code entity distribution information from the entry file; Determine the target code entity corresponding to the software problem description from the code entity distribution information; The target code entity is subjected to code implementation analysis, and candidate code corresponding to the software problem description is determined based on the results of the code implementation analysis.
6. The warehouse-level software problem localization method according to claim 1, characterized in that, When the target code entity has a cross-file call relationship, locating the code region associated with the target code entity along the cross-file call relationship and identifying the candidate code includes: Along the cross-file call relationship, using the caller query tool and the callee query tool, candidate code corresponding to the software problem description is identified from the cross-file code region associated with the target code entity.
7. The warehouse-level software problem localization method according to any one of claims 1 to 6, characterized in that, Before determining the entry file for the current round to be dispatched to the inspector based on a pre-given software problem description and the code repository structure to be located, the method further includes training the inspector and the navigator. The training process for the inspector and the navigator includes: Construct a first demonstration trajectory and a second demonstration trajectory; the first demonstration trajectory indicates the determination of the entry file and the scheduling of the checker based on the software problem description; the second demonstration trajectory indicates the reading of the entry file, identification of candidate code, and tracing of call relationships. Based on the first demonstration trajectory, the constructed first intelligent agent is trained to obtain an initial navigator; Based on the second demonstration trajectory, the constructed second agent is trained to obtain an initial checker; Based on a preset local localization reward function and a set of local real localization samples, the initial checker is trained to obtain a trained checker. Using the trained checker as a fixed feedback module for the initial navigator, the initial navigator is trained based on a preset global positioning reward function to obtain the trained navigator.
8. The warehouse-level software problem localization method according to claim 7, characterized in that, The local positioning reward function is a function that measures the quality of local positioning and the success rate of tool invocation.
9. The warehouse-level software problem localization method according to claim 7, characterized in that, The global positioning reward function is a function that measures the quality of global positioning and the success rate of tool invocation.
10. A warehouse-level software problem localization device, characterized in that, include: The module consists of a dispatch module, a local search module, and a judgment module; among which: The dispatch module is used to determine the entry file of the current round and dispatch it to the inspector based on a pre-given software problem description and the code repository structure to be located, using a pre-built navigator; the navigator is a trained agent for code file location and inspector scheduling; the inspector is a trained agent for performing local deep code analysis on the code file. The local search module is used to determine the target code entity corresponding to the software problem description and identify candidate code in the entry file, starting from the entry file, using the dispatched inspector; When the target code entity has a cross-file call relationship, the code region associated with the target code entity is located along the cross-file call relationship and the candidate code is identified until the local search of the current round is completed, and the local search results of the current round containing the candidate code are returned to the navigator. The judgment module is used to determine, through the navigator, whether the software problem localization has been completed based on the local search results of the current round; if not, it determines the entry file for the next round and dispatches the entry file for the next round to the inspector for local search, until the software problem localization is determined to be completed based on the local search results of the corresponding round.
