System

An AI-powered code analysis system automates code reviews and bug corrections, addressing inefficiencies in traditional methods by enhancing bug detection and reduction, thereby reducing development costs and time to market.

JP2026022430APending Publication Date: 2026-02-12SOFTBANK GROUP CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024123947
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2026-02-12

AI Technical Summary

Technical Problem

Traditional code review methods are time-consuming and rely heavily on developer skills, leading to increased development costs and extended time to market due to inefficient bug detection and correction, especially in large codebases.

Method used

A system utilizing AI technology for code analysis, bug prediction, and automatic correction, including code acquisition, analysis, bug prediction, report generation, and code modification, leveraging neural networks and natural language processing to identify and fix bugs efficiently.

Benefits of technology

The system enables efficient bug detection and correction, reducing development costs and time to market by automating code reviews and improving the accuracy of bug identification and fixing processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026022430000001_ABST
    Figure 2026022430000001_ABST
Patent Text Reader

Abstract

A system is provided.SOLUTION: A system comprising: means for obtaining code; means for analyzing the code; means for predicting bugs with reference to a historical bug database; means for calculating a risk score; means for generating a report summarizing the analysis results; means for notifying a user of the generated report; means for receiving user modification instructions; means for modifying the code based on the modification instructions; and means for re-analyzing the modified code.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The technology of the present disclosure relates to a system. [Background technology]

[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]

[0004] In software development, code reviews require a great deal of time and effort, creating a need for efficient methods for detecting and fixing bugs. However, traditional code review methods rely on the skills and knowledge of developers and have limited ability to detect bugs early. This increases development costs and extends time to market. Furthermore, there is a lack of methods for quickly analyzing large amounts of code and making appropriate corrections, making it difficult to increase development speed while maintaining product quality. [Means for solving the problem]

[0005] In order to solve the above problems, the present invention provides the following means.

[0006] The present invention provides a system including means for acquiring code, means for analyzing the code, means for predicting bugs by referencing a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving correction instructions from the user, means for correcting the code based on the correction instructions, and means for re-analyzing the corrected code. The system also includes means for inferring the cause of bugs from comments and documents using natural language processing technology and means for predicting bugs hidden in each part of the code using a neural network. This enables efficient bug detection and automatic correction, which was difficult with conventional methods, thereby reducing development costs and time to market.

[0007] "Code" is a set of instructions written by a developer that conforms to the syntax of a programming language in order to make the software work.

[0008] "Analysis" is the process of examining code and data in detail to understand their internal structure and meaning.

[0009] A "bug" is a defect that causes unintended behavior or results due to an error or flaw in software code.

[0010] A "bug database" is a collection of data that collects and organizes detailed information about bugs discovered in the past.

[0011] A "risk score" is an indicator that numerically evaluates the severity and impact of a discovered bug.

[0012] A "report" is a document summarizing the results of code analysis, including any bugs found and suggested fixes.

[0013] "Users" are software developers and engineers who operate the system to analyze and modify code.

[0014] A "fix" is the process of changing the code to eliminate a discovered bug.

[0015] "Natural language processing technology" is a technology that allows computers to understand and process human language, and is primarily used to analyze comments and documents.

[0016] A "neural network" is a computational model that mimics the neural circuits of the human brain, and is a technology that recognizes and predicts data patterns through machine learning.

[0017] A "system" is a collection of mechanisms or devices in which multiple means work together as a whole. [Brief explanation of the drawings]

[0018] [Figure 1] 1 is a conceptual diagram showing an example of the configuration of a data processing system according to a first embodiment. [Figure 2] 1 is a conceptual diagram showing an example of main functions of a data processing device and a smart device according to a first embodiment. [Figure 3] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a second embodiment. [Figure 4] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and smart glasses according to a second embodiment. [Figure 5] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a third embodiment. [Figure 6] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and a headset-type terminal according to a third embodiment. [Figure 7] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a fourth embodiment. [Figure 8] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and a robot according to a fourth embodiment. [Figure 9] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 10]1 shows an emotion map onto which multiple emotions are mapped. [Figure 11] FIG. 3 is a sequence diagram showing a processing flow of the data processing system according to the first embodiment. [Figure 12] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 1. [Figure 13] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system according to the second embodiment when an emotion engine is combined. [Figure 14] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 2 when an emotion engine is combined. DETAILED DESCRIPTION OF THE INVENTION

[0019] An example of an embodiment of a system according to the technology of the present disclosure will be described below with reference to the accompanying drawings.

[0020] First, the terms used in the following description will be explained.

[0021] In the following embodiments, a coded processor (hereinafter simply referred to as a "processor") may be a single arithmetic device or a combination of multiple arithmetic devices. Furthermore, a processor may be a single type of arithmetic device or a combination of multiple types of arithmetic devices. Examples of arithmetic devices include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), and an APU (Accelerated Processing Unit).

[0022] In the following embodiments, a coded RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a working memory by a processor.

[0023] In the following embodiments, the coded storage is one or more non-volatile storage devices that store various programs, various parameters, etc. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), and magnetic tapes.

[0024] In the following embodiments, a communication I / F (Interface) with a symbol is an interface including a communication processor, an antenna, etc. The communication I / F controls communication between multiple computers. Examples of communication standards applied to the communication I / F include wireless communication standards including 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc.

[0025] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." In other words, "A and / or B" means that it may be only A, only B, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" is also applied when three or more things are expressed connected by "and / or."

[0026] [First embodiment]

[0027] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.

[0028] 1, a data processing system 10 includes a data processing device 12 and a smart device 14. An example of the data processing device 12 is a server.

[0029] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0030] The smart device 14 includes a computer 36, a reception device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The reception device 38, the output device 40, and the camera 42 are also connected to the bus 52.

[0031] The reception device 38 includes a touch panel 38A, a microphone 38B, and the like, and receives user input. The touch panel 38A detects contact with an indicator (for example, a pen or a finger) to receive user input by the touch of the indicator. The microphone 38B detects the user's voice to receive user input by voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data indicating the user input.

[0032] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting the data in a form of expression that the user 20 can perceive (for example, audio and / or text). The display 40A displays visible information such as text and images in accordance with instructions from the processor 46. The speaker 40B outputs audio in accordance with instructions from the processor 46. The camera 42 is a compact digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.

[0033] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54.

[0034] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.

[0035] 2, in the data processing device 12, a specific process is performed by the processor 28. A specific processing program 56 is stored in the storage 32. The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific process is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[0036] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[0037] In the smart device 14, the processor 46 performs the reception output process. The storage 50 stores a reception output program 60. The reception output program 60 is used in conjunction with the specific processing program 56 by the data processing system 10. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[0038] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0039] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews and to detect and fix bugs early. This system includes multiple means centered around a server.

[0040] System configuration and overview

[0041] 1. Collecting the Code

[0042] The server has the ability to retrieve the latest code from a version control system (e.g., Git). Users commit their developed code to a repository, and the server retrieves that code.

[0043] 2. Code Analysis

[0044] The server has an AI module that analyzes the acquired code. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code.

[0045] 3. Bug Prediction and Risk Assessment

[0046] The server has the ability to predict potential bugs in the code. Specifically, it uses neural networks to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing technology to infer the cause of the bug from comments and documentation.

[0047] 4. Report Generation

[0048] The server generates a detailed report based on the analysis results, including the location of the bug, its risk score, the probable cause, and suggested fixes. The generated report is then sent to the user, who can review the report and make any necessary corrections.

[0049] 5. Instructions for correction and implementation

[0050] After receiving the report, the user sends correction instructions to the server through an interactive interface, which can be provided using a chatbot or a form. The server then automatically corrects the code based on the user's instructions and commits them back to the repository.

[0051] 6. Reanalyzing the bug

[0052] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[0053] Specific examples

[0054] Example 1: Code commit with new feature addition

[0055] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[0056] Example 2: Fix instructions and code fixes

[0057] The user reviews the report and determines that a variable needs to be initialized. The user uses an interactive interface to submit fix instructions to the server. The server then modifies the code based on the instructions and commits it back to the repository. The modified code is then analyzed again to verify that the problem has been resolved.

[0058] As a result, the "AI code analyzer" of this invention enables efficient code review and early bug detection and correction, reducing development costs and shortening time to market. This system is also a general-purpose solution that can be applied to a wide range of organizations involved in software development.

[0059] The processing flow will be explained below.

[0060] Step 1:

[0061] The server retrieves the latest code version from the repository. Specifically, the server runs the "git pull" command to download the latest code from the version control system, resulting in the latest code base to analyze.

[0062] Step 2:

[0063] The server reads the acquired code base into memory, reads the necessary code files from the file system, and prepares them for passing to the analysis engine, where the code dependencies and structure are checked.

[0064] Step 3:

[0065] The server starts the AI ​​analysis engine, specifically loading the past bug database into the model and preparing the code for analysis, which makes the AI ​​module available for application.

[0066] Step 4:

[0067] The server begins code analysis, using neural networks and natural language processing techniques to evaluate each section of code, checking variable types, checking for memory references, and analyzing inconsistencies in loops and conditional branches.

[0068] Step 5:

[0069] The server performs bug prediction, identifies particularly high-risk areas in the code, and calculates a risk score. Specifically, it predicts which parts of functions or classes have potential bugs.

[0070] Step 6:

[0071] The server generates a report based on the analysis results, which includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is used for subsequent fixes.

[0072] Step 7:

[0073] The server notifies the user of the generated report. The report contents are sent to the user via email or dashboard, and the user is alerted to the report, allowing the user to identify areas that need to be corrected.

[0074] Step 8:

[0075] The user reviews the report and sends correction instructions to the server through a conversational interface. Specific instructions for corrections are provided using a chatbot or a dedicated form.

[0076] Step 9:

[0077] The server automatically modifies the code based on the user's instructions. Specifically, it initializes specified variables, modifies conditional branches, deletes unnecessary code, etc. The modified code is then verified internally.

[0078] Step 10:

[0079] The server commits the modified code back to the repository, where the new version is stored and made accessible to other team members, making the changes official.

[0080] Step 11:

[0081] The server re-analyzes the fixed code to verify that the fix was applied correctly, then performs bug prediction and risk assessment again to check for new issues, and this cycle continues until the bug is fully resolved.

[0082] Example 1

[0083] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0084] Improving the efficiency of code reviews and early bug detection and correction are important issues for improving software development quality and adhering to schedules. However, manual code review and bug correction is time-consuming and labor-intensive, resulting in increased development costs and release delays. There is also a risk that human error by inexperienced developers could lead to bugs. Therefore, there is a need for a system that automates code reviews and efficiently and quickly detects and corrects bugs.

[0085] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[0086] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referencing a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for automatically acquiring the latest code from a version control system, means for parsing and analyzing the code using an AI module, means for accepting user instructions through an interactive interface, and means for executing a generative AI model, thereby enabling efficient code reviews and early bug detection and correction.

[0087] The "means for retrieving code" is a mechanism for automatically retrieving the latest code from the version control system.

[0088] The "means for analyzing the code" is a mechanism for analyzing the acquired code and identifying potential problems.

[0089] "Means for predicting bugs by referring to a database of past bugs" is a mechanism for predicting bugs that may be lurking in new code based on data on bugs that have occurred in the past.

[0090] The "means for calculating a risk score" is a mechanism for quantifying and assessing the risk of a predicted bug.

[0091] The "means for generating a report summarizing the analysis results" is a mechanism for creating a detailed report based on the analysis results.

[0092] The "means for notifying the user of the generated report" is a mechanism for notifying the user of the generated report.

[0093] The "means for receiving a user's correction instruction" is a mechanism including an interface for receiving a correction instruction from a user.

[0094] The "means for modifying code based on modification instructions" is a mechanism for automatically modifying code based on modification instructions from a user.

[0095] The "means for reanalyzing the modified code" is a mechanism for reanalyzing the modified code to verify whether the modifications were made correctly.

[0096] "Means for automatically obtaining the latest code from the version control system" is a mechanism for automatically obtaining newly committed code from the version control system.

[0097] "Means for parsing and analyzing code using an AI module" refers to a mechanism for performing structural analysis of code in order to analyze the code using AI technology.

[0098] The "means for accepting user instructions through an interactive interface" is a mechanism that provides an interactive interface for the user to input correction instructions.

[0099] The "means for executing a generative AI model" is a mechanism for executing a pre-trained AI model for code analysis and bug prediction.

[0100] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews and to detect and fix bugs early. This system includes multiple means centered around a server.

[0101] The system of the present invention has a mechanism for performing a series of processes, including code acquisition, analysis, bug prediction, report generation, correction, and reanalysis. The main components include a server, a user terminal, a version control system, an AI module, and an interactive interface.

[0102] Collecting Code

[0103] The server automatically retrieves the latest code from a version control system (e.g., Git). When a user commits new code to a repository using a terminal, the server automatically retrieves that code. A common example of this process is to use the git pull command.

[0104] Code Analysis

[0105] The server uses an AI module to analyze the acquired code. This AI module is trained based on a database of past bugs and uses that knowledge when analyzing newly acquired code. The server loads a machine learning model (e.g., a TensorFlow model) to parse and analyze the code.

[0106] Bug prediction and risk assessment

[0107] The server uses neural networks to predict potential bugs in the code, and natural language processing techniques to infer the cause of the bug from comments and documentation, evaluating each piece of code and calculating a risk score for the defect.

[0108] Report Generation

[0109] The server generates a detailed report based on the analysis results, including the location of the bug, a risk score, a probable cause, and suggested fixes. The report is then sent to the user via email or a dedicated dashboard application.

[0110] Corrective instruction and execution

[0111] The user checks the report received from the server and sends any necessary correction instructions to the server through an interactive interface (such as a chatbot or a dedicated form). The server automatically corrects the code based on the user's correction instructions and commits it back to the repository. The corrected code is then re-analyzed to confirm that the corrections were made correctly.

[0112] Bug reanalysis

[0113] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this process is repeated until the bug is completely eliminated.

[0114] Specific examples

[0115] Example 1: Code commit with new feature addition

[0116] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[0117] Example 2: Fix instructions and code fixes

[0118] The user reviews the report and determines that a variable needs to be initialized. The user uses an interactive interface to submit fix instructions to the server. The server then modifies the code based on the instructions and commits it back to the repository. The modified code is then analyzed again to verify that the problem has been resolved.

[0119] Prompt Sentence Examples

[0120] "After adding a new feature, I committed the code to the repository. Please analyze this code for potential bugs and their risk scores and generate a report."

[0121] With the above configuration, this system enables efficient code review and enables early detection and correction of bugs, thereby reducing development costs and shortening time to market.

[0122] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0123] Processing step flow

[0124] Step 1: Collect the code

[0125] The server automatically retrieves new code that the user commits to a version control system (e.g., Git) using a terminal. In this process, the server periodically monitors the repository and retrieves the latest code when it is committed using the git pull command. The input is the new code committed by the user, and the output is the latest code retrieved by the server.

[0126] Step 2: Code Analysis

[0127] To analyze the acquired code, the server initializes the AI ​​module and starts the analysis process. The AI ​​module contains a pre-trained machine learning model (e.g., TensorFlow model), parses the code, and passes it to the machine learning model. The input is the code acquired by the server, and the output is the parsed code data. The server breaks the acquired code into tokens and passes the extracted token data to the AI ​​module for analysis.

[0128] Step 3: Bug prediction and risk assessment

[0129] The server uses an AI module to predict potential bugs in the analyzed code and calculates a risk score for the defects. In this process, the server uses a neural network to evaluate each part of the code while referencing a database of past bugs. It also uses natural language processing technology to infer the cause of the bug from comments and documentation. The input is the analyzed code data, and the output is a list of predicted bugs and their risk scores.

[0130] Step 4: Generate a report

[0131] The server generates a detailed report based on the results of bug prediction and risk assessment. This report includes the bug location, risk score, probable cause, and fix suggestions. The generated report is notified to the user and displayed via a dashboard application or email. The input is the risk score and bug location data, and the output is the generated report.

[0132] Step 5: Corrective action and implementation

[0133] The user checks the report received from the server and sends any necessary correction instructions to the server through an interactive interface. The server receives the user's correction instructions and automatically corrects the code based on the correction instructions. The interactive interface used in this step includes, for example, a chatbot or a dedicated form. The input is the user's correction instructions, and the output is the corrected code.

[0134] Step 6: Reanalyze the bug

[0135] The server then re-analyzes the modified code and verifies that the bug has been resolved. This process is repeated until the bug is completely eliminated. If the re-analysis determines that no further fixes are necessary, a final report is generated and the user is notified. The input is the modified code, and the output is a report confirming that the bug has been resolved.

[0136] The above processing steps efficiently execute a series of processes from code collection to bug correction and reanalysis, enabling rapid detection and correction.

[0137] (Application example 1)

[0138] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0139] In software development, code review, bug detection, and correction are very important processes, but doing them manually takes a lot of time and effort. This problem is particularly serious in the control systems of robots used in factories, where a malfunction can affect the operation of the entire manufacturing line. Therefore, there is a need for technology to perform this process quickly and efficiently.

[0140] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[0141] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting defects by referencing a database of past defects, means for performing risk assessment, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving correction instructions from the user, means for correcting the code based on the correction instructions, means for reanalyzing the corrected code, and means for reviewing and correcting code efficiently by being installed on robots for factory control system code, thereby enabling early detection and rapid correction of defects and stable operation of factory robots.

[0142] The "means for obtaining code" is a means that has the function of collecting the latest code from a repository such as a version control system.

[0143] "Means for analyzing code" refers to a function that analyzes collected code and understands its content and structure.

[0144] The "means for predicting defects by referring to a database of past defects" has the function of predicting defects that may be lurking in newly collected code based on information about defects that have occurred in the past.

[0145] The "means for performing risk assessment" has the function of quantitatively assessing the risk of malfunctions occurring based on the analysis results.

[0146] The "means for generating a report summarizing the analysis results" has a function for summarizing the results of code analysis and risk assessment into a single report.

[0147] The "means for notifying the user of the generated report" has a function for notifying the user of the generated report.

[0148] The "means for receiving a user's instruction for correction" has a function for receiving instructions from a user regarding code correction.

[0149] The "means for correcting code based on correction instructions" has a function for automatically correcting code according to the correction content instructed by the user.

[0150] The "means for reanalyzing the modified code" refers to a function that reanalyzes the code after the modification has been made to check the appropriateness of the modification and whether any new defects have been found.

[0151] "Factory control system code" refers to the source code used to control robots and machines in a factory.

[0152] "A means to be installed in a robot to make code review and correction more efficient" is something that is installed in a robot and has the function of evaluating and correcting the robot's own code, thereby making review and correction more efficient.

[0153] This invention is a system that improves the efficiency of code reviews and the early detection and correction of bugs in factory control system code. Installed on factory robots, this system automatically collects, analyzes, evaluates, reports, and corrects code.

[0154] The server first retrieves the latest code from the repository. For this purpose, a version control system (e.g., Git) is used. The retrieved code is sent to the server, where it is analyzed by an AI code analyzer module. This module uses a neural network to learn from a database of past defects, and utilizes that knowledge when analyzing new code.

[0155] The server evaluates the risk of the defect based on the analysis results and calculates a risk score. It can also use natural language processing technology to infer the cause of the defect from comments and documents. This generates a detailed report including specific causes and countermeasures. The generated report is then sent to the user by the server.

[0156] The user reviews the submitted report and sends any necessary correction instructions to the server via an interactive interface (such as a chatbot or form). The server automatically corrects the code based on the correction instructions and commits it back to the repository. The corrected code is then reanalyzed to confirm that the bug has been resolved. This cycle is repeated until the bug is completely resolved.

[0157] The hardware used includes the factory robot control system and the server or administrator's device (such as a smartphone or PC), and the software used includes Python, an AI code analyzer (AICodeAnalyzer module), a report generator (ReportGenerator module), and Git (a version control system).

[0158] Consider the following scenario: New control code is committed to a repository to process a new product on a factory production line. This system is used to retrieve the latest control code and analyze it with an AI code analyzer. Based on a database of past defects, the AI ​​identifies parts of the code that are assessed as high risk, generates a report with a risk score and suggested fixes, and notifies the administrator via email.

