Open source tool error code positioning and reason analysis method and system and electronic equipment
By integrating the receiving, verification, importing, analysis, and display modules, the problems of inefficient error message processing in open-source tools, insufficient accuracy in code library matching, and reliance on manual analysis for cause analysis have been solved. This has enabled efficient and accurate code location and cause analysis, reduced the cost of understanding, and accelerated problem fixing.
Patent Information
- Application Number
- CN202511499903.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, open-source tools suffer from inefficient and chaotic error message processing, insufficient accuracy in code library matching, insufficient depth in root cause analysis relying on manual intervention, fragmented troubleshooting processes with low automation, and poor intuitiveness and usability in displaying results.
By receiving and verifying error messages, importing and preprocessing the code library, and using semantic analysis and multi-algorithm matching combined with system environment information, a structured cause library is constructed. This library integrates modules for information reception, code processing, location, analysis, and display, and provides visualized results.
It enables standardized processing of error messages, accurate code location, rapid cause analysis, and automated troubleshooting processes, reducing understanding costs and shortening troubleshooting time.
Smart Images

Figure CN121501541A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of development tools, and in particular to methods for locating and analyzing error codes in open source tools, systems for locating and analyzing error codes in open source tools, electronic devices, storage media, and development platforms. Background Technology
[0002] In software development, open-source tools are widely used due to their open-source nature, community support, and rich functionality, covering multiple areas such as development frameworks, database tools, and automated deployment components. However, open-source tools have complex code logic, frequent version iterations, and significant differences in system environments (such as operating system versions, dependency library versions, and hardware configurations) under different application scenarios, making it easy for various error problems to occur during development.
[0003] Currently, troubleshooting errors in open-source tools mainly relies on manual methods, including:
[0004] Developers extract key information by viewing error logs, but the log content often contains a lot of redundant data, and the error messages are mostly unstructured text (such as stack trace fragments and error codes), requiring manual filtering of valid information, which is inefficient.
[0005] Using debugging tools to trace the code execution flow is cumbersome, especially for large open source projects with millions of lines of code. Manually setting breakpoints and analyzing variable states is tedious and requires developers to have a high level of familiarity with the source code.
[0006] Searching for similar cases in technical communities (such as StackOverflow and GitHubIssues) is difficult because the search results are not very relevant due to the specificity of the error scenarios (such as differences in environment configuration).
[0007] Relying on the experience and judgment of senior developers, but novice developers find it difficult to quickly establish the connection between error characteristics and code logic, resulting in an excessively long problem-solving cycle.
[0008] The above methods have obvious drawbacks: on the one hand, there is a lack of automated means for parsing unstructured error messages, making it impossible to quickly extract core information such as error types and key features; on the other hand, code location relies solely on simple matching without combining the system environment and code context logic, resulting in limited accuracy; in addition, the lack of systematic error knowledge makes it difficult to associate error characteristics with historical solutions, leading to repetitive and inefficient troubleshooting processes.
[0009] Therefore, there is an urgent need for a technical solution that can automate the parsing of error messages from open-source tools, accurately locate code, and intelligently analyze the causes, in order to solve the problems of reliance on manual labor, low efficiency, and insufficient accuracy in existing technologies. Summary of the Invention
[0010] The purpose of this invention is to provide a method, system, electronic device, storage medium, and development platform for locating and analyzing error codes in open-source tools, and to solve at least one of the following technical problems:
[0011] 1. Inefficient and chaotic error message processing: In existing technologies, error messages are mostly unstructured text (e.g., containing redundant content and inconsistent formatting), system environment information (e.g., dependent library versions, operating system versions) is not fully collected, and the input method is limited (e.g., only manual entry is supported), resulting in a lack of standardized and complete basic data for subsequent analysis and an unclear starting point for positioning.
[0012] 2. Insufficient accuracy in code repository processing and matching: The source of the code repository is scattered (e.g., a mixture of local and remote hosting platforms), the format is inconsistent (e.g., differences in indentation and encoding), and it contains redundant information (e.g., comments). In addition, the matching only relies on simple string equality comparison without combining semantic features and system environment, resulting in low matching efficiency and high false positive rate for large code repositories, and inability to accurately locate the error code.
[0013] 3. Error cause analysis relies on manual intervention and lacks depth: The cause analysis lacks systematic knowledge support (e.g., no structured error knowledge base), only focuses on the surface features of the code (e.g., error codes), and does not delve into the contextual logic of the code (e.g., variable passing, function call relationships). It relies on the developer's experience and judgment, resulting in one-sided analysis, a lot of repetitive work, and an inability to quickly locate the deep root cause.
[0014] 4. Fragmented troubleshooting process and low level of automation: Obtaining error information, code retrieval, cause analysis, and result viewing require manual switching between multiple tools (such as log editors, IDEs, and community platforms). There is no integrated closed-loop process, and there are many manual intervention steps, making it difficult to adapt to the efficient troubleshooting needs of large open source projects.
[0015] 5. Problems with the intuitiveness and usability of result display: Error results are presented in plain text (e.g., log fragments, file paths), and complex causes (e.g., chain errors in multiple function calls, version compatibility issues) lack visual explanations. Developers need to manually integrate information and verify modification ideas, resulting in high understanding costs and low repair efficiency.
[0016] This invention provides the following solution:
[0017] According to a first aspect of the present invention, a method for locating and analyzing error codes in open-source tools is provided, comprising:
[0018] Step S1, Error Message Acquisition Step: Receive error messages for open-source tools;
[0019] The error message includes the error message text and the system environment information at the time of the error.
[0020] Error messages are validated and formatted to ensure their integrity and standardization.
[0021] Step S2, code library import step: According to the user's specification, import the code library related to the error-reporting open source tool and preprocess the code library;
[0022] Step S3, Error Code Location Step: Perform semantic analysis on the formatted error message to extract key error features;
[0023] Key error characteristics are matched with the preprocessed codebase to filter suspicious code snippets;
[0024] Based on system environment information, analyze the execution logic of suspicious code segments to determine the exact location of the error code;
[0025] The error code includes the file path, function name, and line number;
[0026] Step S4, Error Cause Analysis Steps: Extract the code segment corresponding to the error code location and its context, and analyze the logical relationship of the code segment;
[0027] The code snippet's characteristics are compared with a pre-built cause database to determine the specific cause of the error, and an analysis report is generated that includes the cause of the error, the location of the problematic code, and supporting evidence.
[0028] Step S5, Result Display Step: Display the location of the error code and analysis report through the user interface for developers to view and use.
[0029] Furthermore, including:
[0030] In step S1, the system environment information includes the operating system version, software dependency library version, hardware configuration, and error reporting time.
[0031] The verification and formatting process includes removing invalid information and standardizing the information format.
[0032] Furthermore, including:
[0033] In step S2, the source of the imported code repository includes the local file system, GitHub code hosting platform, or GitLab code hosting platform;
[0034] Preprocessing includes standardizing code indentation and encoding format, removing code comments, and using a parser to segment the code into analyzable basic units.
[0035] Furthermore, including:
[0036] In step S3, natural language processing technology is used to perform semantic analysis and extract key error features, including error type and key error message words;
[0037] Error types include null pointer exception, array out of bounds, or syntax error;
[0038] Key error message terms include error codes or specific function names.
[0039] Furthermore, including:
[0040] In step S3, code matching employs a string matching algorithm based on edit distance combined with a semantic similarity calculation method;
[0041] When analyzing system environment information, suspicious code segments are filtered by parsing the call stack information of the code to determine the location of the final error code.
[0042] Furthermore, including:
[0043] In step S4, when analyzing the logical relationships of code snippets, a code logic diagram is constructed, and the definition and usage of variables and function call relationships are analyzed.
[0044] The cause library is constructed in the following way:
[0045] Error data was collected from official documentation of open-source tools, community forums, code repository issue reports, and StackOverflow technical Q&A website. After screening, error types, error causes, involved code snippets, and solutions were manually labeled. Natural language processing technology and knowledge graph construction methods were used to extract structured knowledge to form triples. The data was then categorized and organized according to open-source tool type and error domain, and updated regularly.
[0046] The triple includes the error type, cause, and solution.
[0047] Furthermore, including:
[0048] In step S5, when displaying the location of the error code, the file containing the error code is presented in the form of a code editor, highlighting the line of error code and marking the line number;
[0049] When presenting analysis reports, use charts or flowcharts to illustrate complex error causes and provide corresponding solution suggestions.
[0050] Furthermore, including:
[0051] In step S3, the code matching uses the KMP string matching algorithm, which constructs a partial matching table by preprocessing the pattern string, optimizes the movement distance of the pattern string during the matching process, and improves matching efficiency.
[0052] According to a second aspect of the present invention, an open-source tool error code localization and cause analysis system is provided, which implements a method for locating and analyzing the error code of open-source tools, comprising:
[0053] Error message receiving module: Used to receive error messages from open source tools and perform error message verification and formatting.
[0054] Code repository management module: Used to import code repositories related to error reporting open source tools and perform preprocessing operations on the code repositories;
[0055] Error code location module: used to perform semantic analysis on the formatted error information, extract key error features, match the key error features with the preprocessed code library, and determine the location of the error code based on system environment information;
[0056] Error Cause Analysis Module: Used to extract the context of error codes, analyze the logical relationships of the code, compare code features with the cause database to determine the cause of the error, and generate an analysis report;
[0057] Results display module: Used to display the location of error codes and analysis reports through the user interface.
[0058] Furthermore, the error message receiving module allows users to manually enter error messages through the input interface, or import log files containing error messages, and automatically parse the error message text and system environment information in the log files.
[0059] Furthermore, the code repository management module includes a code repository storage unit for storing imported code repositories and preprocessed code data, and supports classifying and managing the stored data by open-source tool name or code repository version.
[0060] Furthermore, the error code localization module includes a semantic analysis unit, a code matching unit, and an environment analysis unit;
[0061] The semantic analysis unit uses a natural language processing model to extract key error features;
[0062] The code matching unit integrates edit distance-based matching algorithms and the KMP algorithm, and automatically selects the matching algorithm based on the size of the codebase;
[0063] The environment analysis unit identifies the location of error codes by analyzing system environment information and code call stack.
[0064] Furthermore, the error cause analysis module includes a cause library storage unit and a logic analysis unit;
[0065] The cause library storage unit stores structured error knowledge triples, supporting fast retrieval by error type;
[0066] The logic analysis unit analyzes the code context logic by constructing an abstract syntax tree to determine the relationship between variables and functions.
[0067] Furthermore, the results display module includes a code display submodule and a report display submodule;
[0068] The code display submodule supports code highlighting, line number annotation, and code editing preview functions;
[0069] The report display submodule supports chart generation, which can visualize complex error causes in the form of flowcharts or cause-and-effect diagrams.
[0070] Furthermore, it also includes a cause database update module, which is used to periodically obtain new error data from specified open-source tool documentation, community forums and code repositories, and automatically complete data filtering and preliminary labeling, prompting manual review before updating to the cause database storage unit.
[0071] Furthermore, the code repository management module also supports a code repository version comparison function, which displays the differences between different versions of the code repository and helps analyze error issues caused by version updates.
[0072] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0073] The memory stores computer programs, and when the computer programs are executed by the processor, the processor performs steps for locating and analyzing error codes in open-source tools.
[0074] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of an open-source tool error code location and cause analysis method.
[0075] According to a fifth aspect of the present invention, a development platform is provided, comprising:
[0076] Electronic devices, including steps for locating and analyzing error codes in open-source tools;
[0077] The processor runs programs, and when a program is running, it executes data output from electronic devices, using open-source tools to locate and analyze error codes and causes.
[0078] Storage media are used to store programs. When a program is running, it executes steps for locating and analyzing error codes from open-source tools based on data output from an electronic device.
[0079] The above solution achieves the following beneficial technical effects:
[0080] This application ensures that error messages are standardized and complete by validating and formatting (e.g., removing invalid information and standardizing the format), clearly defines the core dimensions of the system environment (e.g., operating system, dependency library version, etc.), supports manual input and automatic parsing of log files, provides a reliable data foundation for subsequent analysis, adapts to the information input requirements of different development scenarios, and achieves standardized and improved adaptability of error message processing.
[0081] This application supports importing and preprocessing source code libraries from multiple sources (e.g., unifying formats, removing redundancy, and word segmentation), combined with natural language processing (e.g., semantic feature extraction), multi-algorithm matching (e.g., edit distance, KMP algorithm), and system environment-call stack correlation analysis. This enables three-dimensional positioning of error-reporting code based on semantics, code, and environment, accurately pinpointing file paths, function names, and line numbers. This significantly reduces the false positive rate, improves the matching efficiency of large code libraries, and achieves efficient and accurate code positioning.
[0082] This application constructs a structured cause library (e.g., containing "error type-cause-solution" triples) through multiple channels and updates it regularly. It combines code logic diagrams and abstract syntax trees to analyze variable / function relationships, enabling the reuse of historical knowledge and deep logic mining. This eliminates reliance on human experience, quickly outputs root cause reports supported by evidence, avoids redundant analysis, and achieves structured and in-depth cause analysis.
[0083] This application integrates a complete workflow module encompassing "information reception, code processing, location, analysis, and display" to form an automated closed loop, eliminating the need for manual tool switching. It reduces comprehension costs and accelerates developer problem fixing by providing code editor-style highlighting (e.g., line numbering and preview support), complex cause-effect diagrammatic explanations (e.g., flowcharts and cause-effect diagrams), and solution suggestions. This reduces investigation time from hours / days to minutes, automating the investigation process and making results display more intuitive. Attached Figure Description
[0084] Figure 1 This is a flowchart of an open-source tool error code location and cause analysis method provided by one or more embodiments of the present invention.
[0085] Figure 2 This is a structural diagram of an open-source tool error code location and cause analysis system provided by one or more embodiments of the present invention.
[0086] Figure 3 This is a schematic diagram of the error code location and cause analysis process of an open-source tool provided in a specific embodiment of the present invention.
[0087] Figure 4This is a block diagram of an electronic device structure, which is an open-source tool error code location and cause analysis method provided in one or more embodiments of the present invention. Detailed Implementation
[0088] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0089] Figure 1 This is a flowchart of an open-source tool error code location and cause analysis method provided by one or more embodiments of the present invention.
[0090] like Figure 1 The methods for locating and analyzing error codes in open-source tools shown include:
[0091] Step S1, Error Message Acquisition Step: Receive error messages for open-source tools;
[0092] The error message includes the error message text and the system environment information at the time of the error.
[0093] Error messages are validated and formatted to ensure their integrity and standardization.
[0094] Step S2, code library import step: According to the user's specification, import the code library related to the error-reporting open source tool and preprocess the code library;
[0095] Step S3, Error Code Location Step: Perform semantic analysis on the formatted error message to extract key error features;
[0096] Key error characteristics are matched with the preprocessed codebase to filter suspicious code snippets;
[0097] Based on system environment information, analyze the execution logic of suspicious code segments to determine the exact location of the error code;
[0098] The error code includes the file path, function name, and line number;
[0099] Step S4, Error Cause Analysis Steps: Extract the code segment corresponding to the error code location and its context, and analyze the logical relationship of the code segment;
[0100] The code snippet's characteristics are compared with a pre-built cause database to determine the specific cause of the error, and an analysis report is generated that includes the cause of the error, the location of the problematic code, and supporting evidence.
[0101] Step S5, Result Display Step: Display the location of the error code and analysis report through the user interface for developers to view and use.
[0102] Specifically, the disclosed technical features in this application include: an error information acquisition step (e.g., receiving error information containing error message text and system environment information, performing verification and formatting processing to ensure completeness and standardization); the technical problems solved include: in the prior art, error information is mostly unstructured text (e.g., containing redundant content and chaotic format), which cannot be directly used for analysis, resulting in an unclear starting point for positioning; the technical effects produced include: through verification and formatting processing, outputting standardized and complete error information, providing reliable input for subsequent analysis, and reducing interference from invalid information.
[0103] The disclosed technical features include: code library import steps (e.g., importing relevant code libraries according to user specifications and preprocessing the code libraries); the technical problems solved include: diverse code library sources (e.g., local / remote) and inconsistent formats (e.g., differences in indentation and encoding), resulting in many interferences and low efficiency when directly matching; the technical effects include: supporting importing and preprocessing code libraries from multiple sources, and improving the efficiency and accuracy of subsequent code matching after unifying the format.
[0104] The disclosed technical features include: error code location steps (e.g., semantic analysis to extract key error features, matching with a preprocessed code library to filter suspicious segments, and combining system environment information to analyze the execution logic and determine the error location containing file path, function name, and line number); the technical problems solved include: traditional location relies only on simple keyword matching without combining semantic features and system environment, resulting in low location accuracy (e.g., misjudging irrelevant code); the technical effects include: through three-dimensional location of "semantic analysis + code matching + environment association", the location of error code can be accurately locked (e.g., clearly identified to file, function, and line number), reducing location deviation.
[0105] The disclosed technical features include: error cause analysis steps (e.g., extracting error codes and context, analyzing logical relationships, comparing with a pre-built cause database to determine the specific cause, and generating an analysis report containing the cause, location, and evidence); the technical problems solved include: cause analysis relies on human experience and lacks systematic knowledge support, leading to biased and inefficient analysis (e.g., repeated analysis of similar errors); the technical effects include: structured comparison and logical analysis based on the cause database, making error cause judgment more objective and evidence-based, reducing reliance on human intervention, and improving the depth of analysis.
[0106] The publicly disclosed technical features include: result display steps (e.g., displaying error location and analysis report through a user interface); technical problems solved include: existing result displays are fragmented (e.g., log fragments, plain text), requiring developers to manually integrate information, resulting in high understanding costs; technical effects include: visual display of key information, facilitating developers to quickly obtain error location and cause, and shortening the troubleshooting cycle.
[0107] In this embodiment, step S1 includes the following: system environment information, including operating system version, software dependency library version, hardware configuration, and error reporting time.
[0108] The verification and formatting process includes removing invalid information and standardizing the information format.
[0109] Specifically, the disclosed technical features in this application include: system environment information including operating system version, software dependency library version, hardware configuration, and error reporting time; the technical problems solved include: incomplete collection of environment information in the prior art (e.g., omission of dependency library version), resulting in the inability to analyze the impact of environmental factors on error reporting (e.g., dependency conflict); the technical effects include: clarifying the core environment dimensions, ensuring that key influencing factors are not omitted, and providing a foundation for subsequent "environment-code" correlation analysis.
[0110] The disclosed technical features include: verification and formatting processing, including removing invalid information and unifying information format; solving technical problems, including: messy error message formats (e.g., inconsistent time formats, containing redundant fields), which cannot be directly used for automated analysis; producing technical effects, including: after unifying the format, environmental information can be directly used in logical analysis (e.g., judging "incompatible dependency versions causing function call failure"), improving the accuracy of analysis.
[0111] In this embodiment, step S2 includes importing the code repository from the local file system, the GitHub code hosting platform, or the GitLab code hosting platform.
[0112] Preprocessing includes standardizing code indentation and encoding format, removing code comments, and using a parser to segment the code into analyzable basic units.
[0113] Specifically, the disclosed technical features in this application include: the source of the code repository to be imported includes the local file system, GitHub, and GitLab; the technical problems to be solved include: existing tools only support importing from a single source of source code repository, which cannot adapt to the code management scenarios commonly used by developers (such as local storage / remote hosting); the technical effects include: supporting import from multiple sources, improving the applicability of the tool, and covering the code acquisition needs of different development environments.
[0114] The disclosed technical features include: preprocessing including unified code indentation and encoding format, removal of code comments, and syntactic word segmentation into basic units; the technical problems solved include: the code library contains a large amount of redundant information (such as comments) and inconsistent format (such as indentation / encoding differences), resulting in high computational load and low accuracy during matching; the technical effects include: after preprocessing, the code format is unified, redundant information is removed, the computational load of matching is reduced, semantic features are highlighted, and matching efficiency and accuracy are improved.
[0115] In this embodiment, step S3 includes: using natural language processing technology to perform semantic analysis and extract key error features, including error types and key error message words;
[0116] Error types include null pointer exception, array out of bounds, or syntax error;
[0117] Key error message terms include error codes or specific function names.
[0118] Specifically, the technical features disclosed in this application include: using natural language processing (NLP) technology for semantic analysis; solving technical problems including: traditional methods rely on manual parsing of error text, which cannot automatically identify error semantics (e.g., misjudging "NullPointerException" as a normal error); and producing technical effects including: achieving automated semantic parsing of error information, reducing manual intervention, and improving feature extraction efficiency.
[0119] The publicly disclosed technical features include: extracting key error features such as error types (e.g., null pointer exception, array out of bounds) and key error message words (e.g., error codes, specific function names); addressing technical problems such as: not clearly defining core error features, leading to a lack of specificity in subsequent code matching (e.g., using the word "error" for fuzzy matching); and producing technical effects such as: accurately extracting error types and keywords, providing clear "targets" for code matching (e.g., targeted matching of array operation code for "array out of bounds"), improving the specificity of the localization.
[0120] In this embodiment, step S3 includes: the code matching uses a string matching algorithm based on edit distance combined with a semantic similarity calculation method;
[0121] When analyzing system environment information, suspicious code segments are filtered by parsing the call stack information of the code to determine the location of the final error code.
[0122] Specifically, the disclosed technical features in this application include: the code matching uses a string matching algorithm based on edit distance combined with semantic similarity calculation; the technical problems solved include: traditional matching only relies on string equality comparison, which cannot identify semantically similar errors (such as "indexoutofrange" and "arrayboundsexceeded"); the technical effects include: improving matching fault tolerance, being able to identify different expressions of the same type of error, and expanding the matching coverage.
[0123] The disclosed technical features include: when analyzing system environment information, filtering suspicious segments by parsing call stack information to determine the final error location; the technical problems solved include: failure to combine call stack and environment information, leading to misjudging "code that was not triggered in a specific environment" as the error location (e.g., cross-system adaptation issues); the technical effects include: locking "environment-related execution links" through call stack parsing, avoiding interference from irrelevant code, and improving the accuracy of location.
[0124] In this embodiment, step S4 includes: when analyzing the logical relationship of code fragments, constructing a code logic diagram and analyzing the definition and usage of variables and function call relationships;
[0125] The cause library is constructed in the following way:
[0126] Error data was collected from official documentation of open-source tools, community forums, code repository issue reports, and StackOverflow technical Q&A website. After screening, error types, error causes, involved code snippets, and solutions were manually labeled. Natural language processing technology and knowledge graph construction methods were used to extract structured knowledge to form triples. The data was then categorized and organized according to open-source tool type and error domain, and updated regularly.
[0127] The triple includes the error type, cause, and solution.
[0128] Specifically, the disclosed technical features in this application include: constructing a code logic diagram when analyzing code logic relationships, and analyzing variable definition / usage and function call relationships; solving technical problems including: the cause analysis remains at the surface features of the code without delving into the logical relationships (e.g., only seeing "null pointers" but ignoring the uninitialized upstream variables); producing technical effects including: uncovering "deep logical defects under surface errors" to make the cause judgment more thorough (e.g., tracing the variable transmission link to locate the root cause).
[0129] The publicly disclosed technical features include: the construction of a cause database (e.g., collecting data from multiple channels, manually annotating it, and then using NLP and knowledge graphs to form triples, classifying and organizing it, and updating it regularly); the technical problems solved include: the lack of systematic error knowledge accumulation, leading to repeated analysis of the same type of error and the inability to adapt to new error scenarios; the technical effects produced include: the structured cause database built from multiple channels enables knowledge reuse, reduces repetitive work, and regular updates ensure adaptation to new error scenarios.
[0130] In this embodiment, step S5 includes: when displaying the location of the error code, the file containing the error code is presented in the form of a code editor, the line of the error code is highlighted and the line number is marked;
[0131] When presenting analysis reports, use charts or flowcharts to illustrate complex error causes and provide corresponding solution suggestions.
[0132] Specifically, the disclosed technical features in this application include: when displaying the error location, the file is presented in the form of a code editor, highlighting the error line and marking the line number; the technical problems solved include: traditional displays only provide file path text, requiring developers to manually search for the code location, which is time-consuming and laborious; the technical effects include: intuitively displaying the error code, highlighting the line number, eliminating the need for manual navigation, and quickly locating the problematic code.
[0133] The publicly disclosed technical features include: when presenting analysis reports, providing charts / flowcharts to illustrate complex causes and offering suggested solutions; addressing technical issues such as: complex causes (e.g., chain errors in multiple function calls) are difficult for developers to understand by only being described in text; producing technical effects such as: graphical presentations lower the barrier to understanding, and suggested solutions directly assist in problem fixing and accelerate the troubleshooting process.
[0134] In this embodiment, step S3 includes: the code matching uses the KMP string matching algorithm, which constructs a partial matching table by preprocessing the pattern string, optimizes the movement distance of the pattern string during the matching process, and improves the matching efficiency.
[0135] Specifically, the disclosed technical features in this application include: code matching can adopt the KMP string matching algorithm, which constructs a partial matching table by preprocessing pattern strings, optimizes the moving distance, and improves efficiency; the technical problems solved include: traditional matching algorithms (such as brute-force matching) take too long in large code bases (such as millions of lines), and cannot meet the needs of efficient screening; the technical effects produced include: the KMP algorithm reduces the number of invalid matches, significantly improves the matching speed of large code bases, and ensures that the tool responds efficiently.
[0136] Figure 2 This is a structural diagram of an open-source tool error code location and cause analysis system provided by one or more embodiments of the present invention.
[0137] like Figure 2 The system shown is an open-source tool error code location and cause analysis method, comprising: an error information receiving module, a code repository management module, an error code location module, an error cause analysis module, and a result display module;
[0138] Error message receiving module: Used to receive error messages from open source tools and perform error message verification and formatting.
[0139] Code repository management module: Used to import code repositories related to error reporting open source tools and perform preprocessing operations on the code repositories;
[0140] Error code location module: used to perform semantic analysis on the formatted error information, extract key error features, match the key error features with the preprocessed code library, and determine the location of the error code based on system environment information;
[0141] Error Cause Analysis Module: Used to extract the context of error codes, analyze the logical relationships of the code, compare code features with the cause database to determine the cause of the error, and generate an analysis report;
[0142] Results display module: Used to display the location of error codes and analysis reports through the user interface.
[0143] Specifically, the disclosed technical features in this application include: the system includes an error information receiving module, a code repository management module, an error code location module, an error cause analysis module, and a result display module (e.g., collaboratively achieving full-process automation); the technical problems solved include: existing troubleshooting requires manual switching of tools (e.g., log viewing / code retrieval / community search), resulting in fragmented processes and low efficiency; the technical effects include: the modules collaborate to form a closed loop of "information reception-processing-location-analysis-display," eliminating the need for manual tool switching and significantly improving overall troubleshooting efficiency.
[0144] In this embodiment, the error message receiving module allows users to manually enter error messages through the input interface, or import log files containing error messages, and automatically parse the error message text and system environment information in the log files.
[0145] Specifically, the disclosed technical features in this application include: the error information receiving module supports manual input of error information, or importing log files and automatically parsing error prompts and system environment information; the technical problems solved include: the input method is limited (e.g., only manual copying is supported), and log files cannot be directly parsed, increasing the cost of manual input; the technical effects include: diversified input adapts to different scenarios (e.g., temporary errors / batch logs), automatic parsing reduces manual operation, and improves information input efficiency.
[0146] In this embodiment, the code repository management module includes a code repository storage unit for storing imported code repositories and preprocessed code data, and supports classifying and managing the stored data by open source tool name or code repository version.
[0147] Specifically, the disclosed technical features in this application include: a code repository management module containing a code repository storage unit that stores imported and preprocessed code data, supporting management by tool name or version; the technical problems solved include: the code repository is not stored in the system, requiring repeated imports for each investigation, and multiple versions of code are mixed and difficult to distinguish (e.g., tool v1.0 and v2.0); the technical effects include: code repository reuse reduces repeated imports, version classification facilitates analysis of "errors caused by version iteration" (e.g., API changes), and improves the usability of the tool.
[0148] In this embodiment, the error code location module includes a semantic analysis unit, a code matching unit, and an environment analysis unit;
[0149] The semantic analysis unit uses a natural language processing model to extract key error features;
[0150] The code matching unit integrates edit distance-based matching algorithms and the KMP algorithm, and automatically selects the matching algorithm based on the size of the codebase;
[0151] The environment analysis unit identifies the location of error codes by analyzing system environment information and code call stack.
[0152] Specifically, the disclosed technical features in this application include: the error code localization module includes a semantic analysis unit (e.g., NLP model feature extraction) and a code matching unit (e.g., integrating edit distance and KMP algorithms, automatically selecting the algorithm according to the codebase size); the technical problems solved include: the localization module has a single function (e.g., only supports one matching algorithm), and cannot dynamically adapt to the codebase size (e.g., small libraries need to be fast, large libraries need to be accurate); the technical effects produced include: NLP improves feature accuracy, multiple algorithms adaptively select to balance efficiency and accuracy, and adapt to codebases of different sizes.
[0153] The disclosed technical features include: an environment analysis unit (e.g., parsing environment information and filtering call stack positions); the technical problems solved include: the disconnect between environment analysis and semantic analysis, and the inability to associate "environmental differences" with "code execution logic" (e.g., system compatibility issues); the technical effects include: achieving three-dimensional positioning of "feature-code-environment", further improving the positioning accuracy in complex scenarios.
[0154] In this embodiment, the error cause analysis module includes a cause library storage unit and a logic analysis unit;
[0155] The cause library storage unit stores structured error knowledge triples, supporting fast retrieval by error type;
[0156] The logic analysis unit analyzes the code context logic by constructing an abstract syntax tree to determine the relationship between variables and functions.
[0157] Specifically, the disclosed technical features in this application include: a cause database storage unit (e.g., storing structured triples to support retrieval by error type); the technical problems solved include: the cause database lacks structured retrieval capabilities, making it impossible to quickly find historical causes of "similar errors" (e.g., cases corresponding to "null pointer exception"); and the technical effects achieved include: rapid retrieval of historical knowledge, accelerated cause matching, and improved analysis efficiency.
[0158] The disclosed technical features include: a logical analysis unit (e.g., constructing an abstract syntax tree to analyze the contextual logic and determine the relationship between variables and functions); the technical problems solved include: the logical analysis does not delve into the code syntax structure, making it impossible to accurately locate the underlying causes such as "uninitialized variables" and "abnormal function return values"; the technical effects include: mining the code contextual logic through abstract syntax trees, making the determination of causes more accurate and in-depth.
[0159] In this embodiment, the result display module includes a code display submodule and a report display submodule;
[0160] The code display submodule supports code highlighting, line number annotation, and code editing preview functions;
[0161] The report display submodule supports chart generation, which can visualize complex error causes in the form of flowcharts or cause-and-effect diagrams.
[0162] Specifically, the disclosed technical features in this application include: a code display submodule (e.g., supporting highlighting, line number annotation, and editing preview); the technical problems solved include: only displaying code text, not supporting previewing modifications, requiring developers to switch to an IDE to verify the approach; and the technical effects achieved include: directly previewing code modifications on the display interface, reducing tool switching, and accelerating the verification process.
[0163] The publicly disclosed technical features include: a report display submodule (e.g., support for chart generation to visualize complex causes); the technical problems solved include: complex causes (e.g., multiple dependency conflicts) are difficult for developers to understand logical relationships when described only in text; the technical effects include: graphical displays make complex logic more intuitive, reduce understanding costs, and improve problem recognition efficiency.
[0164] In this embodiment, a cause database update module is also included, which is used to periodically obtain new error data from specified open source tool documents, community forums and code repositories, automatically complete data filtering and preliminary labeling, and update the cause database storage unit after prompting manual review.
[0165] Specifically, the disclosed technical features in this application include: a cause database update module (which periodically obtains new error data from designated channels, automatically filters and initially labels it, and updates it after prompting for manual review); the technical problems solved include: the static cause database cannot adapt to new error types generated by the iteration of open source tools (such as new error codes that appear after tool updates); the technical effects include: an automated + manual review update mechanism that ensures that new cases are included in the cause database in a timely manner, and continuously improves the ability to analyze new types of errors.
[0166] In this embodiment, the code repository management module also supports a code repository version comparison function, which displays the differences between different versions of the code repository and helps analyze error problems caused by version updates.
[0167] Specifically, the disclosed technical features in this application include: the code repository management module supports code repository version comparison function, displays the differences between different versions, and assists in analyzing errors caused by version updates; the technical problems solved include: difficulty in quickly identifying "errors caused by version updates" (e.g., v2.0 deletes a certain API), requiring manual line-by-line comparison of version code; the technical effects include: the visualization of version differences directly locates "added / deleted / modified code snippets", quickly pinpoints the root cause of errors caused by version updates, and shortens the investigation time.
[0168] It is worth noting that although this system / device only discloses the above-mentioned error information receiving module, code library management module, error code location module, error cause analysis module, and result display module, it does not mean that this system / device is limited to the above-mentioned basic functional modules. On the contrary, what this invention intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with existing technology to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. It should not be assumed that the scope of protection of the claims of this invention is limited to the above-disclosed basic functional modules just because this embodiment only discloses a few basic functional modules.
[0169] In one specific embodiment, a method such as Figure 3 The process for locating and analyzing error codes in open-source tools, as shown, includes:
[0170] 1. Error Message Acquisition Steps: The system receives error messages from open-source tools through the user input interface. This information includes the error message text, system environment information at the time of the error (e.g., operating system version, software dependency library versions, hardware configuration, etc.), and the time of the error. The acquired information undergoes preliminary verification and formatting to ensure its completeness and standardization.
[0171] 2. Code Repository Import Steps: Based on user specifications, the system supports importing code repositories related to the error reporting open-source tool from the local file system or code hosting platforms such as GitHub and GitLab. After import, the code repository undergoes preprocessing, including standardizing code format (e.g., indentation, encoding), removing comments, and using a syntax analyzer to segment the code into basic units that are easy to analyze.
[0172] 3. Error Code Location Steps: Natural Language Processing (NLP) techniques are used to perform semantic analysis on the error messages, extracting key error features such as error type (e.g., null pointer exception, array out-of-bounds error, syntax error, etc.) and key error message words (e.g., error code, specific function name, etc.). String matching algorithms (e.g., edit distance-based matching) and semantic similarity calculation methods are used to match the extracted key features with the preprocessed codebase, filtering out code segments that may generate errors. Combining the system environment information at the time of the error, the execution logic of the code segment in the specific environment is analyzed. By analyzing the code's call stack information, the precise location of the error code is further filtered and determined, including the specific file path, function name, and line number.
[0173] 4. Error Cause Analysis Steps: For the located error code, extract the code segment and its surrounding code context to construct a code logic diagram, analyzing variable definitions and usage, function call relationships, etc. Access a pre-built cause library, which collects and organizes information on common error types in open-source tools, their possible causes, and relevant code examples. Compare the characteristics of the error code with the error types in the cause library, using logical reasoning and pattern matching to determine the possible causes of the error. Generate a detailed error cause analysis report based on the analysis results. The report clearly indicates the possible causes of the error, marks the specific location of the problem in the code and the relevant code segment, providing supporting evidence.
[0174] 5. Results Display Steps: The system presents the location of the error code and the error analysis report to the user through an intuitive and user-friendly interface. In the code display area, the file containing the error code is presented in a code editor format, highlighting the line number and indicating the line of error. In the report area, the cause of the error is explained in detail. For complex causes, charts and flowcharts are used for illustration, along with relevant solution suggestions.
[0175] In this embodiment, automated error information acquisition, code repository import, and preprocessing provide a standardized and complete data foundation for subsequent analysis. In the error code localization step, the combination of semantic analysis and multiple matching algorithms can accurately filter suspicious code fragments from the code repository, and further determine the precise location by combining system environment information, improving localization efficiency and accuracy. The error cause analysis step, leveraging a cause library and code context logic analysis, can quickly and accurately determine the root cause of the error and generate a valuable analysis report. Finally, through intuitive result display, developers can quickly understand the error problem and obtain solutions, thereby effectively addressing the pain points of existing technologies and achieving efficient and accurate error handling for open-source tools.
[0176] In another specific embodiment, a method for handling the "HTTP500 Internal Server Error" message encountered by developers during the use of a certain open-source Java Web development framework is disclosed:
[0177] Error message acquisition: Developers input the error message from the error page, along with system environment information such as the current operating system (Windows 10), Java version (Java 17), and framework version (v2.3.1), into the system.
[0178] Code repository import: Download the code repository of this open-source Java Web development framework from GitHub to your local machine. The system performs preprocessing operations on the code repository, such as formatting, removing comments, and word segmentation.
[0179] Error code location: The system performs semantic analysis on the error message, extracting key features such as "HTTP500" and "InternalServerError". Through string matching and semantic similarity calculation, code snippets related to HTTP request processing are filtered out from the codebase. Combining Java version and framework version information, analysis reveals that some new features have compatibility issues in this framework version, ultimately determining that the error code is located on line 56 of a Servlet class in the framework that handles HTTP requests.
[0180] Error Analysis: Extracting line 56 and its context, a code logic diagram was constructed. It was found that this line of code failed to check for null values when retrieving request parameters, which could lead to a null pointer exception under certain request conditions. A query in the cause database and comparison with the "null pointer exception" type confirmed this as the cause. An analysis report was generated, indicating that the error was caused by the lack of null value checks on the request parameters, and the specific code was marked.
[0181] Results Display: The system interface highlights line 56 of the Servlet class, and the report area details the error as a missing null value check in the request parameters, providing suggested solutions to add null value checks to the code. After modifying the code according to the suggestions, the error was resolved.
[0182] In another specific embodiment, relevant explanatory materials are disclosed, including:
[0183] 1. Keyword extraction algorithm
[0184] TextRank Algorithm: The TextRank algorithm borrows ideas from the PageRank algorithm, treating words in text as nodes in a graph and co-occurrence relationships between words as edges. If two words co-occur within a certain window size, an edge is established between them, and the weight of the edge is determined based on factors such as the frequency of co-occurrence. By iteratively calculating the PageRank value of each node, words with higher PageRank values are considered more important, i.e., keywords. For example, in the message describing a database connection error "Databaseconnectionfailed. Unable to establish connection to server," the word "connection" co-occurs frequently with other words. After calculation using the TextRank algorithm, its PageRank value is high, and it will be extracted as a keyword.
[0185] 2. Algorithm in the code matching process
[0186] KMP (Knuth-Morris-Pratt) Algorithm: The KMP algorithm is an efficient string matching algorithm. It constructs a partial matching table (also called the next array) by preprocessing the pattern string. This array records the length of the longest common prefix and suffix of each prefix substring in the pattern string. During the matching process, when a character mismatch occurs, the next array can be used to quickly determine the distance that the pattern string should move to the right, without having to start matching from the beginning every time as in the naive algorithm. For example, the pattern string is "ababaca", and its next array is [-1,0,0,1,2,3,0]. When matching with the text string, if the 4th character "b" of the pattern string does not match the text string at a certain position, according to the next array, the pattern string can be directly moved 2 positions to the right (because next[3]=1, the length of the longest common prefix and suffix of the first 3 characters "aba" in the pattern string is 1), and the comparison with the current position of the text string can continue from the 2nd character.
[0187] 3. Cause Library Construction Method
[0188] (1) Data Collection: Collect a large amount of error information, along with corresponding cause analysis and solutions, from official documentation, community forums, and issue reports in code repositories of various open-source tools. For example, search the issue sections of open-source projects on GitHub to collect error issues related to specific open-source tools and the causes and solutions discussed by developers. Simultaneously, relevant data can also be obtained from professional technical Q&A websites such as Stack Overflow. Perform preliminary screening on the collected data to remove duplicate, invalid, or irrelevant information, ensuring data quality and usability.
[0189] (2) Data Annotation: Collected error messages and their causes are manually annotated. Annotations include the error type (e.g., null pointer exception, syntax error, resource not found), the cause of the error (a detailed description of the specific factors leading to the error, such as uninitialized variables, code logic errors, incompatible dependency library versions, etc.), the involved code snippets (if any), and the solution (specific steps to fix the error or suggestions for code modification). The annotation process requires the participation of professional developers to ensure accuracy and consistency. For example, for an error message "NullPointerException at line 10 in file Main.java", the annotator needs to analyze the code to determine the error type as "null pointer exception." The cause might be that an object was not initialized before use. The involved code snippet can be extracted from line 10 of the Main.java file, and the solution could be to add object initialization code.
[0190] (3) Knowledge Extraction and Organization: Using natural language processing techniques and knowledge graph construction methods, structured knowledge is extracted from labeled data. For example, error type, cause, and solution information are constructed into triples (error type, cause, solution), such as ("null pointer exception", "object not initialized", "add initialization code before using the object"). For the relevant code snippets, their syntactic structure and semantic information can be further analyzed to establish a closer association with the error cause. The extracted knowledge is classified and organized according to different open-source tools, error domains, etc., for subsequent querying and use.
[0191] (4) Updates and Maintenance: As open-source tools continue to develop and update, new error types and causes will constantly emerge. Therefore, the cause database needs to be updated regularly, continuously collecting new data from various channels and processing and adding it to the cause database according to the steps mentioned above. At the same time, for existing data, if errors or inaccuracies are found, they should be corrected and improved in a timely manner to ensure the timeliness and accuracy of the cause database.
[0192] 4. Data Structure Design
[0193] Relational database structure: Relational databases such as MySQL can be used to store source database data. The following main tables are designed:
[0194] Error type table (error_types):
[0195] error_type_id (primary key, auto-incrementing integer): uniquely identifies each error type.
[0196] error_type_name (string): The name of the error type, such as "null pointer exception", "syntax error", etc.
[0197] Reasons table:
[0198] reason_id (primary key, auto-incrementing integer): uniquely identifies each reason.
[0199] error_type_id (foreign key, related to error_type_id in the error_types table): points to the error type to which the cause belongs.
[0200] reason_description (string): Describes the reason for the error in detail.
[0201] Solutions Table:
[0202] solution_id (primary key, auto-incrementing integer): uniquely identifies each solution.
[0203] reason_id (foreign key, related to reason_id in the reasons table): points to the reason corresponding to this solution.
[0204] solution_steps (string): Specific steps or code modification suggestions to resolve the error.
[0205] Code snippets table:
[0206] snippet_id (primary key, auto-incrementing integer): uniquely identifies each code snippet.
[0207] reason_id (foreign key, related to reason_id in the reasons table): points to the reason associated with this code snippet.
[0208] code_text (text): The specific code snippet content.
[0209] file_path (string): The file path where the code snippet is located (if any).
[0210] This relational database structure allows for convenient data storage, retrieval, and management. SQL statements can be used to quickly retrieve relevant information based on error type, cause, and other criteria.
[0211] Figure 4 This is a block diagram of an electronic device structure, which is an open-source tool error code location and cause analysis method provided in one or more embodiments of the present invention.
[0212] like Figure 4 As shown, this application provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0213] The memory stores computer programs, and when the computer programs are executed by the processor, the processor performs steps for locating and analyzing error codes in an open-source tool.
[0214] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform steps of an open-source tool error code location and cause analysis method.
[0215] This application also provides a testing platform, including:
[0216] Electronic devices, including steps for locating and analyzing error codes in open-source tools;
[0217] The processor runs programs, and when a program is running, it executes data output from electronic devices, using open-source tools to locate and analyze error codes and causes.
[0218] Storage media are used to store programs. When a program is running, it executes steps for locating and analyzing error codes from open-source tools based on data output from an electronic device.
[0219] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for locating and analyzing error codes in open-source tools, characterized in that, The methods for locating and analyzing error codes in open-source tools include: Step S1, Error Message Acquisition Step: Receive error messages for open-source tools; The error message includes the error message text and the system environment information at the time of the error. Error messages are validated and formatted to ensure their integrity and standardization. Step S2, code library import step: According to the user's specification, import the code library related to the error-reporting open source tool and preprocess the code library; Step S3, Error Code Location Step: Perform semantic analysis on the formatted error message to extract key error features; Key error characteristics are matched with the preprocessed codebase to filter suspicious code snippets; Based on system environment information, analyze the execution logic of suspicious code segments to determine the exact location of the error code; The error code includes the file path, function name, and line number; Step S4, Error Cause Analysis Steps: Extract the code segment corresponding to the error code location and its context, and analyze the logical relationship of the code segment; The code snippet's characteristics are compared with a pre-built cause database to determine the specific cause of the error, and an analysis report is generated that includes the cause of the error, the location of the problematic code, and supporting evidence. Step S5, Result Display Step: Display the location of the error code and analysis report through the user interface for developers to view and use.
2. The method for locating and analyzing error codes in open-source tools according to claim 1, characterized in that, include: In step S1, the system environment information includes the operating system version, software dependency library version, hardware configuration, and error reporting time. Verification and formatting processing This includes removing invalid information and standardizing information formats.
3. The method for locating and analyzing error codes in open-source tools according to claim 1, characterized in that, include: In step S2, the source of the imported code repository includes the local file system, GitHub code hosting platform, or GitLab code hosting platform; Preprocessing includes standardizing code indentation and encoding format, removing code comments, and using a parser to segment the code into analyzable basic units.
4. The method for locating and analyzing error codes in open-source tools according to claim 1, characterized in that, include: In step S3, natural language processing technology is used to perform semantic analysis and extract key error features, including error type and key error message words; Error types include null pointer exception, array out of bounds, or syntax error; Key error message terms include error codes or specific function names.
5. The method for locating and analyzing error codes in open-source tools according to claim 1, characterized in that, include: In step S4, when analyzing the logical relationships of code snippets, a code logic diagram is constructed, and the definition and usage of variables and function call relationships are analyzed. The cause library is constructed in the following way: Error data was collected from official documentation of open-source tools, community forums, code repository issue reports, and StackOverflow technical Q&A website. After screening, error types, error causes, involved code snippets, and solutions were manually labeled. Natural language processing technology and knowledge graph construction methods were used to extract structured knowledge to form triples. The data was then categorized and organized according to open-source tool type and error domain, and updated regularly. The triple includes the error type, cause, and solution.
6. The method for locating and analyzing error codes in open-source tools according to claim 1, characterized in that, include: In step S5, when displaying the location of the error code, the file containing the error code is presented in the form of a code editor, highlighting the line of error code and marking the line number; When presenting analysis reports, use charts or flowcharts to illustrate complex error causes and provide corresponding solution suggestions.
7. An open-source tool error code location and cause analysis system for implementing the method of any one of claims 1 to 6, characterized in that, include: Error message receiving module: Used to receive error messages from open source tools and perform error message verification and formatting. Code repository management module: Used to import code repositories related to error reporting open source tools and perform preprocessing operations on the code repositories; Error code location module: used to perform semantic analysis on the formatted error information, extract key error features, match the key error features with the preprocessed code library, and determine the location of the error code based on system environment information; Error Cause Analysis Module: Used to extract the context of error codes, analyze the logical relationships of the code, compare code features with the cause database to determine the cause of the error, and generate an analysis report; Results display module: Used to display the location of error codes and analysis reports through the user interface.
8. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory stores a computer program, which, when executed by a processor, causes the processor to perform the steps of the open-source tool error code location and cause analysis method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The device stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the open-source tool error code location and cause analysis method as described in any one of claims 1 to 6.
10. A development platform, characterized in that, include: An electronic device for implementing the steps of the open-source tool error code location and cause analysis method as described in any one of claims 1 to 6; A processor that runs a program, and when the program runs, it executes the steps of the open-source tool error code location and cause analysis method as described in any one of claims 1 to 6 from the data output by the electronic device. A storage medium for storing a program that, when running, performs the steps of the open-source tool error code location and cause analysis method as described in any one of claims 1 to 6 on data output from an electronic device.