[0159] An example of a prompt for a generative AI model is, "Analyze the control code of a newly committed factory robot and identify any potential bugs. Compile a report with a risk assessment and suggested fixes based on a database of past bugs, along with a risk score."

[0160] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[0161] Step 1:

[0162] The server uses a means to retrieve the latest code from a version control system (e.g., Git). As input, it requires the URL of the repository, and as output, it contains the retrieved code. The server uses the git clone command to clone the repository locally and gather the latest code.

[0163] Step 2:

[0164] The server uses a means to analyze the retrieved code. As input, it requires the latest code file, and as output, it contains the analysis results. The server uses a Python script to analyze the contents of the code file, analyzing its structure, function calls, etc.

[0165] Step 3:

[0166] The server uses a means to refer to a database of past defects and predict defects. The input requires information on the analyzed code and the database of past defects, and the output includes the defect prediction results. The server uses an AI code analyzer module to predict the possibility of defects using a neural network model.

[0167] Step 4:

[0168] The server uses a means for risk assessment and calculates a risk score. The input is the failure prediction result, and the output includes a risk score. The server quantifies the risk of each part from the analysis result and assigns a score.

[0169] Step 5:

[0170] The server uses a means to generate a report summarizing the analysis results. The inputs include risk scores and defect prediction results, and the output includes a detailed report. The server uses a report generator to create a report that includes risk scores, defect causes, and suggested fixes.

[0171] Step 6:

[0172] The server uses a means to notify the user of the generated report. The generated report is required as input, and the notification is included as output. The server communicates the report to the user using email sending and dashboard update functions.

[0173] Step 7:

[0174] The user reviews the report and sends correction instructions to the server through a conversational interface. The input is the report, and the output includes correction instructions. The user enters the details of the corrections through a chatbot or a form and submits them.

[0175] Step 8:

[0176] The server uses a means to modify the code based on the user's modification instructions. The inputs are the modification instructions and the target code, and the output includes the modified code. The server runs an automated modification script to apply the specified changes to the code.

[0177] Step 9:

[0178] The server uses a means to re-analyze the modified code. The input is the modified code, and the output includes the re-analysis result. The server again uses the AI ​​code analyzer module to analyze the modified code and confirm that the defect has been resolved.

[0179] Furthermore, an emotion engine that estimates the user's emotion may be combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59 and perform identification processing using the user's emotion.

[0180] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews, detect and fix bugs early, and achieve more effective bug response by combining it with an emotion engine that recognizes user emotions. This system includes multiple means centered around a server.

[0181] System configuration and overview

[0182] 1. Collecting the Code

[0183] The server has the ability to retrieve the latest code from a version control system (e.g., Git). Users commit their developed code to a repository, and the server retrieves that code.

[0184] 2. Code Analysis

[0185] The server has an AI module that analyzes the acquired code. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code.

[0186] 3. Bug Prediction and Risk Assessment

[0187] The server has the ability to predict potential bugs in the code. Specifically, it uses neural networks to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing technology to infer the cause of the bug from comments and documentation.

[0188] 4. Emotion Recognition by Emotion Engine

[0189] The emotion engine has the ability to recognize the user's emotions. It analyzes the emotions expressed when the user checks a report or gives instructions for correction, and adjusts the system's behavior based on those emotions.

[0190] 5. Reporting and Notifications

[0191] The server generates a detailed report based on the analysis results. This report includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is then sent to the user, who can review it and make corrections as necessary. The emotion engine adjusts the notification method and content to suit the user's emotions.

[0192] 6. Corrective Instructions and Execution

[0193] After receiving the report, the user sends correction instructions to the server through an interactive interface. This interface is provided using a chatbot or a form. The server automatically corrects the code based on the user's correction instructions and commits it back to the repository. The emotion engine can adjust the priority and method of correction based on the user's emotions.

[0194] 7. Reanalyzing the bug

[0195] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[0196] Specific examples

[0197] Example 1: Code commit with new feature addition

[0198] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analysis using an AI module. Comparing it with a historical bug database, the server identifies the risk of a null pointer reference in a specific function as high risk. The server generates a report with a risk score and notifies the user. The emotion engine analyzes the user's emotions and adjusts the tone and content of the notification depending on the severity of the risk.

[0199] Example 2: Fix instructions and code fixes

[0200] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[0201] In this way, the "AI code analyzer" of this invention not only automates code reviews, but also enables more effective bug handling by taking user emotions into account. This is expected to reduce development costs and shorten time to market, as well as reduce developer stress and improve productivity.

[0202] The processing flow will be explained below.

[0203] Step 1:

[0204] The server retrieves the latest code version from the version control system (e.g., Git). Specifically, the server runs the "git pull" command to download the latest code. This process saves the latest code base to be analyzed on the server.

[0205] Step 2:

[0206] The server loads the acquired code base into memory. The server reads each code file from the file system and prepares the data to be passed to the AI ​​analysis engine. At this stage, the code dependencies and structure are checked.

[0207] Step 3:

[0208] The server starts the AI ​​analysis engine. Specifically, it loads the past bug database as a model and prepares the code for analysis. The AI ​​analysis engine is now ready to be applied.

[0209] Step 4:

[0210] The server begins code analysis, using neural networks and natural language processing techniques to thoroughly evaluate each part of the code. Specifically, it checks variable types, checks for memory references, and analyzes inconsistencies in loops and conditional branches.

[0211] Step 5:

[0212] The server predicts bugs and identifies areas of code that are particularly high risk. It calculates a risk score and lists areas with high potential for problems. Specifically, it clarifies which parts of functions and classes contain potential bugs.

[0213] Step 6:

[0214] The server generates a report based on the analysis results, which includes the location of the bug, its risk score, probable cause, and suggested fixes, and provides the report to the user.

[0215] Step 7:

[0216] The server notifies the user of the generated report. Specifically, the report contents are transmitted to the user via email or dashboard so that the user can check them. The emotion engine recognizes the user's emotions and adjusts the notification content accordingly.

[0217] Step 8:

[0218] The user checks the report and sends correction instructions to the server through a conversational interface. The user provides specific corrections using a chatbot or a dedicated form. The emotion engine adjusts correction support according to the user's emotions.

[0219] Step 9:

[0220] The server automatically modifies the code based on the user's instructions. Specifically, it initializes specified variables, modifies conditional branches, deletes unnecessary code, etc. The modified code is then verified internally.

[0221] Step 10:

[0222] The server commits the modified code back to the repository, where the new version is stored and made accessible to other team members, making the changes official.

[0223] Step 11:

[0224] The server re-analyzes the fixed code to verify that the fix was applied correctly, then performs bug prediction and risk assessment again to check for new issues, and this cycle continues until the bug is fully resolved.

[0225] Step 12:

[0226] The emotion engine analyzes user feedback and reflects it in future correction support and report generation. The system optimizes the overall operation of the system, taking into account the user's emotions and stress level. This initiative is expected to improve the user experience and improve development efficiency.

[0227] Example 2

[0228] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0229] Conventional code review systems focus on early bug detection and correction, but rarely consider the user's emotional state. As a result, the stress of the correction process increases and productivity declines. Another issue is the inability to effectively utilize natural language processing technology or neural networks in bug risk assessment and bug cause inference. Therefore, the present invention aims to provide a system that takes user emotions into account in code analysis, enabling more effective bug prediction and correction.

[0230] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[0231] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referring to a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for recognizing a user's emotion and adjusting the system operation based on the emotion, and means for adjusting the notification method and content based on the user's emotion, thereby enabling efficient bug prediction and correction while respecting the user's emotional state.

[0232] "Means for retrieving code" refers to a function for automatically retrieving program code from a version control system.

[0233] "Means for analyzing code" refers to the function of analyzing acquired program code using analytical tools such as AI modules.

[0234] "Means for predicting bugs by referencing a database of past bugs" refers to a function that refers to a database of previously reported bugs and predicts new bugs based on that.

[0235] "Means for calculating risk score" refers to a function that evaluates and quantifies the risk of a bug existing in each part of the program code.

[0236] "Means for generating a report summarizing the analysis results" refers to the function of creating a report based on the results of code analysis that includes the location of the bug, risk score, probable cause, suggested fixes, etc.

[0237] "Means for notifying the user of the generated report" refers to a function for notifying the user of the generated report. Notification methods include email and chat apps.

[0238] "Means for receiving correction instructions from the user" refers to a function that provides an interface for receiving correction instructions from the user, such as a chatbot or form.

[0239] The "means for modifying code based on modification instructions" refers to a function for automatically modifying program code based on modification instructions received from a user.

[0240] "Means for reanalyzing modified code" refers to a function for reanalyzing modified program code and verifying that the bug has been resolved.

[0241] "Means for recognizing the user's emotions and adjusting the system's behavior based on those emotions" refers to the function of analyzing the user's emotional state and adaptively changing the system's behavior based on the results.

[0242] "Means for adjusting notification method and content based on user emotions" refers to a function that flexibly changes the tone, content, and means of notifications, taking into account the user's emotional state.

[0243] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews, detect and fix bugs early, and achieve more effective bug response by combining it with an emotion engine that recognizes user emotions. This system includes multiple means centered around a server.

[0244] Collecting Code

[0245] The server has the ability to retrieve the latest code from a version control system (e.g., Git). When a user commits the code they developed to the repository, the server automatically retrieves that code. Specifically, the latest code is retrieved using the git pull origin master command.

[0246] Code Analysis

[0247] The server has an AI module for analyzing the code it retrieves. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code. Deep learning frameworks such as TensorFlow and PyTorch are used here. Specifically, a TensorFlow model is loaded and analysis is performed using the form model.predict(new_code).

[0248] Bug prediction and risk assessment

[0249] The server uses a neural network to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing techniques (e.g., BERT or GPT) to infer the cause of the bug from comments and documentation. This evaluation involves risk_score = neural_network.evaluate(code_segment).

[0250] Emotion recognition by emotion engine

[0251] The emotion engine has the ability to recognize user emotions. It analyzes the emotions expressed when a user checks a report or makes corrections, and adjusts the system's behavior based on those emotions. Sentiment analysis utilizes open-source emotion APIs and general-purpose natural language processing models. For example, emotion = emotion_api.analyze(user_input).

[0252] Reporting and Notifications

[0253] The server generates a detailed report based on the analysis results. This report includes the bug location, risk score, probable cause, and suggested fixes. The generated report is then sent to the user via email or a chat app (e.g., Slack, Microsoft Teams). The emotion engine adjusts the content and tone of the notification based on the user's emotion. Specifically, a report is generated using report = generate_report(bug_locations, risk_scores, causes, suggestions), and notifications are sent via email or Slack API.

[0254] Corrective instruction and execution

[0255] After receiving the report, the user sends correction instructions to the server through a conversational interface (e.g., chatbot or form). The server automatically corrects the code based on the instructions and commits it back to the repository. The emotion engine adjusts the priority and method of corrections based on the user's emotions. Specifically, it parses the user's input, sets fix_command = parse_user_input(user_input), implements the corrections, and sets apply_fix(fix_command).

[0256] Bug reanalysis

[0257] The modified code is analyzed again by the server to confirm that the bug has been resolved. This cycle is repeated until the bug is completely resolved. To reanalyze, the modified code is analyzed again by the AI ​​module using the model.predict(fixed_code) method.

[0258] Specific examples

[0259] Example 1: Code commit with new feature addition

[0260] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analysis using an AI module. Comparing it with a historical bug database, the server identifies the risk of a null pointer reference in a specific function as high risk. The server generates a report with a risk score and notifies the user. The emotion engine analyzes the user's emotions and adjusts the tone and content of the notification depending on the severity of the risk.

[0261] Example prompt sentence:

[0262] "We've added a new feature. Please assess the potential bugs and risks in your code and let us know the results. Also, generate notifications based on user sentiment."

[0263] Example 2: Fix instructions and code fixes

[0264] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[0265] Example prompt sentence:

[0266] "I've seen the code report and I need to initialize a variable. This is a stressful situation and I'd like more guidance and support."

[0267] In this way, the "AI code analyzer" of this invention not only automates code reviews, but also enables more effective bug handling by taking user emotions into account. This is expected to reduce development costs and shorten time to market, as well as reduce developer stress and improve productivity.

[0268] The flow of the identification process in the second embodiment will be described with reference to FIG.

[0269] Step 1:

[0270] The server retrieves the latest code from the version control system (e.g., Git). The input to this step is the code that the user committed to the repository, and the output is the retrieved latest code. Specifically, the server executes the git pull origin master command to retrieve the latest code and saves it in a dedicated directory on the server.

[0271] Step 2:

[0272] The server launches an AI module to analyze the acquired code. The input of this step is the code acquired in step 1, and the output is the analysis result. Specifically, the server loads a TensorFlow or PyTorch model and analyzes the code using model.predict(new_code).

[0273] Step 3:

[0274] The server uses a neural network to predict bugs in the code and calculate a risk score. The input to this step is the analysis result obtained in step 2, and the output is the risk score of the bug. Specifically, the server performs a risk assessment based on the analysis result in the form risk_score = neural_network.evaluate(code_segment).

[0275] Step 4:

[0276] The emotion engine recognizes the user's emotions. The input to this step is the user's language and actions when checking the report or giving correction instructions, and the output is the user's emotional state. Specifically, the emotion engine uses an emotion analysis model to analyze the user's emotions in the form emotion = emotion_api.analyze(user_input).

[0277] Step 5:

[0278] The server generates a detailed report based on the analysis results and notifies the user. The inputs to this step are the risk score and analysis results obtained in step 3, as well as the user's emotional state, and the output is the generated report and notification. Specifically, the server generates a report in the form of report = generate_report(bug_locations, risk_scores, causes, suggestions), and notifies the user via email or Slack API.

[0279] Step 6:

[0280] The user receives the report and sends correction instructions to the server through an interactive interface. The input of this step is the user's correction instructions, and the output is the instructions sent to the server. Specifically, the user's input is parsed and instructions are generated in the form fix_command = parse_user_input(user_input).

[0281] Step 7:

[0282] The server modifies the code based on the fix instructions and commits it to the repository again. The input to this step is the fix instructions obtained in step 6, and the output is a commit of the modified code. Specifically, the server makes the fix in the form of apply_fix(fix_command) and executes the git commit and git push commands.

[0283] Step 8:

[0284] The server analyzes the modified code again to see if the bug has been resolved. The input to this step is the code modified in step 7, and the output is the result of the reanalysis. Specifically, the server uses the AI ​​module again to perform a reanalysis in the form of model.predict(fixed_code). This reanalysis then verifies whether the bug has been resolved.

[0285] (Application example 2)

[0286] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."

[0287] Conventional code review systems lack efficient methods for detecting code bugs and adequate notification and correction support that takes into account the user's emotional state. As a result, detecting and correcting bugs requires a great deal of time and effort, often causing developers high levels of stress. Rapid and accurate bug response is essential, particularly in workplaces where improving the reliability of factory robot software and work efficiency is required.

[0288] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[0289] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referring to a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for recognizing the user's emotion, and means for adjusting the notification method and content of the report according to the user's emotion, thereby enabling efficient detection and correction of code bugs and notification and support according to the user's emotional state.

[0290] "Means" refers to a method or device for achieving a specific function or purpose.

[0291] "Code retrieval methods" refers to the methods or processes used to gather the latest code from a version control system or other repository.

[0292] "Means for analyzing code" refers to methods and tools for automatically analyzing software code and evaluating its quality and problems.

[0293] "Means for predicting bugs by referencing a database of past bugs" refers to methods or algorithms for predicting potential new bugs based on past bug data.

[0294] "Means for calculating risk scores" refers to methods or calculation processes for quantifying and assessing the impact and probability of occurrence of potential issues in the code.

[0295] "Means for generating a report summarizing the analysis results" refers to methods and tools for organizing the results of code analysis and creating a clearly written document (report).

[0296] "Means for notifying a user of a generated report" refers to a method or system for notifying a user of a generated report.

[0297] The "means for receiving a user's modification instruction" refers to an interface or method for receiving a code modification instruction from a user.

[0298] "Means for modifying code based on modification instructions" refers to a method or system for automatically modifying code based on user instructions.

[0299] "Means for reanalyzing modified code" refers to methods or tools for reanalyzing the modified code and verifying that the modifications were made correctly.

[0300] "Means for recognizing a user's emotion" refers to a method or technology for analyzing a user's emotional state and identifying that emotion.

[0301] "Means for adjusting the notification method and content of a report according to the user's emotions" refers to a method or technology for dynamically changing the notification method and content based on the user's emotional state.

[0302] The present invention is a system for efficiently analyzing software code for factory robots to enable early detection and correction of bugs. This system includes multiple means for retrieving code from a version control system and automatically analyzing it. It also has a function for recognizing user emotions and adjusting the notification method and content of reports based on those emotions. A specific embodiment of this system is described below.

[0303] System configuration and overview

[0304] 1. Collecting the Code

[0305] The server retrieves the latest code from the version control system (e.g., Git). This process pulls the user-developed code from the repository and makes it available for subsequent analysis.

[0306] 2. Code Analysis

[0307] The server has an AI module that analyzes the acquired code. This module uses TensorFlow to learn from a database of past bugs and uses that knowledge when analyzing new code. Specifically, it evaluates each part of the code and calculates a risk score for the defect.

[0308] 3. Bug Prediction and Risk Assessment

[0309] The server uses neural networks to predict potential bugs in the code, calculates a risk score, and uses natural language processing techniques to infer the cause of the bug from comments and documentation.

[0310] 4. Emotion Recognition by Emotion Engine

[0311] The server analyzes user emotions using the BERT model, and the emotion engine recognizes the emotions users feel when reviewing reports or making corrections, and adjusts the system's behavior based on those emotions.

[0312] 5. Reporting and Notifications

[0313] The server generates a detailed report based on the analysis results. The report includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is sent to the user's device via an HTTP request. The emotion engine adjusts the notification method and content appropriately according to the user's emotion.

[0314] 6. Corrective Instructions and Execution

[0315] The user checks the report and sends correction instructions to the server using a conversational interface (e.g., chatbot function). The server automatically corrects the code based on the user's instructions and commits it back to the repository. The emotion engine can adjust the priority and method of correction based on the user's emotions.

[0316] 7. Reanalyzing the bug

[0317] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[0318] Specific examples

[0319] Example 1: Code commit with new feature addition

[0320] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[0321] Example 2: Fix instructions and code fixes

[0322] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[0323] Examples of prompt statements

[0324] Prompt statement:

[0325] Please analyze the code below and let me know the potential bugs and their risk scores.

[0326] code:

[0327] python

[0328] def example_function(param1, param2):

[0329] if param1 is None:

[0330] return "Error"

[0331] result = param1 + param2

[0332] return result

[0333] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[0334] Step 1:

[0335] The server collects the latest code from a version control system (e.g., Git). Specifically, it accesses the repository using the Git API and retrieves the latest commits. This requires the repository URL as input and the retrieved code files as output.

[0336] Step 2:

[0337] The server loads a TensorFlow-powered AI model to analyze the captured code. This AI model is trained on a database of past bugs and evaluates each piece of code. It uses the captured code file as input and produces a predicted bug result and risk score as output.

[0338] Step 3:

[0339] The server uses neural networks to predict bugs and assess risk. Specifically, it analyzes each section of code and calculates the probability and impact of potential bugs. The input is the text data of the code, and the output is a risk score.

[0340] Step 4:

[0341] The server uses natural language processing technology to infer the cause of bugs from comments and documentation in the code. Specifically, it uses the BERT model to analyze text data and identify the cause of the bug. The text data from comments and documentation is used as input, and the inferred cause is obtained as output.

[0342] Step 5:

[0343] The server generates a detailed report based on the analysis results, including the bug location, risk score, probable cause, and fix suggestions. The bug prediction results and risk score are used as input, and the report is obtained as output.

[0344] Step 6:

[0345] The server uses an emotion engine to analyze the user's emotions. Specifically, it evaluates the user's input text using the BERT model to identify the user's emotional state. The user's text data is used as input, and the emotion evaluation result is obtained as output.

[0346] Step 7:

[0347] The server adjusts the notification method and content of the generated report according to the emotion and sends it to the user. Specifically, if the user's emotional state is stressed, detailed explanations and supporting information are added. The emotion assessment results are used as input, and the adjusted report is obtained as output.

[0348] Step 8:

[0349] The user checks the notified report and sends correction instructions to the server using an interactive interface. Specifically, the user enters specific corrections using a chatbot or form. The user's correction instructions are used as input, and the instructions are sent to the server as output.

[0350] Step 9:

[0351] The server modifies the code based on the user's instructions and commits it back to the repository, using the user's instructions as input and the modified code as output.

[0352] Step 10:

[0353] The server then re-analyzes the modified code to verify that the bug has been resolved. The modified code file is used as input and run through the AI ​​model again. The output is a verification result that indicates whether the modifications were correct.

[0354] The specific processing unit 290 transmits the result of the specific processing to the smart device 14. In the smart device 14, the control unit 46A causes the output device 40 to output the result of the specific processing. The microphone 38B acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.

[0355] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[0356] In the above embodiment, an example in which the specific process is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific process may be performed by the smart device 14.

[0357] [Second embodiment]

[0358] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.

[0359] 3, the data processing system 210 includes the data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.

[0360] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0361] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, and the camera 42 are also connected to the bus 52.

[0362] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.

[0363] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).

[0364] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.

[0365] Fig. 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Fig. 4, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.

[0366] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[0367] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[0368] In the smart glasses 214, the reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[0369] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the smart glasses 214 will be referred to as the "terminal."

[0370] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews and to detect and fix bugs early. This system includes multiple means centered around a server.

[0371] System configuration and overview

[0372] 1. Collecting the Code

[0373] The server has the ability to retrieve the latest code from a version control system (e.g., Git). Users commit their developed code to a repository, and the server retrieves that code.

[0374] 2. Code Analysis

[0375] The server has an AI module that analyzes the acquired code. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code.

[0376] 3. Bug Prediction and Risk Assessment

[0377] The server has the ability to predict potential bugs in the code. Specifically, it uses neural networks to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing technology to infer the cause of the bug from comments and documentation.

[0378] 4. Report Generation

[0379] The server generates a detailed report based on the analysis results, including the location of the bug, its risk score, the probable cause, and suggested fixes. The generated report is then sent to the user, who can review the report and make any necessary corrections.

[0380] 5. Instructions for correction and implementation

[0381] After receiving the report, the user sends correction instructions to the server through an interactive interface, which can be provided using a chatbot or a form. The server then automatically corrects the code based on the user's instructions and commits them back to the repository.

[0382] 6. Reanalyzing the bug

[0383] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[0384] Specific examples

[0385] Example 1: Code commit with new feature addition

[0386] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[0387] Example 2: Fix instructions and code fixes

[0388] The user reviews the report and determines that a variable needs to be initialized. The user uses an interactive interface to submit fix instructions to the server. The server then modifies the code based on the instructions and commits it back to the repository. The modified code is then analyzed again to verify that the problem has been resolved.

[0389] As a result, the "AI code analyzer" of this invention enables efficient code review and early bug detection and correction, reducing development costs and shortening time to market. This system is also a general-purpose solution that can be applied to a wide range of organizations involved in software development.

[0390] The processing flow will be explained below.

[0391] Step 1:

[0392] The server retrieves the latest code version from the repository. Specifically, the server runs the "git pull" command to download the latest code from the version control system, resulting in the latest code base to analyze.

[0393] Step 2:

[0394] The server reads the acquired code base into memory, reads the necessary code files from the file system, and prepares them for passing to the analysis engine, where the code dependencies and structure are checked.

[0395] Step 3:

[0396] The server starts the AI ​​analysis engine, specifically loading the past bug database into the model and preparing the code for analysis, which makes the AI ​​module available for application.

[0397] Step 4:

[0398] The server begins code analysis, using neural networks and natural language processing techniques to evaluate each section of code, checking variable types, checking for memory references, and analyzing inconsistencies in loops and conditional branches.

[0399] Step 5:

[0400] The server performs bug prediction, identifies particularly high-risk areas in the code, and calculates a risk score. Specifically, it predicts which parts of functions or classes have potential bugs.

[0401] Step 6:

[0402] The server generates a report based on the analysis results, which includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is used for subsequent fixes.

[0403] Step 7:

[0404] The server notifies the user of the generated report. The report contents are sent to the user via email or dashboard, and the user is alerted to the report, allowing the user to identify areas that need to be corrected.

[0405] Step 8:

[0406] The user reviews the report and sends correction instructions to the server through a conversational interface. Specific instructions for corrections are provided using a chatbot or a dedicated form.

[0407] Step 9:

[0408] The server automatically modifies the code based on the user's instructions. Specifically, it initializes specified variables, modifies conditional branches, deletes unnecessary code, etc. The modified code is then verified internally.

[0409] Step 10:

[0410] The server commits the modified code back to the repository, where the new version is stored and made accessible to other team members, making the changes official.

[0411] Step 11:

[0412] The server re-analyzes the fixed code to verify that the fix was applied correctly, then performs bug prediction and risk assessment again to check for new issues, and this cycle continues until the bug is fully resolved.

[0413] Example 1

[0414] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[0415] Improving the efficiency of code reviews and early bug detection and correction are important issues for improving software development quality and adhering to schedules. However, manual code review and bug correction is time-consuming and labor-intensive, resulting in increased development costs and release delays. There is also a risk that human error by inexperienced developers could lead to bugs. Therefore, there is a need for a system that automates code reviews and efficiently and quickly detects and corrects bugs.

[0416] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[0417] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referencing a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for automatically acquiring the latest code from a version control system, means for parsing and analyzing the code using an AI module, means for accepting user instructions through an interactive interface, and means for executing a generative AI model, thereby enabling efficient code reviews and early bug detection and correction.

[0418] The "means for retrieving code" is a mechanism for automatically retrieving the latest code from the version control system.

[0419] The "means for analyzing the code" is a mechanism for analyzing the acquired code and identifying potential problems.

[0420] "Means for predicting bugs by referring to a database of past bugs" is a mechanism for predicting bugs that may be lurking in new code based on data on bugs that have occurred in the past.

[0421] The "means for calculating a risk score" is a mechanism for quantifying and assessing the risk of a predicted bug.

[0422] The "means for generating a report summarizing the analysis results" is a mechanism for creating a detailed report based on the analysis results.

[0423] The "means for notifying the user of the generated report" is a mechanism for notifying the user of the generated report.

[0424] The "means for receiving a user's correction instruction" is a mechanism including an interface for receiving a correction instruction from a user.

[0425] The "means for modifying code based on modification instructions" is a mechanism for automatically modifying code based on modification instructions from a user.

[0426] The "means for reanalyzing the modified code" is a mechanism for reanalyzing the modified code to verify whether the modifications were made correctly.

[0427] "Means for automatically obtaining the latest code from the version control system" is a mechanism for automatically obtaining newly committed code from the version control system.

[0428] "Means for parsing and analyzing code using an AI module" refers to a mechanism for performing structural analysis of code in order to analyze the code using AI technology.

[0429] The "means for accepting user instructions through an interactive interface" is a mechanism that provides an interactive interface for the user to input correction instructions.

[0430] The "means for executing a generative AI model" is a mechanism for executing a pre-trained AI model for code analysis and bug prediction.

[0431] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews and to detect and fix bugs early. This system includes multiple means centered around a server.

[0432] The system of the present invention has a mechanism for performing a series of processes, including code acquisition, analysis, bug prediction, report generation, correction, and reanalysis. The main components include a server, a user terminal, a version control system, an AI module, and an interactive interface.

[0433] Collecting Code

[0434] The server automatically retrieves the latest code from a version control system (e.g., Git). When a user commits new code to a repository using a terminal, the server automatically retrieves that code. A common example of this process is to use the git pull command.

[0435] Code Analysis

[0436] The server uses an AI module to analyze the acquired code. This AI module is trained based on a database of past bugs and uses that knowledge when analyzing newly acquired code. The server loads a machine learning model (e.g., a TensorFlow model) to parse and analyze the code.

[0437] Bug prediction and risk assessment

[0438] The server uses neural networks to predict potential bugs in the code, and natural language processing techniques to infer the cause of the bug from comments and documentation, evaluating each piece of code and calculating a risk score for the defect.

[0439] Report Generation

[0440] The server generates a detailed report based on the analysis results, including the location of the bug, a risk score, a probable cause, and suggested fixes. The report is then sent to the user via email or a dedicated dashboard application.

[0441] Corrective instruction and execution

[0442] The user checks the report received from the server and sends any necessary correction instructions to the server through an interactive interface (such as a chatbot or a dedicated form). The server automatically corrects the code based on the user's correction instructions and commits it back to the repository. The corrected code is then re-analyzed to confirm that the corrections were made correctly.

[0443] Bug reanalysis

[0444] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this process is repeated until the bug is completely eliminated.

[0445] Specific examples

[0446] Example 1: Code commit with new feature addition

[0447] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[0448] Example 2: Fix instructions and code fixes

[0449] The user reviews the report and determines that a variable needs to be initialized. The user uses an interactive interface to submit fix instructions to the server. The server then modifies the code based on the instructions and commits it back to the repository. The modified code is then analyzed again to verify that the problem has been resolved.

[0450] Prompt Sentence Examples

[0451] "After adding a new feature, I committed the code to the repository. Please analyze this code for potential bugs and their risk scores and generate a report."

[0452] With the above configuration, this system enables efficient code review and enables early detection and correction of bugs, thereby reducing development costs and shortening time to market.

[0453] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0454] Processing step flow

[0455] Step 1: Collect the code

[0456] The server automatically retrieves new code that the user commits to a version control system (e.g., Git) using a terminal. In this process, the server periodically monitors the repository and retrieves the latest code when it is committed using the git pull command. The input is the new code committed by the user, and the output is the latest code retrieved by the server.

[0457] Step 2: Code Analysis

[0458] To analyze the acquired code, the server initializes the AI ​​module and starts the analysis process. The AI ​​module contains a pre-trained machine learning model (e.g., TensorFlow model), parses the code, and passes it to the machine learning model. The input is the code acquired by the server, and the output is the parsed code data. The server breaks the acquired code into tokens and passes the extracted token data to the AI ​​module for analysis.

[0459] Step 3: Bug prediction and risk assessment

[0460] The server uses an AI module to predict potential bugs in the analyzed code and calculates a risk score for the defects. In this process, the server uses a neural network to evaluate each part of the code while referencing a database of past bugs. It also uses natural language processing technology to infer the cause of the bug from comments and documentation. The input is the analyzed code data, and the output is a list of predicted bugs and their risk scores.

[0461] Step 4: Generate a report

[0462] The server generates a detailed report based on the results of bug prediction and risk assessment. This report includes the bug location, risk score, probable cause, and fix suggestions. The generated report is notified to the user and displayed via a dashboard application or email. The input is the risk score and bug location data, and the output is the generated report.

[0463] Step 5: Corrective action and implementation

[0464] The user checks the report received from the server and sends any necessary correction instructions to the server through an interactive interface. The server receives the user's correction instructions and automatically corrects the code based on the correction instructions. The interactive interface used in this step includes, for example, a chatbot or a dedicated form. The input is the user's correction instructions, and the output is the corrected code.

[0465] Step 6: Reanalyze the bug

[0466] The server then re-analyzes the modified code and verifies that the bug has been resolved. This process is repeated until the bug is completely eliminated. If the re-analysis determines that no further fixes are necessary, a final report is generated and the user is notified. The input is the modified code, and the output is a report confirming that the bug has been resolved.

[0467] The above processing steps efficiently execute a series of processes from code collection to bug correction and reanalysis, enabling rapid detection and correction.

[0468] (Application example 1)

[0469] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[0470] In software development, code review, bug detection, and correction are very important processes, but doing them manually takes a lot of time and effort. This problem is particularly serious in the control systems of robots used in factories, where a malfunction can affect the operation of the entire manufacturing line. Therefore, there is a need for technology to perform this process quickly and efficiently.

[0471] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[0472] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting defects by referencing a database of past defects, means for performing risk assessment, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving correction instructions from the user, means for correcting the code based on the correction instructions, means for reanalyzing the corrected code, and means for reviewing and correcting code efficiently by being installed on robots for factory control system code, thereby enabling early detection and rapid correction of defects and stable operation of factory robots.

[0473] The "means for obtaining code" is a means that has the function of collecting the latest code from a repository such as a version control system.

[0474] "Means for analyzing code" refers to a function that analyzes collected code and understands its content and structure.

[0475] The "means for predicting defects by referring to a database of past defects" has the function of predicting defects that may be lurking in newly collected code based on information about defects that have occurred in the past.

[0476] The "means for performing risk assessment" has the function of quantitatively assessing the risk of malfunctions occurring based on the analysis results.

[0477] The "means for generating a report summarizing the analysis results" has a function for summarizing the results of code analysis and risk assessment into a single report.

[0478] The "means for notifying the user of the generated report" has a function for notifying the user of the generated report.

[0479] The "means for receiving a user's instruction for correction" has a function for receiving instructions from a user regarding code correction.

[0480] The "means for correcting code based on correction instructions" has a function for automatically correcting code according to the correction content instructed by the user.

[0481] The "means for reanalyzing the modified code" refers to a function that reanalyzes the code after the modification has been made to check the appropriateness of the modification and whether any new defects have been found.

[0482] "Factory control system code" refers to the source code used to control robots and machines in a factory.

[0483] "A means to be installed in a robot to make code review and correction more efficient" is something that is installed in a robot and has the function of evaluating and correcting the robot's own code, thereby making review and correction more efficient.

[0484] This invention is a system that improves the efficiency of code reviews and the early detection and correction of bugs in factory control system code. Installed on factory robots, this system automatically collects, analyzes, evaluates, reports, and corrects code.

[0485] The server first retrieves the latest code from the repository. For this purpose, a version control system (e.g., Git) is used. The retrieved code is sent to the server, where it is analyzed by an AI code analyzer module. This module uses a neural network to learn from a database of past defects, and utilizes that knowledge when analyzing new code.

[0486] The server evaluates the risk of the defect based on the analysis results and calculates a risk score. It can also use natural language processing technology to infer the cause of the defect from comments and documents. This generates a detailed report including specific causes and countermeasures. The generated report is then sent to the user by the server.

[0487] The user reviews the submitted report and sends any necessary correction instructions to the server via an interactive interface (such as a chatbot or form). The server automatically corrects the code based on the correction instructions and commits it back to the repository. The corrected code is then reanalyzed to confirm that the bug has been resolved. This cycle is repeated until the bug is completely resolved.

[0488] The hardware used includes the factory robot control system and the server or administrator's device (such as a smartphone or PC), and the software used includes Python, an AI code analyzer (AICodeAnalyzer module), a report generator (ReportGenerator module), and Git (a version control system).

[0489] Consider the following scenario: New control code is committed to a repository to process a new product on a factory production line. This system is used to retrieve the latest control code and analyze it with an AI code analyzer. Based on a database of past defects, the AI ​​identifies parts of the code that are assessed as high risk, generates a report with a risk score and suggested fixes, and notifies the administrator via email.

[0490] An example of a prompt for a generative AI model is, "Analyze the control code of a newly committed factory robot and identify any potential bugs. Compile a report with a risk assessment and suggested fixes based on a database of past bugs, along with a risk score."

[0491] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[0492] Step 1:

[0493] The server uses a means to retrieve the latest code from a version control system (e.g., Git). As input, it requires the URL of the repository, and as output, it contains the retrieved code. The server uses the git clone command to clone the repository locally and gather the latest code.

[0494] Step 2:

[0495] The server uses a means to analyze the retrieved code. As input, it requires the latest code file, and as output, it contains the analysis results. The server uses a Python script to analyze the contents of the code file, analyzing its structure, function calls, etc.

[0496] Step 3:

[0497] The server uses a means to refer to a database of past defects and predict defects. The input requires information on the analyzed code and the database of past defects, and the output includes the defect prediction results. The server uses an AI code analyzer module to predict the possibility of defects using a neural network model.

[0498] Step 4:

[0499] The server uses a means for risk assessment and calculates a risk score. The input is the failure prediction result, and the output includes a risk score. The server quantifies the risk of each part from the analysis result and assigns a score.

[0500] Step 5:

[0501] The server uses a means to generate a report summarizing the analysis results. The inputs include risk scores and defect prediction results, and the output includes a detailed report. The server uses a report generator to create a report that includes risk scores, defect causes, and suggested fixes.

[0502] Step 6:

[0503] The server uses a means to notify the user of the generated report. The generated report is required as input, and the notification is included as output. The server communicates the report to the user using email sending and dashboard update functions.

[0504] Step 7:

[0505] The user reviews the report and sends correction instructions to the server through a conversational interface. The input is the report, and the output includes correction instructions. The user enters the details of the corrections through a chatbot or a form and submits them.

[0506] Step 8:

[0507] The server uses a means to modify the code based on the user's modification instructions. The inputs are the modification instructions and the target code, and the output includes the modified code. The server runs an automated modification script to apply the specified changes to the code.

[0508] Step 9:

[0509] The server uses a means to re-analyze the modified code. The input is the modified code, and the output includes the re-analysis result. The server again uses the AI ​​code analyzer module to analyze the modified code and confirm that the defect has been resolved.

[0510] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.

[0511] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews, detect and fix bugs early, and achieve more effective bug response by combining it with an emotion engine that recognizes user emotions. This system includes multiple means centered around a server.

[0512] System configuration and overview

[0513] 1. Collecting the Code

[0514] The server has the ability to retrieve the latest code from a version control system (e.g., Git). Users commit their developed code to a repository, and the server retrieves that code.

[0515] 2. Code Analysis

[0516] The server has an AI module that analyzes the acquired code. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code.

[0517] 3. Bug Prediction and Risk Assessment

[0518] The server has the ability to predict potential bugs in the code. Specifically, it uses neural networks to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing technology to infer the cause of the bug from comments and documentation.

[0519] 4. Emotion Recognition by Emotion Engine

[0520] The emotion engine has the ability to recognize the user's emotions. It analyzes the emotions expressed when the user checks a report or gives instructions for correction, and adjusts the system's behavior based on those emotions.

[0521] 5. Reporting and Notifications

[0522] The server generates a detailed report based on the analysis results. This report includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is then sent to the user, who can review it and make corrections as necessary. The emotion engine adjusts the notification method and content to suit the user's emotions.

[0523] 6. Corrective Instructions and Execution

[0524] After receiving the report, the user sends correction instructions to the server through an interactive interface. This interface is provided using a chatbot or a form. The server automatically corrects the code based on the user's correction instructions and commits it back to the repository. The emotion engine can adjust the priority and method of correction based on the user's emotions.

[0525] 7. Reanalyzing the bug

[0526] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[0527] Specific examples

[0528] Example 1: Code commit with new feature addition

[0529] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analysis using an AI module. Comparing it with a historical bug database, the server identifies the risk of a null pointer reference in a specific function as high risk. The server generates a report with a risk score and notifies the user. The emotion engine analyzes the user's emotions and adjusts the tone and content of the notification depending on the severity of the risk.

[0530] Example 2: Fix instructions and code fixes

[0531] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[0532] In this way, the "AI code analyzer" of this invention not only automates code reviews, but also enables more effective bug handling by taking user emotions into account. This is expected to reduce development costs and shorten time to market, as well as reduce developer stress and improve productivity.

[0533] The processing flow will be explained below.

[0534] Step 1:

[0535] The server retrieves the latest code version from the version control system (e.g., Git). Specifically, the server runs the "git pull" command to download the latest code. This process saves the latest code base to be analyzed on the server.

[0536] Step 2:

[0537] The server loads the acquired code base into memory. The server reads each code file from the file system and prepares the data to be passed to the AI ​​analysis engine. At this stage, the code dependencies and structure are checked.

[0538] Step 3:

[0539] The server starts the AI ​​analysis engine. Specifically, it loads the past bug database as a model and prepares the code for analysis. The AI ​​analysis engine is now ready to be applied.

[0540] Step 4:

[0541] The server begins code analysis, using neural networks and natural language processing techniques to thoroughly evaluate each part of the code. Specifically, it checks variable types, checks for memory references, and analyzes inconsistencies in loops and conditional branches.

[0542] Step 5:

[0543] The server predicts bugs and identifies areas of code that are particularly high risk. It calculates a risk score and lists areas with high potential for problems. Specifically, it clarifies which parts of functions and classes contain potential bugs.

[0544] Step 6:

[0545] The server generates a report based on the analysis results, which includes the location of the bug, its risk score, probable cause, and suggested fixes, and provides the report to the user.

[0546] Step 7:

[0547] The server notifies the user of the generated report. Specifically, the report contents are transmitted to the user via email or dashboard so that the user can check them. The emotion engine recognizes the user's emotions and adjusts the notification content accordingly.

[0548] Step 8:

[0549] The user checks the report and sends correction instructions to the server through a conversational interface. The user provides specific corrections using a chatbot or a dedicated form. The emotion engine adjusts correction support according to the user's emotions.

[0550] Step 9:

[0551] The server automatically modifies the code based on the user's instructions. Specifically, it initializes specified variables, modifies conditional branches, deletes unnecessary code, etc. The modified code is then verified internally.

[0552] Step 10:

[0553] The server commits the modified code back to the repository, where the new version is stored and made accessible to other team members, making the changes official.

[0554] Step 11:

[0555] The server re-analyzes the fixed code to verify that the fix was applied correctly, then performs bug prediction and risk assessment again to check for new issues, and this cycle continues until the bug is fully resolved.

[0556] Step 12:

[0557] The emotion engine analyzes user feedback and reflects it in future correction support and report generation. The system optimizes the overall operation of the system, taking into account the user's emotions and stress level. This initiative is expected to improve the user experience and improve development efficiency.

[0558] Example 2

[0559] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[0560] Conventional code review systems focus on early bug detection and correction, but rarely consider the user's emotional state. As a result, the stress of the correction process increases and productivity declines. Another issue is the inability to effectively utilize natural language processing technology or neural networks in bug risk assessment and bug cause inference. Therefore, the present invention aims to provide a system that takes user emotions into account in code analysis, enabling more effective bug prediction and correction.

[0561] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[0562] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referring to a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for recognizing a user's emotion and adjusting the system operation based on the emotion, and means for adjusting the notification method and content based on the user's emotion, thereby enabling efficient bug prediction and correction while respecting the user's emotional state.

[0563] "Means for retrieving code" refers to a function for automatically retrieving program code from a version control system.

[0564] "Means for analyzing code" refers to the function of analyzing acquired program code using analytical tools such as AI modules.

[0565] "Means for predicting bugs by referencing a database of past bugs" refers to a function that refers to a database of previously reported bugs and predicts new bugs based on that.

[0566] "Means for calculating risk score" refers to a function that evaluates and quantifies the risk of a bug existing in each part of the program code.

[0567] "Means for generating a report summarizing the analysis results" refers to the function of creating a report based on the results of code analysis that includes the location of the bug, risk score, probable cause, suggested fixes, etc.

[0568] "Means for notifying the user of the generated report" refers to a function for notifying the user of the generated report. Notification methods include email and chat apps.

[0569] "Means for receiving correction instructions from the user" refers to a function that provides an interface for receiving correction instructions from the user, such as a chatbot or form.

[0570] The "means for modifying code based on modification instructions" refers to a function for automatically modifying program code based on modification instructions received from a user.

[0571] "Means for reanalyzing modified code" refers to a function for reanalyzing modified program code and verifying that the bug has been resolved.

[0572] "Means for recognizing the user's emotions and adjusting the system's behavior based on those emotions" refers to the function of analyzing the user's emotional state and adaptively changing the system's behavior based on the results.

[0573] "Means for adjusting notification method and content based on user emotions" refers to a function that flexibly changes the tone, content, and means of notifications, taking into account the user's emotional state.

[0574] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews, detect and fix bugs early, and achieve more effective bug response by combining it with an emotion engine that recognizes user emotions. This system includes multiple means centered around a server.

[0575] Collecting Code

[0576] The server has the ability to retrieve the latest code from a version control system (e.g., Git). When a user commits the code they developed to the repository, the server automatically retrieves that code. Specifically, the latest code is retrieved using the git pull origin master command.

[0577] Code Analysis

[0578] The server has an AI module for analyzing the code it retrieves. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code. Deep learning frameworks such as TensorFlow and PyTorch are used here. Specifically, a TensorFlow model is loaded and analysis is performed using the form model.predict(new_code).

[0579] Bug prediction and risk assessment

[0580] The server uses a neural network to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing techniques (e.g., BERT or GPT) to infer the cause of the bug from comments and documentation. This evaluation involves risk_score = neural_network.evaluate(code_segment).

[0581] Emotion recognition by emotion engine

[0582] The emotion engine has the ability to recognize user emotions. It analyzes the emotions expressed when a user checks a report or makes corrections, and adjusts the system's behavior based on those emotions. Sentiment analysis utilizes open-source emotion APIs and general-purpose natural language processing models. For example, emotion = emotion_api.analyze(user_input).

[0583] Reporting and Notifications

[0584] The server generates a detailed report based on the analysis results. This report includes the bug location, risk score, probable cause, and suggested fixes. The generated report is then sent to the user via email or a chat app (e.g., Slack, Microsoft Teams). The emotion engine adjusts the content and tone of the notification based on the user's emotion. Specifically, a report is generated using report = generate_report(bug_locations, risk_scores, causes, suggestions), and notifications are sent via email or Slack API.

[0585] Corrective instruction and execution

[0586] After receiving the report, the user sends correction instructions to the server through a conversational interface (e.g., chatbot or form). The server automatically corrects the code based on the instructions and commits it back to the repository. The emotion engine adjusts the priority and method of corrections based on the user's emotions. Specifically, it parses the user's input, sets fix_command = parse_user_input(user_input), implements the corrections, and sets apply_fix(fix_command).

[0587] Bug reanalysis

[0588] The modified code is analyzed again by the server to confirm that the bug has been resolved. This cycle is repeated until the bug is completely resolved. To reanalyze, the modified code is analyzed again by the AI ​​module using the model.predict(fixed_code) method.

[0589] Specific examples

[0590] Example 1: Code commit with new feature addition

[0591] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analysis using an AI module. Comparing it with a historical bug database, the server identifies the risk of a null pointer reference in a specific function as high risk. The server generates a report with a risk score and notifies the user. The emotion engine analyzes the user's emotions and adjusts the tone and content of the notification depending on the severity of the risk.

[0592] Example prompt sentence:

[0593] "We've added a new feature. Please assess the potential bugs and risks in your code and let us know the results. Also, generate notifications based on user sentiment."

[0594] Example 2: Fix instructions and code fixes

[0595] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[0596] Example prompt sentence:

[0597] "I've seen the code report and I need to initialize a variable. This is a stressful situation and I'd like more guidance and support."

[0598] In this way, the "AI code analyzer" of this invention not only automates code reviews, but also enables more effective bug handling by taking user emotions into account. This is expected to reduce development costs and shorten time to market, as well as reduce developer stress and improve productivity.

[0599] The flow of the identification process in the second embodiment will be described with reference to FIG.

[0600] Step 1:

[0601] The server retrieves the latest code from the version control system (e.g., Git). The input to this step is the code that the user committed to the repository, and the output is the retrieved latest code. Specifically, the server executes the git pull origin master command to retrieve the latest code and saves it in a dedicated directory on the server.

[0602] Step 2:

[0603] The server launches an AI module to analyze the acquired code. The input of this step is the code acquired in step 1, and the output is the analysis result. Specifically, the server loads a TensorFlow or PyTorch model and analyzes the code using model.predict(new_code).

[0604] Step 3:

[0605] The server uses a neural network to predict bugs in the code and calculate a risk score. The input to this step is the analysis result obtained in step 2, and the output is the risk score of the bug. Specifically, the server performs a risk assessment based on the analysis result in the form risk_score = neural_network.evaluate(code_segment).

[0606] Step 4:

[0607] The emotion engine recognizes the user's emotions. The input to this step is the user's language and actions when checking the report or giving correction instructions, and the output is the user's emotional state. Specifically, the emotion engine uses an emotion analysis model to analyze the user's emotions in the form emotion = emotion_api.analyze(user_input).

[0608] Step 5:

[0609] The server generates a detailed report based on the analysis results and notifies the user. The inputs to this step are the risk score and analysis results obtained in step 3, as well as the user's emotional state, and the output is the generated report and notification. Specifically, the server generates a report in the form of report = generate_report(bug_locations, risk_scores, causes, suggestions), and notifies the user via email or Slack API.

[0610] Step 6:

[0611] The user receives the report and sends correction instructions to the server through an interactive interface. The input of this step is the user's correction instructions, and the output is the instructions sent to the server. Specifically, the user's input is parsed and instructions are generated in the form fix_command = parse_user_input(user_input).

[0612] Step 7:

[0613] The server modifies the code based on the fix instructions and commits it to the repository again. The input to this step is the fix instructions obtained in step 6, and the output is a commit of the modified code. Specifically, the server makes the fix in the form of apply_fix(fix_command) and executes the git commit and git push commands.

[0614] Step 8:

[0615] The server analyzes the modified code again to see if the bug has been resolved. The input to this step is the code modified in step 7, and the output is the result of the reanalysis. Specifically, the server uses the AI ​​module again to perform a reanalysis in the form of model.predict(fixed_code). This reanalysis then verifies whether the bug has been resolved.

[0616] (Application example 2)

[0617] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."

[0618] Conventional code review systems lack efficient methods for detecting code bugs and adequate notification and correction support that takes into account the user's emotional state. As a result, detecting and correcting bugs requires a great deal of time and effort, often causing developers high levels of stress. Rapid and accurate bug response is essential, particularly in workplaces where improving the reliability of factory robot software and work efficiency is required.

[0619] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[0620] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referring to a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for recognizing the user's emotion, and means for adjusting the notification method and content of the report according to the user's emotion, thereby enabling efficient detection and correction of code bugs and notification and support according to the user's emotional state.

[0621] "Means" refers to a method or device for achieving a specific function or purpose.

[0622] "Code retrieval methods" refers to the methods or processes used to gather the latest code from a version control system or other repository.

[0623] "Means for analyzing code" refers to methods and tools for automatically analyzing software code and evaluating its quality and problems.

[0624] "Means for predicting bugs by referencing a database of past bugs" refers to methods or algorithms for predicting potential new bugs based on past bug data.

[0625] "Means for calculating risk scores" refers to methods or calculation processes for quantifying and assessing the impact and probability of occurrence of potential issues in the code.

[0626] "Means for generating a report summarizing the analysis results" refers to methods and tools for organizing the results of code analysis and creating a clearly written document (report).

[0627] "Means for notifying a user of a generated report" refers to a method or system for notifying a user of a generated report.

[0628] The "means for receiving a user's modification instruction" refers to an interface or method for receiving a code modification instruction from a user.

[0629] "Means for modifying code based on modification instructions" refers to a method or system for automatically modifying code based on user instructions.

[0630] "Means for reanalyzing modified code" refers to methods or tools for reanalyzing the modified code and verifying that the modifications were made correctly.

[0631] "Means for recognizing a user's emotion" refers to a method or technology for analyzing a user's emotional state and identifying that emotion.

[0632] "Means for adjusting the notification method and content of a report according to the user's emotions" refers to a method or technology for dynamically changing the notification method and content based on the user's emotional state.

[0633] The present invention is a system for efficiently analyzing software code for factory robots to enable early detection and correction of bugs. This system includes multiple means for retrieving code from a version control system and automatically analyzing it. It also has a function for recognizing user emotions and adjusting the notification method and content of reports based on those emotions. A specific embodiment of this system is described below.

[0634] System configuration and overview

[0635] 1. Collecting the Code

[0636] The server retrieves the latest code from the version control system (e.g., Git). This process pulls the user-developed code from the repository and makes it available for subsequent analysis.

[0637] 2. Code Analysis

[0638] The server has an AI module that analyzes the acquired code. This module uses TensorFlow to learn from a database of past bugs and uses that knowledge when analyzing new code. Specifically, it evaluates each part of the code and calculates a risk score for the defect.

[0639] 3. Bug Prediction and Risk Assessment

[0640] The server uses neural networks to predict potential bugs in the code, calculates a risk score, and uses natural language processing techniques to infer the cause of the bug from comments and documentation.

[0641] 4. Emotion Recognition by Emotion Engine

[0642] The server analyzes user emotions using the BERT model, and the emotion engine recognizes the emotions users feel when reviewing reports or making corrections, and adjusts the system's behavior based on those emotions.

[0643] 5. Reporting and Notifications

[0644] The server generates a detailed report based on the analysis results. The report includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is sent to the user's device via an HTTP request. The emotion engine adjusts the notification method and content appropriately according to the user's emotion.

[0645] 6. Corrective Instructions and Execution

[0646] The user checks the report and sends correction instructions to the server using a conversational interface (e.g., chatbot function). The server automatically corrects the code based on the user's instructions and commits it back to the repository. The emotion engine can adjust the priority and method of correction based on the user's emotions.

[0647] 7. Reanalyzing the bug

[0648] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[0649] Specific examples

[0650] Example 1: Code commit with new feature addition

[0651] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[0652] Example 2: Fix instructions and code fixes

[0653] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[0654] Examples of prompt statements

[0655] Prompt statement:

[0656] Please analyze the code below and let me know the potential bugs and their risk scores.

[0657] code:

[0658] python

[0659] def example_function(param1, param2):

[0660] if param1 is None:

[0661] return "Error"

[0662] result = param1 + param2

[0663] return result

[0664] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[0665] Step 1:

[0666] The server collects the latest code from a version control system (e.g., Git). Specifically, it accesses the repository using the Git API and retrieves the latest commits. This requires the repository URL as input and the retrieved code files as output.

[0667] Step 2:

[0668] The server loads a TensorFlow-powered AI model to analyze the captured code. This AI model is trained on a database of past bugs and evaluates each piece of code. It uses the captured code file as input and produces a predicted bug result and risk score as output.

[0669] Step 3:

[0670] The server uses neural networks to predict bugs and assess risk. Specifically, it analyzes each section of code and calculates the probability and impact of potential bugs. The input is the text data of the code, and the output is a risk score.

[0671] Step 4:

[0672] The server uses natural language processing technology to infer the cause of bugs from comments and documentation in the code. Specifically, it uses the BERT model to analyze text data and identify the cause of the bug. The text data from comments and documentation is used as input, and the inferred cause is obtained as output.

[0673] Step 5:

[0674] The server generates a detailed report based on the analysis results, including the bug location, risk score, probable cause, and fix suggestions. The bug prediction results and risk score are used as input, and the report is obtained as output.

[0675] Step 6:

[0676] The server uses an emotion engine to analyze the user's emotions. Specifically, it evaluates the user's input text using the BERT model to identify the user's emotional state. The user's text data is used as input, and the emotion evaluation result is obtained as output.

[0677] Step 7:

[0678] The server adjusts the notification method and content of the generated report according to the emotion and sends it to the user. Specifically, if the user's emotional state is stressed, detailed explanations and supporting information are added. The emotion assessment results are used as input, and the adjusted report is obtained as output.

[0679] Step 8:

[0680] The user checks the notified report and sends correction instructions to the server using an interactive interface. Specifically, the user enters specific corrections using a chatbot or form. The user's correction instructions are used as input, and the instructions are sent to the server as output.

[0681] Step 9:

[0682] The server modifies the code based on the user's instructions and commits it back to the repository, using the user's instructions as input and the modified code as output.

[0683] Step 10:

[0684] The server then re-analyzes the modified code to verify that the bug has been resolved. The modified code file is used as input and run through the AI ​​model again. The output is a verification result that indicates whether the modifications were correct.

[0685] The specific processing unit 290 transmits the result of the specific processing to the smart glasses 214. In the smart glasses 214, the control unit 46A causes the speaker 240 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.

[0686] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[0687] In the above embodiment, an example in which the specific processing is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the smart glasses 214.

[0688] [Third embodiment]

[0689] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.

[0690] 5, the data processing system 310 includes the data processing device 12 and a headset type terminal 314. An example of the data processing device 12 is a server.

[0691] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0692] The headset type terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the display 343 are also connected to the bus 52.

[0693] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.

[0694] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).

[0695] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.

[0696] Fig. 6 shows an example of the main functions of the data processing device 12 and the headset type terminal 314. As shown in Fig. 6, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.

[0697] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[0698] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[0699] In the headset type terminal 314, a reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[0700] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the headset type terminal 314 will be referred to as the "terminal."

[0701] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews and to quickly find and fix bugs. This system includes multiple means centered around a server.

[0702] System configuration and overview

[0703] 1. Collecting the Code

[0704] The server has the ability to retrieve the latest code from a version control system (e.g., Git). Users commit their developed code to a repository, and the server retrieves that code.

[0705] 2. Code Analysis

[0706] The server has an AI module that analyzes the acquired code. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code.

[0707] 3. Bug Prediction and Risk Assessment

[0708] The server has the ability to predict potential bugs in the code. Specifically, it uses neural networks to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing technology to infer the cause of the bug from comments and documentation.

[0709] 4. Report Generation

[0710] The server generates a detailed report based on the analysis results, including the location of the bug, its risk score, the probable cause, and suggested fixes. The generated report is then sent to the user, who can review the report and make any necessary corrections.

[0711] 5. Instructions for correction and implementation

[0712] After receiving the report, the user sends correction instructions to the server through an interactive interface, which can be provided using a chatbot or a form. The server then automatically corrects the code based on the user's instructions and commits them back to the repository.

[0713] 6. Reanalyzing the bug

[0714] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[0715] Specific examples

[0716] Example 1: Code commit with new feature addition

[0717] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[0718] Example 2: Fix instructions and code fixes

[0719] The user reviews the report and determines that a variable needs to be initialized. The user uses an interactive interface to submit fix instructions to the server. The server then modifies the code based on the instructions and commits it back to the repository. The modified code is then analyzed again to verify that the problem has been resolved.

[0720] As a result, the "AI code analyzer" of this invention enables efficient code review and early bug detection and correction, reducing development costs and shortening time to market. This system is also a general-purpose solution that can be applied to a wide range of organizations involved in software development.

[0721] The processing flow will be explained below.

[0722] Step 1:

[0723] The server retrieves the latest code version from the repository. Specifically, the server runs the "git pull" command to download the latest code from the version control system, resulting in the latest code base to analyze.

[0724] Step 2:

[0725] The server reads the acquired code base into memory, reads the necessary code files from the file system, and prepares them for passing to the analysis engine, where the code dependencies and structure are checked.

[0726] Step 3:

[0727] The server starts the AI ​​analysis engine, specifically loading the past bug database into the model and preparing the code for analysis, which makes the AI ​​module available for application.

[0728] Step 4:

[0729] The server begins code analysis, using neural networks and natural language processing techniques to evaluate each section of code, checking variable types, checking for memory references, and analyzing inconsistencies in loops and conditional branches.

[0730] Step 5:

[0731] The server performs bug prediction, identifies particularly high-risk areas in the code, and calculates a risk score. Specifically, it predicts which parts of functions or classes have potential bugs.

[0732] Step 6:

[0733] The server generates a report based on the analysis results, which includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is used for subsequent fixes.

[0734] Step 7:

[0735] The server notifies the user of the generated report. The report contents are sent to the user via email or dashboard, and the user is alerted to the report, allowing the user to identify areas that need to be corrected.

[0736] Step 8:

[0737] The user reviews the report and sends correction instructions to the server through a conversational interface. Specific instructions for corrections are provided using a chatbot or a dedicated form.

[0738] Step 9:

[0739] The server automatically modifies the code based on the user's instructions. Specifically, it initializes specified variables, modifies conditional branches, deletes unnecessary code, etc. The modified code is then verified internally.

[0740] Step 10:

[0741] The server commits the modified code back to the repository, where the new version is stored and made accessible to other team members, making the changes official.

[0742] Step 11:

[0743] The server re-analyzes the fixed code to verify that the fix was applied correctly, then performs bug prediction and risk assessment again to check for new issues, and this cycle continues until the bug is fully resolved.

[0744] Example 1

[0745] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[0746] Improving the efficiency of code reviews and early bug detection and correction are important issues for improving software development quality and adhering to schedules. However, manual code review and bug correction is time-consuming and labor-intensive, resulting in increased development costs and release delays. There is also a risk that human error by inexperienced developers could lead to bugs. Therefore, there is a need for a system that automates code reviews and efficiently and quickly detects and corrects bugs.

[0747] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[0748] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referencing a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for automatically acquiring the latest code from a version control system, means for parsing and analyzing the code using an AI module, means for accepting user instructions through an interactive interface, and means for executing a generative AI model, thereby enabling efficient code reviews and early bug detection and correction.

[0749] The "means for retrieving code" is a mechanism for automatically retrieving the latest code from the version control system.

[0750] The "means for analyzing the code" is a mechanism for analyzing the acquired code and identifying potential problems.

[0751] "Means for predicting bugs by referring to a database of past bugs" is a mechanism for predicting bugs that may be lurking in new code based on data on bugs that have occurred in the past.

[0752] The "means for calculating a risk score" is a mechanism for quantifying and assessing the risk of a predicted bug.

[0753] The "means for generating a report summarizing the analysis results" is a mechanism for creating a detailed report based on the analysis results.

[0754] The "means for notifying the user of the generated report" is a mechanism for notifying the user of the generated report.

[0755] The "means for receiving a user's correction instruction" is a mechanism including an interface for receiving a correction instruction from a user.

[0756] The "means for modifying code based on modification instructions" is a mechanism for automatically modifying code based on modification instructions from a user.

[0757] The "means for reanalyzing the modified code" is a mechanism for reanalyzing the modified code to verify whether the modifications were made correctly.

[0758] "Means for automatically obtaining the latest code from the version control system" is a mechanism for automatically obtaining newly committed code from the version control system.

[0759] "Means for parsing and analyzing code using an AI module" refers to a mechanism for performing structural analysis of code in order to analyze the code using AI technology.

[0760] The "means for accepting user instructions through an interactive interface" is a mechanism that provides an interactive interface for the user to input correction instructions.

[0761] The "means for executing a generative AI model" is a mechanism for executing a pre-trained AI model for code analysis and bug prediction.

[0762] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews and to detect and fix bugs early. This system includes multiple means centered around a server.

[0763] The system of the present invention has a mechanism for performing a series of processes, including code acquisition, analysis, bug prediction, report generation, correction, and reanalysis. The main components include a server, a user terminal, a version control system, an AI module, and an interactive interface.

[0764] Collecting Code

[0765] The server automatically retrieves the latest code from a version control system (e.g., Git). When a user commits new code to a repository using a terminal, the server automatically retrieves that code. A common example of this process is to use the git pull command.

[0766] Code Analysis

[0767] The server uses an AI module to analyze the acquired code. This AI module is trained based on a database of past bugs and uses that knowledge when analyzing newly acquired code. The server loads a machine learning model (e.g., a TensorFlow model) to parse and analyze the code.

[0768] Bug prediction and risk assessment

[0769] The server uses neural networks to predict potential bugs in the code, and natural language processing techniques to infer the cause of the bug from comments and documentation, evaluating each piece of code and calculating a risk score for the defect.

[0770] Report Generation

[0771] The server generates a detailed report based on the analysis results, including the location of the bug, a risk score, a probable cause, and suggested fixes. The report is then sent to the user via email or a dedicated dashboard application.

[0772] Corrective instruction and execution

[0773] The user checks the report received from the server and sends any necessary correction instructions to the server through an interactive interface (such as a chatbot or a dedicated form). The server automatically corrects the code based on the user's correction instructions and commits it back to the repository. The corrected code is then re-analyzed to confirm that the corrections were made correctly.

[0774] Bug reanalysis

[0775] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this process is repeated until the bug is completely eliminated.

[0776] Specific examples

[0777] Example 1: Code commit with new feature addition

[0778] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[0779] Example 2: Fix instructions and code fixes

[0780] The user reviews the report and determines that a variable needs to be initialized. The user uses an interactive interface to submit fix instructions to the server. The server then modifies the code based on the instructions and commits it back to the repository. The modified code is then analyzed again to verify that the problem has been resolved.

[0781] Prompt Sentence Examples

[0782] "After adding a new feature, I committed the code to the repository. Please analyze this code for potential bugs and their risk scores and generate a report."

[0783] With the above configuration, this system enables efficient code review and enables early detection and correction of bugs, thereby reducing development costs and shortening time to market.

[0784] The flow of the identification process in the first embodiment will be described with reference to FIG.

[0785] Processing step flow

[0786] Step 1: Collect the code

[0787] The server automatically retrieves new code that the user commits to a version control system (e.g., Git) using a terminal. In this process, the server periodically monitors the repository and retrieves the latest code when it is committed using the git pull command. The input is the new code committed by the user, and the output is the latest code retrieved by the server.

[0788] Step 2: Code Analysis

[0789] To analyze the acquired code, the server initializes the AI ​​module and starts the analysis process. The AI ​​module contains a pre-trained machine learning model (e.g., TensorFlow model), parses the code, and passes it to the machine learning model. The input is the code acquired by the server, and the output is the parsed code data. The server breaks the acquired code into tokens and passes the extracted token data to the AI ​​module for analysis.

[0790] Step 3: Bug prediction and risk assessment

[0791] The server uses an AI module to predict potential bugs in the analyzed code and calculates a risk score for the defects. In this process, the server uses a neural network to evaluate each part of the code while referencing a database of past bugs. It also uses natural language processing technology to infer the cause of the bug from comments and documentation. The input is the analyzed code data, and the output is a list of predicted bugs and their risk scores.

[0792] Step 4: Generate a report

[0793] The server generates a detailed report based on the results of bug prediction and risk assessment. This report includes the bug location, risk score, probable cause, and fix suggestions. The generated report is notified to the user and displayed via a dashboard application or email. The input is the risk score and bug location data, and the output is the generated report.

[0794] Step 5: Corrective action and implementation

[0795] The user checks the report received from the server and sends any necessary correction instructions to the server through an interactive interface. The server receives the user's correction instructions and automatically corrects the code based on the correction instructions. The interactive interface used in this step includes, for example, a chatbot or a dedicated form. The input is the user's correction instructions, and the output is the corrected code.

[0796] Step 6: Reanalyze the bug

[0797] The server then re-analyzes the modified code and verifies that the bug has been resolved. This process is repeated until the bug is completely eliminated. If the re-analysis determines that no further fixes are necessary, a final report is generated and the user is notified. The input is the modified code, and the output is a report confirming that the bug has been resolved.

[0798] The above processing steps efficiently execute a series of processes from code collection to bug correction and reanalysis, enabling rapid detection and correction.

[0799] (Application example 1)

[0800] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[0801] In software development, code review, bug detection, and correction are very important processes, but doing them manually takes a lot of time and effort. This problem is particularly serious in the control systems of robots used in factories, where a malfunction can affect the operation of the entire manufacturing line. Therefore, there is a need for technology to perform this process quickly and efficiently.

[0802] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[0803] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting defects by referencing a database of past defects, means for performing risk assessment, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving correction instructions from the user, means for correcting the code based on the correction instructions, means for reanalyzing the corrected code, and means for reviewing and correcting code efficiently by being installed on robots for factory control system code, thereby enabling early detection and rapid correction of defects and stable operation of factory robots.

[0804] The "means for obtaining code" is a means that has the function of collecting the latest code from a repository such as a version control system.

[0805] "Means for analyzing code" refers to a function that analyzes collected code and understands its content and structure.

[0806] The "means for predicting defects by referring to a database of past defects" has the function of predicting defects that may be lurking in newly collected code based on information about defects that have occurred in the past.

[0807] The "means for performing risk assessment" has the function of quantitatively assessing the risk of malfunctions occurring based on the analysis results.

[0808] The "means for generating a report summarizing the analysis results" has a function for summarizing the results of code analysis and risk assessment into a single report.

[0809] The "means for notifying the user of the generated report" has a function for notifying the user of the generated report.

[0810] The "means for receiving a user's instruction for correction" has a function for receiving instructions from a user regarding code correction.

[0811] The "means for correcting code based on correction instructions" has a function for automatically correcting code according to the correction content instructed by the user.

[0812] The "means for reanalyzing the modified code" refers to a function that reanalyzes the code after the modification has been made to check the appropriateness of the modification and whether any new defects have been found.

[0813] "Factory control system code" refers to the source code used to control robots and machines in a factory.

[0814] "A means to be installed in a robot to make code review and correction more efficient" is something that is installed in a robot and has the function of evaluating and correcting the robot's own code, thereby making review and correction more efficient.

[0815] This invention is a system that improves the efficiency of code reviews and the early detection and correction of bugs in factory control system code. Installed on factory robots, this system automatically collects, analyzes, evaluates, reports, and corrects code.

[0816] The server first retrieves the latest code from the repository. For this purpose, a version control system (e.g., Git) is used. The retrieved code is sent to the server, where it is analyzed by an AI code analyzer module. This module uses a neural network to learn from a database of past defects, and utilizes that knowledge when analyzing new code.

[0817] The server evaluates the risk of the defect based on the analysis results and calculates a risk score. It can also use natural language processing technology to infer the cause of the defect from comments and documents. This generates a detailed report including specific causes and countermeasures. The generated report is then sent to the user by the server.

[0818] The user reviews the submitted report and sends any necessary correction instructions to the server via an interactive interface (such as a chatbot or form). The server automatically corrects the code based on the correction instructions and commits it back to the repository. The corrected code is then reanalyzed to confirm that the bug has been resolved. This cycle is repeated until the bug is completely resolved.

[0819] The hardware used includes the factory robot control system and the server or administrator's device (such as a smartphone or PC), and the software used includes Python, an AI code analyzer (AICodeAnalyzer module), a report generator (ReportGenerator module), and Git (a version control system).

[0820] Consider the following scenario: New control code is committed to a repository to process a new product on a factory production line. This system is used to retrieve the latest control code and analyze it with an AI code analyzer. Based on a database of past defects, the AI ​​identifies parts of the code that are assessed as high risk, generates a report with a risk score and suggested fixes, and notifies the administrator via email.

[0821] An example of a prompt for a generative AI model is, "Analyze the control code of a newly committed factory robot and identify any potential bugs. Compile a report with a risk assessment and suggested fixes based on a database of past bugs, along with a risk score."

[0822] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[0823] Step 1:

[0824] The server uses a means to retrieve the latest code from a version control system (e.g., Git). As input, it requires the URL of the repository, and as output, it contains the retrieved code. The server uses the git clone command to clone the repository locally and gather the latest code.

[0825] Step 2:

[0826] The server uses a means to analyze the retrieved code. As input, it requires the latest code file, and as output, it contains the analysis results. The server uses a Python script to analyze the contents of the code file, analyzing its structure, function calls, etc.

[0827] Step 3:

[0828] The server uses a means to refer to a database of past defects and predict defects. The input requires information on the analyzed code and the database of past defects, and the output includes the defect prediction results. The server uses an AI code analyzer module to predict the possibility of defects using a neural network model.

[0829] Step 4:

[0830] The server uses a means for risk assessment and calculates a risk score. The input is the failure prediction result, and the output includes a risk score. The server quantifies the risk of each part from the analysis result and assigns a score.

[0831] Step 5:

[0832] The server uses a means to generate a report summarizing the analysis results. The inputs include risk scores and defect prediction results, and the output includes a detailed report. The server uses a report generator to create a report that includes risk scores, defect causes, and suggested fixes.

[0833] Step 6:

[0834] The server uses a means to notify the user of the generated report. The generated report is required as input, and the notification is included as output. The server communicates the report to the user using email sending and dashboard update functions.

[0835] Step 7:

[0836] The user reviews the report and sends correction instructions to the server through a conversational interface. The input is the report, and the output includes correction instructions. The user enters the details of the corrections through a chatbot or a form and submits them.

[0837] Step 8:

[0838] The server uses a means to modify the code based on the user's modification instructions. The inputs are the modification instructions and the target code, and the output includes the modified code. The server runs an automated modification script to apply the specified changes to the code.

[0839] Step 9:

[0840] The server uses a means to re-analyze the modified code. The input is the modified code, and the output includes the re-analysis result. The server again uses the AI ​​code analyzer module to analyze the modified code and confirm that the defect has been resolved.

[0841] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.

[0842] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews, detect and fix bugs early, and achieve more effective bug response by combining it with an emotion engine that recognizes user emotions. This system includes multiple means centered around a server.

[0843] System configuration and overview

[0844] 1. Collecting the Code

[0845] The server has the ability to retrieve the latest code from a version control system (e.g., Git). Users commit their developed code to a repository, and the server retrieves that code.

[0846] 2. Code Analysis

[0847] The server has an AI module that analyzes the acquired code. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code.

[0848] 3. Bug Prediction and Risk Assessment

[0849] The server has the ability to predict potential bugs in the code. Specifically, it uses neural networks to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing technology to infer the cause of the bug from comments and documentation.

[0850] 4. Emotion Recognition by Emotion Engine

[0851] The emotion engine has the ability to recognize the user's emotions. It analyzes the emotions expressed when the user checks a report or gives instructions for correction, and adjusts the system's behavior based on those emotions.

[0852] 5. Reporting and Notifications

[0853] The server generates a detailed report based on the analysis results. This report includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is then sent to the user, who can review it and make corrections as necessary. The emotion engine adjusts the notification method and content to suit the user's emotions.

[0854] 6. Corrective Instructions and Execution

[0855] After receiving the report, the user sends correction instructions to the server through an interactive interface. This interface is provided using a chatbot or a form. The server automatically corrects the code based on the user's correction instructions and commits it back to the repository. The emotion engine can adjust the priority and method of correction based on the user's emotions.

[0856] 7. Reanalyzing the bug

[0857] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[0858] Specific examples

[0859] Example 1: Code commit with new feature addition

[0860] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analysis using an AI module. Comparing it with a historical bug database, the server identifies the risk of a null pointer reference in a specific function as high risk. The server generates a report with a risk score and notifies the user. The emotion engine analyzes the user's emotions and adjusts the tone and content of the notification depending on the severity of the risk.

[0861] Example 2: Fix instructions and code fixes

[0862] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[0863] In this way, the "AI code analyzer" of this invention not only automates code reviews, but also enables more effective bug handling by taking user emotions into account. This is expected to reduce development costs and shorten time to market, as well as reduce developer stress and improve productivity.

[0864] The processing flow will be explained below.

[0865] Step 1:

[0866] The server retrieves the latest code version from the version control system (e.g., Git). Specifically, the server runs the "git pull" command to download the latest code. This process saves the latest code base to be analyzed on the server.

[0867] Step 2:

[0868] The server loads the acquired code base into memory. The server reads each code file from the file system and prepares the data to be passed to the AI ​​analysis engine. At this stage, the code dependencies and structure are checked.

[0869] Step 3:

[0870] The server starts the AI ​​analysis engine. Specifically, it loads the past bug database as a model and prepares the code for analysis. The AI ​​analysis engine is now ready to be applied.

[0871] Step 4:

[0872] The server begins code analysis, using neural networks and natural language processing techniques to thoroughly evaluate each part of the code. Specifically, it checks variable types, checks for memory references, and analyzes inconsistencies in loops and conditional branches.

[0873] Step 5:

[0874] The server predicts bugs and identifies areas of code that are particularly high risk. It calculates a risk score and lists areas with high potential for problems. Specifically, it clarifies which parts of functions and classes contain potential bugs.

[0875] Step 6:

[0876] The server generates a report based on the analysis results, which includes the location of the bug, its risk score, probable cause, and suggested fixes, and provides the report to the user.

[0877] Step 7:

[0878] The server notifies the user of the generated report. Specifically, the report contents are transmitted to the user via email or dashboard so that the user can check them. The emotion engine recognizes the user's emotions and adjusts the notification content accordingly.

[0879] Step 8:

[0880] The user checks the report and sends correction instructions to the server through a conversational interface. The user provides specific corrections using a chatbot or a dedicated form. The emotion engine adjusts correction support according to the user's emotions.

[0881] Step 9:

[0882] The server automatically modifies the code based on the user's instructions. Specifically, it initializes specified variables, modifies conditional branches, deletes unnecessary code, etc. The modified code is then verified internally.

[0883] Step 10:

[0884] The server commits the modified code back to the repository, where the new version is stored and made accessible to other team members, making the changes official.

[0885] Step 11:

[0886] The server re-analyzes the fixed code to verify that the fix was applied correctly, then performs bug prediction and risk assessment again to check for new issues, and this cycle continues until the bug is fully resolved.

[0887] Step 12:

[0888] The emotion engine analyzes user feedback and reflects it in future correction support and report generation. The system optimizes the overall operation of the system, taking into account the user's emotions and stress level. This initiative is expected to improve the user experience and improve development efficiency.

[0889] Example 2

[0890] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[0891] Conventional code review systems focus on early bug detection and correction, but rarely consider the user's emotional state. As a result, the stress of the correction process increases and productivity declines. Another issue is the inability to effectively utilize natural language processing technology or neural networks in bug risk assessment and bug cause inference. Therefore, the present invention aims to provide a system that takes user emotions into account in code analysis, enabling more effective bug prediction and correction.

[0892] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[0893] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referring to a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for recognizing a user's emotion and adjusting the system operation based on the emotion, and means for adjusting the notification method and content based on the user's emotion, thereby enabling efficient bug prediction and correction while respecting the user's emotional state.

[0894] "Means for retrieving code" refers to a function for automatically retrieving program code from a version control system.

[0895] "Means for analyzing code" refers to the function of analyzing acquired program code using analytical tools such as AI modules.

[0896] "Means for predicting bugs by referencing a database of past bugs" refers to a function that refers to a database of previously reported bugs and predicts new bugs based on that.

[0897] "Means for calculating risk score" refers to a function that evaluates and quantifies the risk of a bug existing in each part of the program code.

[0898] "Means for generating a report summarizing the analysis results" refers to the function of creating a report based on the results of code analysis that includes the location of the bug, risk score, probable cause, suggested fixes, etc.

[0899] "Means for notifying the user of the generated report" refers to a function for notifying the user of the generated report. Notification methods include email and chat apps.

[0900] "Means for receiving correction instructions from the user" refers to a function that provides an interface for receiving correction instructions from the user, such as a chatbot or form.

[0901] The "means for modifying code based on modification instructions" refers to a function for automatically modifying program code based on modification instructions received from a user.

[0902] "Means for reanalyzing modified code" refers to a function for reanalyzing modified program code and verifying that the bug has been resolved.

[0903] "Means for recognizing the user's emotions and adjusting the system's behavior based on those emotions" refers to the function of analyzing the user's emotional state and adaptively changing the system's behavior based on the results.

[0904] "Means for adjusting notification method and content based on user emotions" refers to a function that flexibly changes the tone, content, and means of notifications, taking into account the user's emotional state.

[0905] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews, detect and fix bugs early, and achieve more effective bug response by combining it with an emotion engine that recognizes user emotions. This system includes multiple means centered around a server.

[0906] Collecting Code

[0907] The server has the ability to retrieve the latest code from a version control system (e.g., Git). When a user commits the code they developed to the repository, the server automatically retrieves that code. Specifically, the latest code is retrieved using the git pull origin master command.

[0908] Code Analysis

[0909] The server has an AI module for analyzing the code it retrieves. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code. Deep learning frameworks such as TensorFlow and PyTorch are used here. Specifically, a TensorFlow model is loaded and analysis is performed using the form model.predict(new_code).

[0910] Bug prediction and risk assessment

[0911] The server uses a neural network to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing techniques (e.g., BERT or GPT) to infer the cause of the bug from comments and documentation. This evaluation involves risk_score = neural_network.evaluate(code_segment).

[0912] Emotion recognition by emotion engine

[0913] The emotion engine has the ability to recognize user emotions. It analyzes the emotions expressed when a user checks a report or makes corrections, and adjusts the system's behavior based on those emotions. Sentiment analysis utilizes open-source emotion APIs and general-purpose natural language processing models. For example, emotion = emotion_api.analyze(user_input).

[0914] Reporting and Notifications

[0915] The server generates a detailed report based on the analysis results. This report includes the bug location, risk score, probable cause, and suggested fixes. The generated report is then sent to the user via email or a chat app (e.g., Slack, Microsoft Teams). The emotion engine adjusts the content and tone of the notification based on the user's emotion. Specifically, a report is generated using report = generate_report(bug_locations, risk_scores, causes, suggestions), and notifications are sent via email or Slack API.

[0916] Corrective instruction and execution

[0917] After receiving the report, the user sends correction instructions to the server through a conversational interface (e.g., chatbot or form). The server automatically corrects the code based on the instructions and commits it back to the repository. The emotion engine adjusts the priority and method of corrections based on the user's emotions. Specifically, it parses the user's input, sets fix_command = parse_user_input(user_input), implements the corrections, and sets apply_fix(fix_command).

[0918] Bug reanalysis

[0919] The modified code is analyzed again by the server to confirm that the bug has been resolved. This cycle is repeated until the bug is completely resolved. To reanalyze, the modified code is analyzed again by the AI ​​module using the model.predict(fixed_code) method.

[0920] Specific examples

[0921] Example 1: Code commit with new feature addition

[0922] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analysis using an AI module. Comparing it with a historical bug database, the server identifies the risk of a null pointer reference in a specific function as high risk. The server generates a report with a risk score and notifies the user. The emotion engine analyzes the user's emotions and adjusts the tone and content of the notification depending on the severity of the risk.

[0923] Example prompt sentence:

[0924] "We've added a new feature. Please assess the potential bugs and risks in your code and let us know the results. Also, generate notifications based on user sentiment."

[0925] Example 2: Fix instructions and code fixes

[0926] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[0927] Example prompt sentence:

[0928] "I've seen the code report and I need to initialize a variable. This is a stressful situation and I'd like more guidance and support."

[0929] In this way, the "AI code analyzer" of this invention not only automates code reviews, but also enables more effective bug handling by taking user emotions into account. This is expected to reduce development costs and shorten time to market, as well as reduce developer stress and improve productivity.

[0930] The flow of the identification process in the second embodiment will be described with reference to FIG.

[0931] Step 1:

[0932] The server retrieves the latest code from the version control system (e.g., Git). The input to this step is the code that the user committed to the repository, and the output is the retrieved latest code. Specifically, the server executes the git pull origin master command to retrieve the latest code and saves it in a dedicated directory on the server.

[0933] Step 2:

[0934] The server launches an AI module to analyze the acquired code. The input of this step is the code acquired in step 1, and the output is the analysis result. Specifically, the server loads a TensorFlow or PyTorch model and analyzes the code using model.predict(new_code).

[0935] Step 3:

[0936] The server uses a neural network to predict bugs in the code and calculate a risk score. The input to this step is the analysis result obtained in step 2, and the output is the risk score of the bug. Specifically, the server performs a risk assessment based on the analysis result in the form risk_score = neural_network.evaluate(code_segment).

[0937] Step 4:

[0938] The emotion engine recognizes the user's emotions. The input to this step is the user's language and actions when checking the report or giving correction instructions, and the output is the user's emotional state. Specifically, the emotion engine uses an emotion analysis model to analyze the user's emotions in the form emotion = emotion_api.analyze(user_input).

[0939] Step 5:

[0940] The server generates a detailed report based on the analysis results and notifies the user. The inputs to this step are the risk score and analysis results obtained in step 3, as well as the user's emotional state, and the output is the generated report and notification. Specifically, the server generates a report in the form of report = generate_report(bug_locations, risk_scores, causes, suggestions), and notifies the user via email or Slack API.

[0941] Step 6:

[0942] The user receives the report and sends correction instructions to the server through an interactive interface. The input of this step is the user's correction instructions, and the output is the instructions sent to the server. Specifically, the user's input is parsed and instructions are generated in the form fix_command = parse_user_input(user_input).

[0943] Step 7:

[0944] The server modifies the code based on the fix instructions and commits it to the repository again. The input to this step is the fix instructions obtained in step 6, and the output is a commit of the modified code. Specifically, the server makes the fix in the form of apply_fix(fix_command) and executes the git commit and git push commands.

[0945] Step 8:

[0946] The server analyzes the modified code again to see if the bug has been resolved. The input to this step is the code modified in step 7, and the output is the result of the reanalysis. Specifically, the server uses the AI ​​module again to perform a reanalysis in the form of model.predict(fixed_code). This reanalysis then verifies whether the bug has been resolved.

[0947] (Application example 2)

[0948] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."

[0949] Conventional code review systems lack efficient methods for detecting code bugs and adequate notification and correction support that takes into account the user's emotional state. As a result, detecting and correcting bugs requires a great deal of time and effort, often causing developers high levels of stress. Rapid and accurate bug response is essential, particularly in workplaces where improving the reliability of factory robot software and work efficiency is required.

[0950] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[0951] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referring to a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for recognizing the user's emotion, and means for adjusting the notification method and content of the report according to the user's emotion, thereby enabling efficient detection and correction of code bugs and notification and support according to the user's emotional state.

[0952] "Means" refers to a method or device for achieving a specific function or purpose.

[0953] "Code retrieval methods" refers to the methods or processes used to gather the latest code from a version control system or other repository.

[0954] "Means for analyzing code" refers to methods and tools for automatically analyzing software code and evaluating its quality and problems.

[0955] "Means for predicting bugs by referencing a database of past bugs" refers to methods or algorithms for predicting potential new bugs based on past bug data.

[0956] "Means for calculating risk scores" refers to methods or calculation processes for quantifying and assessing the impact and probability of occurrence of potential issues in the code.

[0957] "Means for generating a report summarizing the analysis results" refers to methods and tools for organizing the results of code analysis and creating a clearly written document (report).

[0958] "Means for notifying a user of a generated report" refers to a method or system for notifying a user of a generated report.

[0959] The "means for receiving a user's modification instruction" refers to an interface or method for receiving a code modification instruction from a user.

[0960] "Means for modifying code based on modification instructions" refers to a method or system for automatically modifying code based on user instructions.

[0961] "Means for reanalyzing modified code" refers to methods or tools for reanalyzing the modified code and verifying that the modifications were made correctly.

[0962] "Means for recognizing a user's emotion" refers to a method or technology for analyzing a user's emotional state and identifying that emotion.

[0963] "Means for adjusting the notification method and content of a report according to the user's emotions" refers to a method or technology for dynamically changing the notification method and content based on the user's emotional state.

[0964] The present invention is a system for efficiently analyzing software code for factory robots to enable early detection and correction of bugs. This system includes multiple means for retrieving code from a version control system and automatically analyzing it. It also has a function for recognizing user emotions and adjusting the notification method and content of reports based on those emotions. A specific embodiment of this system is described below.

[0965] System configuration and overview

[0966] 1. Collecting the Code

[0967] The server retrieves the latest code from the version control system (e.g., Git). This process pulls the user-developed code from the repository and makes it available for subsequent analysis.

[0968] 2. Code Analysis

[0969] The server has an AI module that analyzes the acquired code. This module uses TensorFlow to learn from a database of past bugs and uses that knowledge when analyzing new code. Specifically, it evaluates each part of the code and calculates a risk score for the defect.

[0970] 3. Bug Prediction and Risk Assessment

[0971] The server uses neural networks to predict potential bugs in the code, calculates a risk score, and uses natural language processing techniques to infer the cause of the bug from comments and documentation.

[0972] 4. Emotion Recognition by Emotion Engine

[0973] The server analyzes user emotions using the BERT model, and the emotion engine recognizes the emotions users feel when reviewing reports or making corrections, and adjusts the system's behavior based on those emotions.

[0974] 5. Reporting and Notifications

[0975] The server generates a detailed report based on the analysis results. The report includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is sent to the user's device via an HTTP request. The emotion engine adjusts the notification method and content appropriately according to the user's emotion.

[0976] 6. Corrective Instructions and Execution

[0977] The user checks the report and sends correction instructions to the server using a conversational interface (e.g., chatbot function). The server automatically corrects the code based on the user's instructions and commits it back to the repository. The emotion engine can adjust the priority and method of correction based on the user's emotions.

[0978] 7. Reanalyzing the bug

[0979] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[0980] Specific examples

[0981] Example 1: Code commit with new feature addition

[0982] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[0983] Example 2: Fix instructions and code fixes

[0984] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[0985] Examples of prompt statements

[0986] Prompt statement:

[0987] Please analyze the code below and let me know the potential bugs and their risk scores.

[0988] code:

[0989] python

[0990] def example_function(param1, param2):

[0991] if param1 is None:

[0992] return "Error"

[0993] result = param1 + param2

[0994] return result

[0995] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[0996] Step 1:

[0997] The server collects the latest code from a version control system (e.g., Git). Specifically, it accesses the repository using the Git API and retrieves the latest commits. This requires the repository URL as input and the retrieved code files as output.

[0998] Step 2:

[0999] The server loads a TensorFlow-powered AI model to analyze the captured code. This AI model is trained on a database of past bugs and evaluates each piece of code. It uses the captured code file as input and produces a predicted bug result and risk score as output.

[1000] Step 3:

[1001] The server uses neural networks to predict bugs and assess risk. Specifically, it analyzes each section of code and calculates the probability and impact of potential bugs. The input is the text data of the code, and the output is a risk score.

[1002] Step 4:

[1003] The server uses natural language processing technology to infer the cause of bugs from comments and documentation in the code. Specifically, it uses the BERT model to analyze text data and identify the cause of the bug. The text data from comments and documentation is used as input, and the inferred cause is obtained as output.

[1004] Step 5:

[1005] The server generates a detailed report based on the analysis results, including the bug location, risk score, probable cause, and fix suggestions. The bug prediction results and risk score are used as input, and the report is obtained as output.

[1006] Step 6:

[1007] The server uses an emotion engine to analyze the user's emotions. Specifically, it evaluates the user's input text using the BERT model to identify the user's emotional state. The user's text data is used as input, and the emotion evaluation result is obtained as output.

[1008] Step 7:

[1009] The server adjusts the notification method and content of the generated report according to the emotion and sends it to the user. Specifically, if the user's emotional state is stressed, detailed explanations and supporting information are added. The emotion assessment results are used as input, and the adjusted report is obtained as output.

[1010] Step 8:

[1011] The user checks the notified report and sends correction instructions to the server using an interactive interface. Specifically, the user enters specific corrections using a chatbot or form. The user's correction instructions are used as input, and the instructions are sent to the server as output.

[1012] Step 9:

[1013] The server modifies the code based on the user's instructions and commits it back to the repository, using the user's instructions as input and the modified code as output.

[1014] Step 10:

[1015] The server then re-analyzes the modified code to verify that the bug has been resolved. The modified code file is used as input and run through the AI ​​model again. The output is a verification result that indicates whether the modifications were correct.

[1016] The specific processing unit 290 transmits the result of the specific processing to the headset type terminal 314. In the headset type terminal 314, the control unit 46A causes the speaker 240 and the display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.

[1017] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[1018] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the headset type terminal 314.

[1019] [Fourth embodiment]

[1020] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.

[1021] 7, a data processing system 410 includes a data processing device 12 and a robot 414. An example of the data processing device 12 is a server.

[1022] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[1023] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a control target 443. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the control target 443 are also connected to the bus 52.

[1024] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.

[1025] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).

[1026] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.

[1027] The control object 443 includes a display device, LEDs in the eyes, and motors for driving the arms, hands, and feet. The posture and gestures of the robot 414 are controlled by controlling the motors of the arms, hands, and feet. Some of the emotions of the robot 414 can be expressed by controlling these motors. In addition, the facial expressions of the robot 414 can also be expressed by controlling the light emission state of the LEDs in the eyes of the robot 414.

[1028] Fig. 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Fig. 8, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.

[1029] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.

[1030] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.

[1031] In the robot 414, the processor 46 performs the reception output process. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.

[1032] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1033] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews and to quickly find and fix bugs. This system includes multiple means centered around a server.

[1034] System configuration and overview

[1035] 1. Collecting the Code

[1036] The server has the ability to retrieve the latest code from a version control system (e.g., Git). Users commit their developed code to a repository, and the server retrieves that code.

[1037] 2. Code Analysis

[1038] The server has an AI module that analyzes the acquired code. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code.

[1039] 3. Bug Prediction and Risk Assessment

[1040] The server has the ability to predict potential bugs in the code. Specifically, it uses neural networks to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing technology to infer the cause of the bug from comments and documentation.

[1041] 4. Report Generation

[1042] The server generates a detailed report based on the analysis results, including the location of the bug, its risk score, the probable cause, and suggested fixes. The generated report is then sent to the user, who can review the report and make any necessary corrections.

[1043] 5. Instructions for correction and implementation

[1044] After receiving the report, the user sends correction instructions to the server through an interactive interface, which can be provided using a chatbot or a form. The server then automatically corrects the code based on the user's instructions and commits them back to the repository.

[1045] 6. Reanalyzing the bug

[1046] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[1047] Specific examples

[1048] Example 1: Code commit with new feature addition

[1049] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[1050] Example 2: Fix instructions and code fixes

[1051] The user reviews the report and determines that a variable needs to be initialized. The user uses an interactive interface to submit fix instructions to the server. The server then modifies the code based on the instructions and commits it back to the repository. The modified code is then analyzed again to verify that the problem has been resolved.

[1052] As a result, the "AI code analyzer" of this invention enables efficient code review and early bug detection and correction, reducing development costs and shortening time to market. This system is also a general-purpose solution that can be applied to a wide range of organizations involved in software development.

[1053] The processing flow will be explained below.

[1054] Step 1:

[1055] The server retrieves the latest code version from the repository. Specifically, the server runs the "git pull" command to download the latest code from the version control system, resulting in the latest code base to analyze.

[1056] Step 2:

[1057] The server reads the acquired code base into memory, reads the necessary code files from the file system, and prepares them for passing to the analysis engine, where the code dependencies and structure are checked.

[1058] Step 3:

[1059] The server starts the AI ​​analysis engine, specifically loading the past bug database into the model and preparing the code for analysis, which makes the AI ​​module available for application.

[1060] Step 4:

[1061] The server begins code analysis, using neural networks and natural language processing techniques to evaluate each section of code, checking variable types, checking for memory references, and analyzing inconsistencies in loops and conditional branches.

[1062] Step 5:

[1063] The server performs bug prediction, identifies particularly high-risk areas in the code, and calculates a risk score. Specifically, it predicts which parts of functions or classes have potential bugs.

[1064] Step 6:

[1065] The server generates a report based on the analysis results, which includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is used for subsequent fixes.

[1066] Step 7:

[1067] The server notifies the user of the generated report. The report contents are sent to the user via email or dashboard, and the user is alerted to the report, allowing the user to identify areas that need to be corrected.

[1068] Step 8:

[1069] The user reviews the report and sends correction instructions to the server through a conversational interface. Specific instructions for corrections are provided using a chatbot or a dedicated form.

[1070] Step 9:

[1071] The server automatically modifies the code based on the user's instructions. Specifically, it initializes specified variables, modifies conditional branches, deletes unnecessary code, etc. The modified code is then verified internally.

[1072] Step 10:

[1073] The server commits the modified code back to the repository, where the new version is stored and made accessible to other team members, making the changes official.

[1074] Step 11:

[1075] The server re-analyzes the fixed code to verify that the fix was applied correctly, then performs bug prediction and risk assessment again to check for new issues, and this cycle continues until the bug is fully resolved.

[1076] Example 1

[1077] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1078] Improving the efficiency of code reviews and early bug detection and correction are important issues for improving software development quality and adhering to schedules. However, manual code review and bug correction is time-consuming and labor-intensive, resulting in increased development costs and release delays. There is also a risk that human error by inexperienced developers could lead to bugs. Therefore, there is a need for a system that automates code reviews and efficiently and quickly detects and corrects bugs.

[1079] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.

[1080] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referencing a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for automatically acquiring the latest code from a version control system, means for parsing and analyzing the code using an AI module, means for accepting user instructions through an interactive interface, and means for executing a generative AI model, thereby enabling efficient code reviews and early bug detection and correction.

[1081] The "means for retrieving code" is a mechanism for automatically retrieving the latest code from the version control system.

[1082] The "means for analyzing the code" is a mechanism for analyzing the acquired code and identifying potential problems.

[1083] "Means for predicting bugs by referring to a database of past bugs" is a mechanism for predicting bugs that may be lurking in new code based on data on bugs that have occurred in the past.

[1084] The "means for calculating a risk score" is a mechanism for quantifying and assessing the risk of a predicted bug.

[1085] The "means for generating a report summarizing the analysis results" is a mechanism for creating a detailed report based on the analysis results.

[1086] The "means for notifying the user of the generated report" is a mechanism for notifying the user of the generated report.

[1087] The "means for receiving a user's correction instruction" is a mechanism including an interface for receiving a correction instruction from a user.

[1088] The "means for modifying code based on modification instructions" is a mechanism for automatically modifying code based on modification instructions from a user.

[1089] The "means for reanalyzing the modified code" is a mechanism for reanalyzing the modified code to verify whether the modifications were made correctly.

[1090] "Means for automatically obtaining the latest code from the version control system" is a mechanism for automatically obtaining newly committed code from the version control system.

[1091] "Means for parsing and analyzing code using an AI module" refers to a mechanism for performing structural analysis of code in order to analyze the code using AI technology.

[1092] The "means for accepting user instructions through an interactive interface" is a mechanism that provides an interactive interface for the user to input correction instructions.

[1093] The "means for executing a generative AI model" is a mechanism for executing a pre-trained AI model for code analysis and bug prediction.

[1094] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews and to quickly find and fix bugs. This system includes multiple means centered around a server.

[1095] The system of the present invention has a mechanism for performing a series of processes, including code acquisition, analysis, bug prediction, report generation, correction, and reanalysis. The main components include a server, a user terminal, a version control system, an AI module, and an interactive interface.

[1096] Collecting Code

[1097] The server automatically retrieves the latest code from a version control system (e.g., Git). When a user commits new code to a repository using a terminal, the server automatically retrieves that code. A common example of this process is to use the git pull command.

[1098] Code Analysis

[1099] The server uses an AI module to analyze the acquired code. This AI module is trained based on a database of past bugs and uses that knowledge when analyzing newly acquired code. The server loads a machine learning model (e.g., a TensorFlow model) to parse and analyze the code.

[1100] Bug prediction and risk assessment

[1101] The server uses neural networks to predict potential bugs in the code, and natural language processing techniques to infer the cause of the bug from comments and documentation, evaluating each piece of code and calculating a risk score for the defect.

[1102] Report Generation

[1103] The server generates a detailed report based on the analysis results, including the location of the bug, a risk score, a probable cause, and suggested fixes. The report is then sent to the user via email or a dedicated dashboard application.

[1104] Corrective instruction and execution

[1105] The user checks the report received from the server and sends any necessary correction instructions to the server through an interactive interface (such as a chatbot or a dedicated form). The server automatically corrects the code based on the user's correction instructions and commits it back to the repository. The corrected code is then re-analyzed to confirm that the corrections were made correctly.

[1106] Bug reanalysis

[1107] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this process is repeated until the bug is completely eliminated.

[1108] Specific examples

[1109] Example 1: Code commit with new feature addition

[1110] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[1111] Example 2: Fix instructions and code fixes

[1112] The user reviews the report and determines that a variable needs to be initialized. The user uses an interactive interface to submit fix instructions to the server. The server then modifies the code based on the instructions and commits it back to the repository. The modified code is then analyzed again to verify that the problem has been resolved.

[1113] Prompt Sentence Examples

[1114] "After adding a new feature, I committed the code to the repository. Please analyze this code for potential bugs and their risk scores and generate a report."

[1115] With the above configuration, this system enables efficient code review and enables early detection and correction of bugs, thereby reducing development costs and shortening time to market.

[1116] The flow of the identification process in the first embodiment will be described with reference to FIG.

[1117] Processing step flow

[1118] Step 1: Collect the code

[1119] The server automatically retrieves new code that the user commits to a version control system (e.g., Git) using a terminal. In this process, the server periodically monitors the repository and retrieves the latest code when it is committed using the git pull command. The input is the new code committed by the user, and the output is the latest code retrieved by the server.

[1120] Step 2: Code Analysis

[1121] To analyze the acquired code, the server initializes the AI ​​module and starts the analysis process. The AI ​​module contains a pre-trained machine learning model (e.g., TensorFlow model), parses the code, and passes it to the machine learning model. The input is the code acquired by the server, and the output is the parsed code data. The server breaks the acquired code into tokens and passes the extracted token data to the AI ​​module for analysis.

[1122] Step 3: Bug prediction and risk assessment

[1123] The server uses an AI module to predict potential bugs in the analyzed code and calculates a risk score for the defects. In this process, the server uses a neural network to evaluate each part of the code while referencing a database of past bugs. It also uses natural language processing technology to infer the cause of the bug from comments and documentation. The input is the analyzed code data, and the output is a list of predicted bugs and their risk scores.

[1124] Step 4: Generate a report

[1125] The server generates a detailed report based on the results of bug prediction and risk assessment. This report includes the bug location, risk score, probable cause, and fix suggestions. The generated report is notified to the user and displayed via a dashboard application or email. The input is the risk score and bug location data, and the output is the generated report.

[1126] Step 5: Corrective action and implementation

[1127] The user checks the report received from the server and sends any necessary correction instructions to the server through an interactive interface. The server receives the user's correction instructions and automatically corrects the code based on the correction instructions. The interactive interface used in this step includes, for example, a chatbot or a dedicated form. The input is the user's correction instructions, and the output is the corrected code.

[1128] Step 6: Reanalyze the bug

[1129] The server then re-analyzes the modified code and verifies that the bug has been resolved. This process is repeated until the bug is completely eliminated. If the re-analysis determines that no further fixes are necessary, a final report is generated and the user is notified. The input is the modified code, and the output is a report confirming that the bug has been resolved.

[1130] The above processing steps efficiently execute a series of processes from code collection to bug correction and reanalysis, enabling rapid detection and correction.

[1131] (Application example 1)

[1132] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1133] In software development, code review, bug detection, and correction are very important processes, but doing them manually takes a lot of time and effort. This problem is particularly serious in the control systems of robots used in factories, where a malfunction can affect the operation of the entire manufacturing line. Therefore, there is a need for technology to perform this process quickly and efficiently.

[1134] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.

[1135] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting defects by referencing a database of past defects, means for performing risk assessment, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving correction instructions from the user, means for correcting the code based on the correction instructions, means for reanalyzing the corrected code, and means for reviewing and correcting code efficiently by being installed on robots for factory control system code, thereby enabling early detection and rapid correction of defects and stable operation of factory robots.

[1136] The "means for obtaining code" is a means that has the function of collecting the latest code from a repository such as a version control system.

[1137] "Means for analyzing code" refers to a function that analyzes collected code and understands its content and structure.

[1138] The "means for predicting defects by referring to a database of past defects" has the function of predicting defects that may be lurking in newly collected code based on information about defects that have occurred in the past.

[1139] The "means for performing risk assessment" has the function of quantitatively assessing the risk of malfunctions occurring based on the analysis results.

[1140] The "means for generating a report summarizing the analysis results" has a function for summarizing the results of code analysis and risk assessment into a single report.

[1141] The "means for notifying the user of the generated report" has a function for notifying the user of the generated report.

[1142] The "means for receiving a user's instruction for correction" has a function for receiving instructions from a user regarding code correction.

[1143] The "means for correcting code based on correction instructions" has a function for automatically correcting code according to the correction content instructed by the user.

[1144] The "means for reanalyzing the modified code" refers to a function that reanalyzes the code after the modification has been made to check the appropriateness of the modification and whether any new defects have been found.

[1145] "Factory control system code" refers to the source code used to control robots and machines in a factory.

[1146] "A means to be installed in a robot to make code review and correction more efficient" is something that is installed in a robot and has the function of evaluating and correcting the robot's own code, thereby making review and correction more efficient.

[1147] This invention is a system that improves the efficiency of code reviews and the early detection and correction of bugs in factory control system code. Installed on factory robots, this system automatically collects, analyzes, evaluates, reports, and corrects code.

[1148] The server first retrieves the latest code from the repository. For this purpose, a version control system (e.g., Git) is used. The retrieved code is sent to the server, where it is analyzed by an AI code analyzer module. This module uses a neural network to learn from a database of past defects, and utilizes that knowledge when analyzing new code.

[1149] The server evaluates the risk of the defect based on the analysis results and calculates a risk score. It can also use natural language processing technology to infer the cause of the defect from comments and documents. This generates a detailed report including specific causes and countermeasures. The generated report is then sent to the user by the server.

[1150] The user reviews the submitted report and sends any necessary correction instructions to the server via an interactive interface (such as a chatbot or form). The server automatically corrects the code based on the correction instructions and commits it back to the repository. The corrected code is then reanalyzed to confirm that the bug has been resolved. This cycle is repeated until the bug is completely resolved.

[1151] The hardware used includes the factory robot control system and the server or administrator's device (such as a smartphone or PC), and the software used includes Python, an AI code analyzer (AICodeAnalyzer module), a report generator (ReportGenerator module), and Git (a version control system).

[1152] Consider the following scenario: New control code is committed to a repository to process a new product on a factory production line. This system is used to retrieve the latest control code and analyze it with an AI code analyzer. Based on a database of past defects, the AI ​​identifies parts of the code that are assessed as high risk, generates a report with a risk score and suggested fixes, and notifies the administrator via email.

[1153] An example of a prompt for a generative AI model is, "Analyze the control code of a newly committed factory robot and identify any potential bugs. Compile a report with a risk assessment and suggested fixes based on a database of past bugs, along with a risk score."

[1154] The flow of the specific processing in the application example 1 will be described with reference to FIG.

[1155] Step 1:

[1156] The server uses a means to retrieve the latest code from a version control system (e.g., Git). As input, it requires the URL of the repository, and as output, it contains the retrieved code. The server uses the git clone command to clone the repository locally and collect the latest code.

[1157] Step 2:

[1158] The server uses a means to analyze the retrieved code. As input, it requires the latest code file, and as output, it contains the analysis results. The server uses a Python script to analyze the contents of the code file, analyzing its structure, function calls, etc.

[1159] Step 3:

[1160] The server uses a means to refer to a database of past defects and predict defects. The input requires information on the analyzed code and the database of past defects, and the output includes the defect prediction results. The server uses an AI code analyzer module to predict the possibility of defects using a neural network model.

[1161] Step 4:

[1162] The server uses a means for risk assessment and calculates a risk score. The input is the failure prediction result, and the output includes a risk score. The server quantifies the risk of each part from the analysis result and assigns a score.

[1163] Step 5:

[1164] The server uses a means to generate a report summarizing the analysis results. The inputs include risk scores and defect prediction results, and the output includes a detailed report. The server uses a report generator to create a report that includes risk scores, defect causes, and suggested fixes.

[1165] Step 6:

[1166] The server uses a means to notify the user of the generated report. The generated report is required as input, and the notification is included as output. The server communicates the report to the user using email sending and dashboard update functions.

[1167] Step 7:

[1168] The user reviews the report and sends correction instructions to the server through a conversational interface. The input is the report, and the output includes correction instructions. The user enters the details of the corrections through a chatbot or a form and submits them.

[1169] Step 8:

[1170] The server uses a means to modify the code based on the user's modification instructions. The inputs are the modification instructions and the target code, and the output includes the modified code. The server runs an automated modification script to apply the specified changes to the code.

[1171] Step 9:

[1172] The server uses a means to re-analyze the modified code. The input is the modified code, and the output includes the re-analysis result. The server then uses the AI ​​code analyzer module again to analyze the modified code and confirm that the defect has been resolved.

[1173] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.

[1174] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews, detect and fix bugs early, and achieve more effective bug response by combining it with an emotion engine that recognizes user emotions. This system includes multiple means centered around a server.

[1175] System configuration and overview

[1176] 1. Collecting the Code

[1177] The server has the ability to retrieve the latest code from a version control system (e.g., Git). Users commit their developed code to a repository, and the server retrieves that code.

[1178] 2. Code Analysis

[1179] The server has an AI module that analyzes the acquired code. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code.

[1180] 3. Bug Prediction and Risk Assessment

[1181] The server has the ability to predict potential bugs in the code. Specifically, it uses neural networks to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing technology to infer the cause of the bug from comments and documentation.

[1182] 4. Emotion Recognition by Emotion Engine

[1183] The emotion engine has the ability to recognize the user's emotions. It analyzes the emotions expressed when the user checks a report or gives instructions for correction, and adjusts the system's behavior based on those emotions.

[1184] 5. Reporting and Notifications

[1185] The server generates a detailed report based on the analysis results. This report includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is then sent to the user, who can review it and make corrections as necessary. The emotion engine adjusts the notification method and content to suit the user's emotions.

[1186] 6. Corrective Instructions and Execution

[1187] After receiving the report, the user sends correction instructions to the server through an interactive interface. This interface is provided using a chatbot or a form. The server automatically corrects the code based on the user's correction instructions and commits it back to the repository. The emotion engine can adjust the priority and method of correction based on the user's emotions.

[1188] 7. Reanalyzing the bug

[1189] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[1190] Specific examples

[1191] Example 1: Code commit with new feature addition

[1192] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analysis using an AI module. Comparing it with a historical bug database, the server identifies the risk of a null pointer reference in a specific function as high risk. The server generates a report with a risk score and notifies the user. The emotion engine analyzes the user's emotions and adjusts the tone and content of the notification depending on the severity of the risk.

[1193] Example 2: Fix instructions and code fixes

[1194] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[1195] In this way, the "AI code analyzer" of this invention not only automates code reviews, but also enables more effective bug handling by taking user emotions into account. This is expected to reduce development costs and shorten time to market, as well as reduce developer stress and improve productivity.

[1196] The processing flow will be explained below.

[1197] Step 1:

[1198] The server retrieves the latest code version from the version control system (e.g., Git). Specifically, the server executes the "git pull" command to download the latest code. This process saves the latest code base to be analyzed on the server.

[1199] Step 2:

[1200] The server loads the acquired code base into memory. The server reads each code file from the file system and prepares the data to be passed to the AI ​​analysis engine. At this stage, the code dependencies and structure are checked.

[1201] Step 3:

[1202] The server starts the AI ​​analysis engine. Specifically, it loads the past bug database as a model and prepares the code for analysis. The AI ​​analysis engine is now ready to be applied.

[1203] Step 4:

[1204] The server begins code analysis, using neural networks and natural language processing techniques to thoroughly evaluate each part of the code. Specifically, it checks variable types, checks for memory references, and analyzes inconsistencies in loops and conditional branches.

[1205] Step 5:

[1206] The server predicts bugs and identifies areas of code that are particularly high risk. It calculates a risk score and lists areas with high potential for problems. Specifically, it clarifies which parts of functions and classes contain potential bugs.

[1207] Step 6:

[1208] The server generates a report based on the analysis results, which includes the location of the bug, its risk score, probable cause, and suggested fixes, and provides the report to the user.

[1209] Step 7:

[1210] The server notifies the user of the generated report. Specifically, the report contents are transmitted to the user via email or dashboard so that the user can check them. The emotion engine recognizes the user's emotions and adjusts the notification content accordingly.

[1211] Step 8:

[1212] The user checks the report and sends correction instructions to the server through a conversational interface. The user provides specific corrections using a chatbot or a dedicated form. The emotion engine adjusts correction support according to the user's emotions.

[1213] Step 9:

[1214] The server automatically modifies the code based on the user's instructions. Specifically, it initializes specified variables, modifies conditional branches, deletes unnecessary code, etc. The modified code is then verified internally.

[1215] Step 10:

[1216] The server commits the modified code back to the repository, where the new version is stored and made accessible to other team members, making the changes official.

[1217] Step 11:

[1218] The server re-analyzes the fixed code to verify that the fix was applied correctly, then performs bug prediction and risk assessment again to check for new issues, and this cycle continues until the bug is fully resolved.

[1219] Step 12:

[1220] The emotion engine analyzes user feedback and reflects it in future correction support and report generation. The system optimizes the overall operation of the system, taking into account the user's emotions and stress level. This initiative is expected to improve the user experience and improve development efficiency.

[1221] Example 2

[1222] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1223] Conventional code review systems focus on early bug detection and correction, but rarely consider the user's emotional state. As a result, the stress of the correction process increases and productivity declines. Another issue is the inability to effectively utilize natural language processing technology or neural networks in bug risk assessment and bug cause inference. Therefore, the present invention aims to provide a system that takes user emotions into account in code analysis, enabling more effective bug prediction and correction.

[1224] The specific processing by the specific processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means.

[1225] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referring to a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for recognizing a user's emotion and adjusting the system operation based on the emotion, and means for adjusting the notification method and content based on the user's emotion, thereby enabling efficient bug prediction and correction while respecting the user's emotional state.

[1226] "Means for retrieving code" refers to a function for automatically retrieving program code from a version control system.

[1227] "Means for analyzing code" refers to the function of analyzing acquired program code using analytical tools such as AI modules.

[1228] "Means for predicting bugs by referencing a database of past bugs" refers to a function that refers to a database of previously reported bugs and predicts new bugs based on that.

[1229] "Means for calculating risk score" refers to a function that evaluates and quantifies the risk of a bug existing in each part of the program code.

[1230] "Means for generating a report summarizing the analysis results" refers to the function of creating a report based on the results of code analysis that includes the location of the bug, risk score, probable cause, suggested fixes, etc.

[1231] "Means for notifying the user of the generated report" refers to a function for notifying the user of the generated report. Notification methods include email and chat apps.

[1232] "Means for receiving correction instructions from the user" refers to a function that provides an interface for receiving correction instructions from the user, such as a chatbot or form.

[1233] The "means for modifying code based on modification instructions" refers to a function for automatically modifying program code based on modification instructions received from a user.

[1234] "Means for reanalyzing modified code" refers to a function for reanalyzing modified program code and verifying that the bug has been resolved.

[1235] "Means for recognizing the user's emotions and adjusting the system's behavior based on those emotions" refers to the function of analyzing the user's emotional state and adaptively changing the system's behavior based on the results.

[1236] "Means for adjusting notification method and content based on user emotions" refers to a function that flexibly changes the tone, content, and means of notifications, taking into account the user's emotional state.

[1237] This invention relates to a code analyzer system that uses AI technology to improve the efficiency of code reviews, detect and fix bugs early, and achieve more effective bug response by combining it with an emotion engine that recognizes user emotions. This system includes multiple means centered around a server.

[1238] Collecting Code

[1239] The server has the ability to retrieve the latest code from a version control system (e.g., Git). When a user commits the code they developed to the repository, the server automatically retrieves that code. Specifically, the latest code is retrieved using the git pull origin master command.

[1240] Code Analysis

[1241] The server has an AI module for analyzing the code it retrieves. This AI module learns from a database of past bugs and uses that knowledge when analyzing new code. Deep learning frameworks such as TensorFlow and PyTorch are used here. Specifically, a TensorFlow model is loaded and analysis is performed using the form model.predict(new_code).

[1242] Bug prediction and risk assessment

[1243] The server uses a neural network to evaluate each piece of code and calculates a risk score for the defect. It also uses natural language processing techniques (e.g., BERT or GPT) to infer the cause of the bug from comments and documentation. This evaluation involves risk_score = neural_network.evaluate(code_segment).

[1244] Emotion recognition by emotion engine

[1245] The emotion engine has the ability to recognize user emotions. It analyzes the emotions expressed when a user checks a report or makes corrections, and adjusts the system's behavior based on those emotions. Sentiment analysis utilizes open-source emotion APIs and general-purpose natural language processing models. For example, emotion = emotion_api.analyze(user_input).

[1246] Reporting and Notifications

[1247] The server generates a detailed report based on the analysis results. This report includes the bug location, risk score, probable cause, and suggested fixes. The generated report is then sent to the user via email or a chat app (e.g., Slack, Microsoft Teams). The emotion engine adjusts the content and tone of the notification based on the user's emotion. Specifically, a report is generated using report = generate_report(bug_locations, risk_scores, causes, suggestions), and notifications are sent via email or Slack API.

[1248] Corrective instruction and execution

[1249] After receiving the report, the user sends correction instructions to the server through a conversational interface (e.g., chatbot or form). The server automatically corrects the code based on the instructions and commits it back to the repository. The emotion engine adjusts the priority and method of corrections based on the user's emotions. Specifically, it parses the user's input, sets fix_command = parse_user_input(user_input), implements the corrections, and sets apply_fix(fix_command).

[1250] Bug reanalysis

[1251] The modified code is analyzed again by the server to confirm that the bug has been resolved. This cycle is repeated until the bug is completely resolved. To reanalyze, the modified code is analyzed again by the AI ​​module using the model.predict(fixed_code) method.

[1252] Specific examples

[1253] Example 1: Code commit with new feature addition

[1254] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analysis using an AI module. Comparing it with a historical bug database, the server identifies the risk of a null pointer reference in a specific function as high risk. The server generates a report with a risk score and notifies the user. The emotion engine analyzes the user's emotions and adjusts the tone and content of the notification depending on the severity of the risk.

[1255] Example prompt sentence:

[1256] "We've added a new feature. Please assess the potential bugs and risks in your code and let us know the results. Also, generate notifications based on user sentiment."

[1257] Example 2: Fix instructions and code fixes

[1258] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[1259] Example prompt sentence:

[1260] "I've seen the code report and I need to initialize a variable. This is a stressful situation and I'd like more guidance and support."

[1261] In this way, the "AI code analyzer" of this invention not only automates code reviews, but also enables more effective bug handling by taking user emotions into account. This is expected to reduce development costs and shorten time to market, as well as reduce developer stress and improve productivity.

[1262] The flow of the identification process in the second embodiment will be described with reference to FIG.

[1263] Step 1:

[1264] The server retrieves the latest code from the version control system (e.g., Git). The input to this step is the code that the user committed to the repository, and the output is the retrieved latest code. Specifically, the server executes the git pull origin master command to retrieve the latest code and saves it in a dedicated directory on the server.

[1265] Step 2:

[1266] The server launches an AI module to analyze the acquired code. The input of this step is the code acquired in step 1, and the output is the analysis result. Specifically, the server loads a TensorFlow or PyTorch model and analyzes the code using model.predict(new_code).

[1267] Step 3:

[1268] The server uses a neural network to predict bugs in the code and calculate a risk score. The input to this step is the analysis result obtained in step 2, and the output is the risk score of the bug. Specifically, the server performs a risk assessment based on the analysis result in the form risk_score = neural_network.evaluate(code_segment).

[1269] Step 4:

[1270] The emotion engine recognizes the user's emotions. The input to this step is the user's language and actions when checking the report or giving correction instructions, and the output is the user's emotional state. Specifically, the emotion engine uses an emotion analysis model to analyze the user's emotions in the form emotion = emotion_api.analyze(user_input).

[1271] Step 5:

[1272] The server generates a detailed report based on the analysis results and notifies the user. The inputs to this step are the risk score and analysis results obtained in step 3, as well as the user's emotional state, and the output is the generated report and notification. Specifically, the server generates a report in the form of report = generate_report(bug_locations, risk_scores, causes, suggestions), and notifies the user via email or Slack API.

[1273] Step 6:

[1274] The user receives the report and sends correction instructions to the server through an interactive interface. The input of this step is the user's correction instructions, and the output is the instructions sent to the server. Specifically, the user's input is parsed and instructions are generated in the form fix_command = parse_user_input(user_input).

[1275] Step 7:

[1276] The server modifies the code based on the fix instructions and commits it to the repository again. The input to this step is the fix instructions obtained in step 6, and the output is a commit of the modified code. Specifically, the server makes the fix in the form of apply_fix(fix_command) and executes the git commit and git push commands.

[1277] Step 8:

[1278] The server analyzes the modified code again to see if the bug has been resolved. The input to this step is the code modified in step 7, and the output is the result of the reanalysis. Specifically, the server uses the AI ​​module again to perform a reanalysis in the form of model.predict(fixed_code). This reanalysis then verifies whether the bug has been resolved.

[1279] (Application example 2)

[1280] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."

[1281] Conventional code review systems lack efficient methods for detecting code bugs and adequate notification and correction support that takes into account the user's emotional state. As a result, detecting and correcting bugs requires a great deal of time and effort, often causing developers high levels of stress. Rapid and accurate bug response is essential, particularly in workplaces where improving the reliability of factory robot software and work efficiency is required.

[1282] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 2 is realized by the following means.

[1283] In this invention, the server includes means for acquiring code, means for analyzing code, means for predicting bugs by referring to a past bug database, means for calculating a risk score, means for generating a report summarizing the analysis results, means for notifying a user of the generated report, means for receiving a user's correction instruction, means for correcting the code based on the correction instruction, means for reanalyzing the corrected code, means for recognizing the user's emotion, and means for adjusting the notification method and content of the report according to the user's emotion, thereby enabling efficient detection and correction of code bugs and notification and support according to the user's emotional state.

[1284] "Means" refers to a method or device for achieving a specific function or purpose.

[1285] "Code retrieval methods" refers to the methods or processes used to gather the latest code from a version control system or other repository.

[1286] "Means for analyzing code" refers to methods and tools for automatically analyzing software code and evaluating its quality and problems.

[1287] "Means for predicting bugs by referencing a database of past bugs" refers to methods or algorithms for predicting potential new bugs based on past bug data.

[1288] "Means for calculating risk scores" refers to methods or calculation processes for quantifying and assessing the impact and probability of occurrence of potential issues in the code.

[1289] "Means for generating a report summarizing the analysis results" refers to methods and tools for organizing the results of code analysis and creating a clearly written document (report).

[1290] "Means for notifying a user of a generated report" refers to a method or system for notifying a user of a generated report.

[1291] The "means for receiving a user's modification instruction" refers to an interface or method for receiving a code modification instruction from a user.

[1292] "Means for modifying code based on modification instructions" refers to a method or system for automatically modifying code based on user instructions.

[1293] "Means for reanalyzing modified code" refers to methods or tools for reanalyzing the modified code and verifying that the modifications were made correctly.

[1294] "Means for recognizing a user's emotion" refers to a method or technology for analyzing a user's emotional state and identifying that emotion.

[1295] "Means for adjusting the notification method and content of a report according to the user's emotions" refers to a method or technology for dynamically changing the notification method and content based on the user's emotional state.

[1296] The present invention is a system for efficiently analyzing software code for factory robots to enable early detection and correction of bugs. This system includes multiple means for retrieving code from a version control system and automatically analyzing it. It also has a function for recognizing user emotions and adjusting the notification method and content of reports based on those emotions. A specific embodiment of this system is described below.

[1297] System configuration and overview

[1298] 1. Collecting the Code

[1299] The server retrieves the latest code from the version control system (e.g., Git). This process pulls the user-developed code from the repository and makes it available for subsequent analysis.

[1300] 2. Code Analysis

[1301] The server has an AI module that analyzes the acquired code. This module uses TensorFlow to learn from a database of past bugs and uses that knowledge when analyzing new code. Specifically, it evaluates each part of the code and calculates a risk score for the defect.

[1302] 3. Bug Prediction and Risk Assessment

[1303] The server uses neural networks to predict potential bugs in the code, calculates a risk score, and uses natural language processing techniques to infer the cause of the bug from comments and documentation.

[1304] 4. Emotion Recognition by Emotion Engine

[1305] The server analyzes user emotions using the BERT model, and the emotion engine recognizes the emotions users feel when reviewing reports or making corrections, and adjusts the system's behavior based on those emotions.

[1306] 5. Reporting and Notifications

[1307] The server generates a detailed report based on the analysis results. The report includes the location of the bug, a risk score, a probable cause, and suggested fixes. The generated report is sent to the user's device via an HTTP request. The emotion engine adjusts the notification method and content appropriately according to the user's emotion.

[1308] 6. Corrective Instructions and Execution

[1309] The user checks the report and sends correction instructions to the server using a conversational interface (e.g., chatbot function). The server automatically corrects the code based on the user's instructions and commits it back to the repository. The emotion engine can adjust the priority and method of correction based on the user's emotions.

[1310] 7. Reanalyzing the bug

[1311] The modified code is then analyzed again by the server to verify that the bug has been fixed, and this cycle is repeated until the bug is completely fixed.

[1312] Specific examples

[1313] Example 1: Code commit with new feature addition

[1314] A user adds a new feature and commits the code to the repository. The server retrieves the code and begins analyzing it using an AI module. Comparing it with the historical bug database, the server identifies the risk of a null pointer dereference in a specific function as high risk. The server generates a report with a risk score and notifies the user.

[1315] Example 2: Fix instructions and code fixes

[1316] The user reviews the report and determines that a variable needs to be initialized. The user uses a conversational interface to send correction instructions to the server. The emotion engine recognizes the user's emotions and provides detailed guidance and support if the user is in a high-stress state. The server corrects the code based on these instructions and commits it back to the repository. The corrected code is then analyzed again to confirm that the problem has been resolved.

[1317] Examples of prompt statements

[1318] Prompt statement:

[1319] Please analyze the code below and let me know the potential bugs and their risk scores.

[1320] code:

[1321] python

[1322] def example_function(param1, param2):

[1323] if param1 is None:

[1324] return "Error"

[1325] result = param1 + param2

[1326] return result

[1327] The flow of the specific processing in the application example 2 will be described with reference to FIG.

[1328] Step 1:

[1329] The server collects the latest code from a version control system (e.g., Git). Specifically, it accesses the repository using the Git API and retrieves the latest commits. The input required is the repository URL, and the output is the retrieved code file.

[1330] Step 2:

[1331] The server loads a TensorFlow-powered AI model to analyze the captured code. This AI model is trained on a database of past bugs and evaluates each piece of code. It uses the captured code file as input and produces a predicted bug result and risk score as output.

[1332] Step 3:

[1333] The server uses neural networks to predict bugs and assess risk. Specifically, it analyzes each section of code and calculates the probability and impact of potential bugs. The input is the text data of the code, and the output is a risk score.

[1334] Step 4:

[1335] The server uses natural language processing technology to infer the cause of bugs from comments and documentation in the code. Specifically, it uses the BERT model to analyze text data and identify the cause of the bug. The text data from comments and documentation is used as input, and the inferred cause is obtained as output.

[1336] Step 5:

[1337] The server generates a detailed report based on the analysis results, including the bug location, risk score, probable cause, and fix suggestions. The bug prediction results and risk score are used as input, and the report is obtained as output.

[1338] Step 6:

[1339] The server uses an emotion engine to analyze the user's emotions. Specifically, it evaluates the user's input text using the BERT model to identify the user's emotional state. The user's text data is used as input, and the emotion evaluation result is obtained as output.

[1340] Step 7:

[1341] The server adjusts the notification method and content of the generated report according to the emotion and sends it to the user. Specifically, if the user's emotional state is stressed, detailed explanations and supporting information are added. The emotion assessment results are used as input, and the adjusted report is obtained as output.

[1342] Step 8:

[1343] The user checks the notified report and sends correction instructions to the server using an interactive interface. Specifically, the user enters specific corrections using a chatbot or form. The user's correction instructions are used as input, and the instructions are sent to the server as output.

[1344] Step 9:

[1345] The server modifies the code based on the user's instructions and commits it back to the repository, using the user's instructions as input and the modified code as output.

[1346] Step 10:

[1347] The server then re-analyzes the modified code to verify that the bug has been resolved. The modified code file is used as input and run through the AI ​​model again. The output is a verification result that indicates whether the modifications were correct.

[1348] The specific processing unit 290 transmits the result of the specific processing to the robot 414. In the robot 414, the control unit 46A causes the speaker 240 and the control target 443 to output the result of the specific processing. The microphone 238 acquires voice indicating a user input regarding the result of the specific processing. The control unit 46A transmits voice data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the voice data.

[1349] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.

[1350] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the robot 414.

[1351] The emotion identification model 59 as an emotion engine may determine the user's emotion according to a specific mapping. Specifically, the emotion identification model 59 may determine the user's emotion according to an emotion map (see FIG. 9), which is a specific mapping. Similarly, the emotion identification model 59 may determine the robot's emotion, and the identification processing unit 290 may perform identification processing using the robot's emotion.

[1352] FIG. 9 is a diagram illustrating an emotion map 400 on which multiple emotions are mapped. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. Emotions closer to the center of the concentric circles are more primitive. Emotions representing states and actions arising from a state of mind are arranged on the outer edges of the concentric circles. The concept of emotion includes both affect and mental states. Emotions generally generated from reactions occurring in the brain are arranged on the left side of the concentric circles. Emotions generally induced by situational judgment are arranged on the right side of the concentric circles. Emotions generally generated from reactions occurring in the brain and induced by situational judgment are arranged on the upper and lower sides of the concentric circles. Furthermore, the emotion of "pleasure" is arranged on the upper side of the concentric circles, and the emotion of "discomfort" is arranged on the lower side. In this way, in the emotion map 400, multiple emotions are mapped based on the structure by which emotions are generated, and emotions that tend to occur simultaneously are mapped close to each other.

[1353] These emotions are distributed in the 3 o'clock direction on emotion map 400, and typically fluctuate between relief and anxiety. In the right half of emotion map 400, situational awareness dominates over internal sensations, resulting in a sense of calm.

[1354] The inside of emotion map 400 represents what is going on in the mind, and the outside of emotion map 400 represents behavior, so the further you go outside emotion map 400, the more visible the emotions become (the more they are expressed in behavior).

[1355] Human emotions are based on various balances, such as posture and blood sugar levels. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. Emotions can also be created for robots, automobiles, and motorcycles, based on various balances, such as posture and remaining battery life. When these balances deviate from the ideal, a state of discomfort is indicated, and when they approach the ideal, a state of pleasure is indicated. An emotion map can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on Voice Emotion Recognition and Emotional Brain Physiological Signal Analysis Systems, Tokushima University, Doctoral Dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). The left half of the emotion map lists emotions belonging to the "reaction" domain, where sensation is dominant. The right half of the emotion map lists emotions belonging to the "situation" domain, where situational awareness is dominant.

[1356] The emotion map defines two emotions that promote learning. One is a negative emotion on the situation side, around the middle of "repentance" or "reflection." In other words, this occurs when the robot experiences negative emotions such as "I never want to feel this way again" or "I don't want to be scolded again." The other is a positive emotion on the response side, around "desire." In other words, this occurs when the robot experiences positive feelings such as "I want more" or "I want to know more."

[1357] The emotion identification model 59 inputs user input into a pre-trained neural network, obtains emotion values ​​indicating each emotion shown in the emotion map 400, and determines the user's emotion. This neural network is pre-trained based on multiple pieces of training data that are combinations of user input and emotion values ​​indicating each emotion shown in the emotion map 400. Furthermore, this neural network is trained so that emotions that are located close to each other have similar values, as in the emotion map 900 shown in FIG. 10. FIG. 10 shows an example in which multiple emotions, "relieved," "calm," and "reassuring," have similar emotion values.

[1358] The system according to the present disclosure has been described above mainly with respect to the functions of the data processing device 12, but the system according to the present disclosure is not necessarily implemented on a server. The system according to the present disclosure may be implemented as a general information processing system. The present disclosure may be implemented, for example, as a software program running on a personal computer or an application running on a smartphone, etc. The method according to the present disclosure may be provided to users in the form of SaaS (Software as a Service).

[1359] In the above embodiment, an example was given in which the specific processing is performed by one computer 22, but the technology of the present disclosure is not limited to this, and the specific processing may be distributed and performed by a plurality of computers including the computer 22. For example, the data generation model 58 may be provided in an external device of the data processing device 12, and data may be generated in the external device in accordance with input data.

[1360] In the above embodiment, an example in which the specific processing program 56 is stored in the storage 32 has been described, but the technology of the present disclosure is not limited to this. For example, the specific processing program 56 may be stored in a portable, computer-readable, non-transitory storage medium such as a USB (Universal Serial Bus) memory. The specific processing program 56 stored in the non-transitory storage medium is installed in the computer 22 of the data processing device 12. The processor 28 executes the specific processing in accordance with the specific processing program 56.

[1361] Alternatively, the specific processing program 56 may be stored in a storage device such as a server connected to the data processing device 12 via the network 54, and the specific processing program 56 may be downloaded and installed on the computer 22 in response to a request from the data processing device 12.

[1362] It is not necessary to store all of the specific processing program 56 in a storage device such as a server connected to the data processing device 12 via the network 54, or to store all of the specific processing program 56 in the storage 32; only a portion of the specific processing program 56 may be stored.

[1363] The hardware resource for executing a specific process can be any of the following processors: An example of a processor is a CPU, which is a general-purpose processor that functions as a hardware resource for executing a specific process by executing software, i.e., a program. Another example of a processor is a dedicated electrical circuit, such as an FPGA (Field-Programmable Gate Array), a PLD (Programmable Logic Device), or an ASIC (Application Specific Integrated Circuit), which is a processor with a circuit configuration designed specifically for executing a specific process. Each processor has built-in or connected memory, and each processor uses the memory to execute the specific process.

[1364] The hardware resource that executes the specific processing may be configured with one of these various processors, or may be configured with a combination of two or more processors of the same or different types (for example, a combination of multiple FPGAs, or a combination of a CPU and an FPGA). Also, the hardware resource that executes the specific processing may be a single processor.

[1365] As an example of a system configured with a single processor, first, one processor is configured by combining one or more CPUs and software, and this processor functions as a hardware resource that executes a specific process. Second, there is a system that uses a processor that realizes the functions of an entire system including multiple hardware resources that execute a specific process on a single IC chip, as typified by SoC (System-on-a-chip). In this way, a specific process is realized using one or more of the above-mentioned various processors as hardware resources.

[1366] Furthermore, the hardware structure of these various processors can be, more specifically, an electric circuit that combines circuit elements such as semiconductor devices. The specific processing described above is merely an example. Therefore, it goes without saying that unnecessary steps may be deleted, new steps may be added, or the processing order may be rearranged, without departing from the spirit of the invention.

[1367] The above-described description and illustrations are a detailed explanation of the parts related to the technology of the present disclosure and are merely an example of the technology of the present disclosure. For example, the above description of the configuration, functions, actions, and effects is an explanation of an example of the configuration, functions, actions, and effects of the parts related to the technology of the present disclosure. Therefore, it goes without saying that unnecessary parts may be deleted, new elements may be added, or replacements may be made to the above-described description and illustrations within the scope of the gist of the technology of the present disclosure. Furthermore, to avoid confusion and facilitate understanding of the parts related to the technology of the present disclosure, the above-described description and illustrations omit explanations of common technical knowledge that do not require particular explanation to enable the implementation of the technology of the present disclosure.

[1368] All publications, patent applications, and technical standards mentioned in this specification are herein incorporated by reference to the same extent as if each individual publication, patent application, or technical standard was specifically and individually indicated to be incorporated by reference.

[1369] The following is further disclosed regarding the above embodiment.

[1370] (Claim 1)

[1371] a means for obtaining the code;

[1372] a means for analyzing the code;

[1373] A means for predicting bugs by referencing a database of past bugs;

[1374] a means for calculating a risk score;

[1375] means for generating a report summarizing the results of the analysis;

[1376] means for notifying a user of the generated report;

[1377] means for receiving a user's modification instructions;

[1378] means for modifying the code based on the modification instructions;

[1379] means for reanalyzing the modified code;

[1380] A system including:

[1381] (Claim 2)

[1382] 10. The system of claim 1, further comprising means for inferring the cause of the bug from comments and documentation using natural language processing techniques.

[1383] (Claim 3)

[1384] 10. The system of claim 1, further comprising: means for predicting bugs in each portion of code using a neural network.

[1385] "Example 1"

[1386] (Claim 1)

[1387] a means for obtaining the code;

[1388] a means for analyzing the code;

[1389] A means for predicting bugs by referencing a database of past bugs;

[1390] a means for calculating a risk score;

[1391] means for generating a report summarizing the results of the analysis;

[1392] means for notifying a user of the generated report;

[1393] means for receiving a user's modification instructions;

[1394] means for modifying the code based on the modification instructions;

[1395] means for reanalyzing the modified code;

[1396] A way to automatically retrieve the latest code from the version control system,

[1397] a means for parsing and analyzing the code using an AI module;

[1398] means for accepting user instructions through an interactive interface;

[1399] a means for executing the generative AI model; and

[1400] A system including:

[1401] (Claim 2)

[1402] 10. The system of claim 1, further comprising means for inferring the cause of the bug from comments and documentation using natural language processing techniques.

[1403] (Claim 3)

[1404] 10. The system of claim 1, further comprising: means for predicting bugs in each portion of code using a neural network.

[1405] "Application Example 1"

[1406] (Claim 1)

[1407] a means for obtaining the code;

[1408] a means for analyzing the code;

[1409] a means for predicting defects by referencing a database of past defects;

[1410] a means for conducting a risk assessment;

[1411] means for generating a report summarizing the results of the analysis;

[1412] means for notifying a user of the generated report;

[1413] means for receiving user correction instructions;

[1414] means for modifying the code based on the modification instructions;

[1415] means for reanalyzing the modified code;

[1416] It targets control system code in factories and is installed on robots to streamline code review and correction.

[1417] A system including:

[1418] (Claim 2)

[1419] 10. The system of claim 1, further comprising means for inferring the cause of the bug from comments and documentation using natural language processing techniques.

[1420] (Claim 3)

[1421] 10. The system of claim 1, further comprising means for predicting defects in each portion of code using a neural network.

[1422] "Example 2: Combining Emotion Engines"

[1423] (Claim 1)

[1424] a means for obtaining the code;

[1425] a means for analyzing the code;

[1426] A means for predicting bugs by referencing a database of past bugs;

[1427] a means for calculating a risk score;

[1428] means for generating a report summarizing the results of the analysis;

[1429] means for notifying a user of the generated report;

[1430] means for receiving a user's modification instructions;

[1431] means for modifying the code based on the modification instructions;

[1432] means for reanalyzing the modified code;

[1433] means for recognizing a user's emotion and adjusting the system's behavior based on the emotion;

[1434] A means for adjusting the notification method and content based on the user's emotions;

[1435] A system including:

[1436] (Claim 2)

[1437] 10. The system of claim 1, further comprising means for inferring the cause of the bug from comments and documentation using natural language processing techniques.

[1438] (Claim 3)

[1439] 10. The system of claim 1, further comprising: means for predicting bugs in each portion of code using a neural network.

[1440] "Application example 2 when combining emotion engines"

[1441] (Claim 1)

[1442] a means for obtaining the code;

[1443] a means for analyzing the code;

[1444] A means for predicting bugs by referencing a database of past bugs;

[1445] a means for calculating a risk score;

[1446] means for generating a report summarizing the results of the analysis;

[1447] means for notifying a user of the generated report;

[1448] means for receiving a user's modification instructions;

[1449] means for modifying the code based on the modification instructions;

[1450] means for reanalyzing the modified code;

[1451] means for recognizing a user's emotion;

[1452] A means for adjusting the notification method and content of the report according to the user's emotions;

[1453] A system including:

[1454] (Claim 2)

[1455] 10. The system of claim 1, further comprising means for inferring the cause of the bug from comments and documentation using natural language processing techniques.

[1456] (Claim 3)

[1457] 10. The system of claim 1, further comprising: means for predicting bugs in each portion of code using a neural network. [Explanation of symbols]

[1458] 10, 210, 310, 410 Data Processing Systems 12 Data Processing Device 14 Smart Devices 214 Smart Glasses 314 Headset-type terminal 414 Robot< / url:> < / url:> < / url:> < / url:>

Claims

1. a means for obtaining the code; a means for analyzing the code; A means for predicting bugs by referencing a database of past bugs; a means for calculating a risk score; means for generating a report summarizing the results of the analysis; means for notifying a user of the generated report; means for receiving a user's modification instructions; means for modifying the code based on the modification instructions; means for reanalyzing the modified code; A system including:

2. The system of claim 1 , further comprising means for inferring the cause of the bug from comments and documents using natural language processing techniques.

3. 10. The system of claim 1, further comprising means for predicting bugs in each portion of code using a neural network.

Citation Information

Patent Citations

  • Persona chatbot control method and system

    JP2022180282A