Systems and methods for code and deviation management

The system uses a large-scale language model to automate code and deviation management, addressing inefficiencies and errors in manual processes by providing intelligent code analysis and deviation handling, improving software development efficiency.

JP7772264B2Active Publication Date: 2025-11-18TOYOTA JIDOSHA KK
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025007706
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2024-02-28
Filing Date
2025-01-20
Publication Date
2025-11-18
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

Existing manual code review and deviation management processes are time-consuming, prone to errors, and inefficient, particularly when multiple coding rule violations occur, lacking automated intelligence to identify violations and suggest effective fixes.

Method used

A system utilizing a large-scale language model (LLM) to analyze source code for coding rule violations, provide feedback, and manage deviations, including automatic code fixes and deviation report generation, facilitated by user interaction through graphical user interfaces.

Benefits of technology

Enables efficient and accurate management of coding rule deviations with reduced human error, providing real-time intelligent solutions for code fixes and deviation reports, enhancing the software development process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007772264000001
    Figure 0007772264000001
  • Figure 0007772264000002
    Figure 0007772264000002
  • Figure 0007772264000003
    Figure 0007772264000003
Patent Text Reader

Abstract

To provide a method and a system that intelligently identify coding rule violation, present executable code correction, and review and propose a proper deviation-related operation.SOLUTION: A method implemented using a large language model (LLM) includes the steps of: receiving source code from a user; determining whether or not the source code violates a coding rule; presenting violation-related information to the user on the basis of the determination that the source code violates the coding rule; receiving a user feedback related to the presented information from the user; determining whether or not a rule deviation is carried out on the basis of the user feedback; executing an operation for managing a deviation report on the basis of the determination that the rule deviation should be carried out; and executing an operation for managing the source code on the basis of the determination that no rule deviation should be carried out.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] FIELD OF THE DISCLOSURE Exemplary embodiments of the present disclosure relate to code and deviation management, and more particularly to code analysis and coding rule deviation management. [Background technology]

[0002] In the software development process, adherence to and compliance with coding rules is important to ensure code quality, security, maintainability, and overall system integrity. It is important to ensure that source code conforms to relevant coding rules (standard coding rules, internal coding rules, etc.) and to ensure that source code does not deviate from the relevant coding rules. When deviations from coding rules are unavoidable, the deviations must be carefully handled and managed.

[0003] In related technologies, users (software engineers, etc.) are familiar with continuous integration / It requires manual analysis of source code through a continuous delivery (CI / CD) procedure. In this procedure, users must carefully review the source code using a large list of coding rules, thereby determining whether the source code violates any of the coding rules. If users determine that the source code violates a coding rule, they must manually determine code modifications that can avoid the coding rule violation. In this regard, users must manually explore potential solutions.

[0004] Furthermore, if a user determines that a coding rule violation is unavoidable, the user must manually check whether there are any deviations that have resolved similar issues in the past or whether an existing deviation can be modified to address the coding rule violation. The user must then manually submit a new deviation based on the determination that no deviations are available. This requires a second user (e.g., a member of a coding rules committee) to review the new deviation request, manually assign a deviation ID to the specific instance, and then provide the results of the review (e.g., whether the request was approved or rejected) to the first user (e.g., the software engineer who submitted the new deviation).

[0005] In view of the above, in the related art, the procedures of manual code review, manual code correction analysis (when code violates coding rules), and manual deviation management (e.g., reviewing available rule deviations, correcting existing rule deviations, submitting new rule deviations, etc.) require considerable time and effort from the users involved. Such manual procedures are prone to oversight and human error. In particular, whenever source code violates multiple coding rules, the solutions for addressing such violations may be complex, and users may not be able to easily or effectively find viable solutions for addressing the violations.

[0006] Furthermore, users may not be able to effectively or accurately determine whether a rule deviation should be implemented. For example, users may not realize that a potential code fix (to address the violation) could avoid the rule deviation, they may not realize that an existing deviation report could be modified to avoid creating a new one, and they may create the same deviation report again without realizing that the same deviation report was created in the past. This can result in redundant resources being wasted and complicate code and deviation management.

[0007] Furthermore, related art systems and methods lack the ability to intelligently or automatically handle code and coding rule deviation management, resulting in inefficiencies and delays in the software development process. Furthermore, related art systems and methods often fail to provide comprehensive solutions when a user encounters a coding rule violation, leading to time-consuming manual intervention and potential errors in code correction.

[0008] Due to at least the aforementioned problems, there is a need for an automated solution that can intelligently identify coding rule violations, suggest actionable code fixes, and review and suggest appropriate deviation-related actions. Summary of the Invention

[0009] Exemplary embodiments consistent with the present disclosure provide methods, systems, and apparatus for effectively and efficiently managing code and coding rule deviations associated with the code.

[0010] According to an embodiment, a method is provided that is executed by at least one processor of a system when executing instructions for implementing a large-scale language model (LLM), the method including: receiving source code from a first user, determining whether the source code violates at least one coding rule, presenting information related to the violation of the at least one coding rule to the first user based on a determination that the source code violates the at least one coding rule, receiving first user feedback from the first user related to the presented information, determining whether at least one rule deviation should be implemented based on the first user feedback, performing at least one operation to manage at least one deviation report in accordance with the first user feedback based on a determination that the at least one rule deviation should not be implemented, and performing at least one operation to manage the source code based on a determination that the at least one rule deviation should not be implemented.

[0011] According to an embodiment, a system for code and deviation management is provided, the system including: a storage device storing computer-executable instructions for implementing a large language model (LLM); and at least one processor communicatively coupled to the storage device, wherein the at least one processor is configured to execute the instructions to receive source code from a first user, determine whether the source code violates at least one coding rule, present information related to the violation of the at least one coding rule to the first user based on a determination that the source code violates the at least one coding rule, receive first user feedback from the first user related to the presented information, determine based on the first user feedback whether the at least one rule deviation should be implemented, perform at least one operation to manage at least one deviation report in accordance with the first user feedback based on a determination that the at least one rule deviation should be implemented, and perform at least one operation to manage the source code based on a determination that the at least one rule deviation should not be implemented.

[0012] Additional aspects will be set forth in part in the description that follows, and in part will be apparent from the description, or may be realized by practice of presented embodiments of the disclosure. [Brief explanation of the drawings]

[0013] [Figure 1] FIG. 1 illustrates a block diagram of an exemplary system architecture according to one or more embodiments. [Figure 2] FIG. 2 illustrates exemplary components of a code and deviation management system according to one or more embodiments. [Figure 3] FIG. 3 illustrates a flow diagram of an exemplary method for reviewing source code and performing one or more actions based on the review, according to one or more embodiments. [Figure 4]FIG. 4 illustrates a flow diagram of an exemplary method for determining whether at least one rule deviation should be implemented, according to one or more embodiments. [Figure 5] FIG. 5 illustrates a flow diagram of an exemplary method for determining at least one action to respond to a coding rule violation, according to one or more embodiments. [Figure 6] FIG. 6 illustrates an example of a deviation report according to one or more embodiments. [Figure 7] FIG. 7 illustrates several exemplary graphical user interface (GUI) diagrams according to one or more embodiments. [Figure 8] FIG. 8 illustrates several exemplary graphical user interface (GUI) diagrams according to one or more embodiments. [Figure 9A] FIG. 9A illustrates some exemplary graphical user interface (GUI) diagrams according to one or more embodiments. [Figure 9B] FIG. 9B illustrates some exemplary graphical user interface (GUI) diagrams according to one or more embodiments. DETAILED DESCRIPTION OF THE INVENTION

[0014] The features, advantages and significance of exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which like reference numerals indicate like elements, and in which:

[0015] The following detailed description of exemplary embodiments refers to the accompanying drawings. The foregoing disclosure provides illustration and description, but is not intended to be exhaustive or to limit implementations to the precise form disclosed. Modifications and variations are possible in light of the above disclosure or may be acquired from practice of implementations. Moreover, one or more features or components of one embodiment may be incorporated into or combined with another embodiment (or one or more features of another embodiment). Furthermore, in the flowcharts and descriptions of operations provided below, it should be understood that one or more operations may be omitted, one or more operations may be added, one or more operations may be performed concurrently (at least in part), and the order of one or more operations may be rearranged.

[0016] Although particular combinations of features may be recited in the claims and / or disclosed in the specification, such combinations are not intended to limit the disclosure of possible implementations. Indeed, many of such features can be combined in ways not specifically recited in the claims and / or disclosed in the specification. Although each dependent claim listed below may depend directly on only one claim, the disclosure of possible implementations includes each dependent claim combined with every other claim in the group.

[0017] As used herein, no element, act, or instruction should be construed as critical or required unless expressly described as such. Also, as used herein, the terms "have," "having," "include," "including," and the like are intended to be open-ended terms. Further, the phrase "based on" is intended to mean "based at least in part on," unless expressly stated otherwise. Furthermore, phrases such as "A and / or B," "at least one of A and B," or "at least one of A or B" are understood to include A only, B only, or both A and B.

[0018] References throughout this specification to "one embodiment," "one embodiment," "non-limiting exemplary embodiment," or similar language mean that at least one embodiment of the solution includes a particular feature, structure, or characteristic described in connection with the illustrated embodiment. Thus, throughout this specification, the phrases "in one embodiment," "in one embodiment," "in one non-limiting exemplary embodiment," and similar language do not necessarily all refer to the same embodiment, but may all refer to the same embodiment.

[0019] Furthermore, the described features, advantages, and characteristics of the present disclosure may be combined in any suitable manner in one or more embodiments. Those skilled in the art will recognize in light of the description herein that the present disclosure can be practiced without one or more of the specific features or advantages of a particular embodiment. In other instances, additional features and advantages may be recognized in a particular embodiment that may not be present in any of the embodiments of the present disclosure.

[0020] Furthermore, although exemplary embodiments of the present disclosure are described in connection with "source code," it is contemplated that the present disclosure is equally applicable to any suitable type of software programming code (e.g., machine code, object code, byte code, script code, markup code, configuration code, database code, etc.) without departing from the scope of the present disclosure.

[0021] Figure 1 illustrates a block diagram of an exemplary system architecture 100 according to one or more embodiments. As shown in Figure 1, a code and deviation management system 110 (hereinafter "system 110") includes a large-scale language model (LLM) module 112 (hereinafter "module 112"), a user interface (UI) module 114 (hereinafter "module 114"), a deviation management module 116 (hereinafter "module 116"), and a deviation management database 118 (hereinafter "database 118").

[0022] According to embodiments, one or more of the components of system 110 (i.e., components 112-118) are implemented in various forms, such as hardware, firmware, or a combination of hardware and software. In this regard, it is contemplated that one or more operations described herein with respect to each of components 112-118 may be performed by hardware (e.g., a processor) when executing software or computer-executable instructions to implement components 112-118.

[0023] 1 illustrates components 112-118 as being included in system 110, it is contemplated that one or more of the components may be excluded from system 110 without departing from the scope of the present disclosure. For example, module 112 and module 114 may be implemented on a first server, and module 116 and / or database 118 may be implemented on a second server that is different from the first server.

[0024] LLM module 112 is configured to interact with module 114, module 116, and database 118 to review or analyze programming code, identify one or more deviations from one or more coding rules, and perform one or more actions to assist one or more users in managing and addressing the one or more deviations. In another embodiment, LLM module 112 is configured to interact with a module implemented with rules-based code (instead of or in addition to AI / ML models) to analyze programming code. According to an embodiment, implementation of LLM module 112 enables an automated process for handling coding rule deviation cases. For example, LLM module 112 may suggest or implement automatic code fixes, deviation report generation, and / or deviation report fixes, thereby enabling relevant users to efficiently and consistently address coding rule deviations.

[0025] According to an embodiment, the LLM module 112 (or a component configured to implement the module 112) receives at least one programming code (e.g., source code 120) and at least one coding rule (e.g., coding rule 130), then performs one or more natural language processing (NLP) operations to process the code and manages deviations from the coding rules (if any) based on the results of the processing.

[0026] The one or more NLP operations include, for example, code analysis, detection of coding rule violations, context-aware interaction with a user, and deviation management. Code analysis includes one or more of identifying code fixes, interpreting the structure, meaning, and / or purpose of code, extracting or summarizing the context of code, and understanding relationships between code elements (e.g., syntax, comments, descriptions, etc.). Coding rule violation detection includes one or more of identifying instances of coding rule violations in the analyzed code, classifying the violations, and assessing the severity of the violations. User interaction includes one or more of providing code analysis information, analyzing user feedback, providing code fix recommendations, providing deviation report fix recommendations, providing deviation report creation recommendations, and requesting supplemental information from a user. Deviation management includes one or more of creating and submitting a new deviation report, modifying an existing deviation report, submitting a new deviation report and / or requesting notification and approval for modifying an existing deviation report, etc.

[0027] According to an embodiment, the LLM module 112 executes or utilizes one or more artificial intelligence (AI) / machine learning (ML) models to perform one or more operations described herein. The one or more AI / ML models may include one or more Transformer models, one or more recurrent neural network (RNN) models, one or more embeddings from language models (e.g., ELMo), and / or other suitable types of models trained based on any other suitable learning architecture.

[0028] According to an embodiment, the LLM module 112 is configured to receive the source code 120 and the coding rules 130 from one or more sources external to the system 110. For example, the LLM module 112 receives the source code 120 from a first user equipment (UE) 150, receives the coding rules 130 from a second UE 160, or receives the source code 120 and / or the coding rules 130 from any other suitable source. Additionally, the LLM module 112 receives the source code 120 and / or the coding rules 130 via the UI module 114 (or one or more interfaces generated and presented by the UI module 114).

[0029] According to an embodiment, coding rules 130 are pre-stored in a repository and retrieved as needed by LLM module 112. For example, upon receiving source code 120, LLM module 112 determines which coding rules are associated with source code 120 and then retrieves the associated coding rules.

[0030] Source code 120 may include new source code, modified source code (such as updated code, revised code, etc.), or differences (diffs) between different versions of source code. Furthermore, source code 120 may be defined or written in Java, Python, C, C++, JavaScript, PHP, Ruby, Swift, Go, Rust, or any suitable programming language.

[0031] Coding rules 130 include one or more sets of coding rules to which source code 120 is expected to conform. The coding rules include various aspects of coding requirements, such as code indentation, naming conventions, variable use, code complexity, security requirements, etc. According to an embodiment, coding rules 130 include one or more standard coding rules, such as the Automotive Industry Software Reliability Association (MISRA) coding rules, the Automotive Open Systems Architecture (AUTOSAR) coding rules, or the Computer Emergency Response Team (CERT) coding rules. Additionally or alternatively, coding rules 130 may include one or more internal rules configured or managed by a dedicated user and / or team (e.g., a rules committee, etc.) that manages or operates system 110.

[0032] According to an embodiment, source code 120 is provided by a first user via first UE 150, and coding rules 130 are provided by a second user via second UE 160. Alternatively, source code 120 and / or coding rules 130 may be provided by one or more components different from first UE 150 and / or second UE 160. For example, source code 120 is stored in code management system 140 (hereinafter "system 140") and retrieved by LLM module 112 as needed. Similarly, coding rules 130 may be pre-stored in a repository or server and retrieved by system 110 as needed.

[0033] Upon receiving the source code 120 and the coding rules 130, the LLM module 112 is configured to review or analyze the source code 120 to determine whether the source code 120 violates the coding rules 130. For example, the LLM module 112 may scan the source code 120 to determine whether the source code 120 contains issues such as inconsistent formatting, use of prohibited constructs, the appearance of typographical errors, insufficient security features, and / or other violations of the coding rules 130.

[0034] According to an embodiment, based on a determination that the source code 120 violates the coding rules 130, the LLM module 112 interacts with a user interface (UI) module 114 to communicate and interact with a first user associated with the first UE 150 and then manages the source code based on one or more feedback provided by the first user via the first UE 150. For example, the module 112 determines instances in which the source code 120 violates the coding rules 130 and provides that information to the module 114. To that end, the module 114 may generate one or more UIs that include the information provided by the module 112 and then present the one or more UIs to the first UE 150, thereby informing the first user of information related to the violation (which may be referred to herein as “violation information”).

[0035] According to an embodiment, module 112 receives one or more user feedbacks from first UE 150 via one or more UIs presented by UI module 114. Module 112 then determines whether at least one rule deviation should be implemented based on the one or more user feedbacks.

[0036] Based on a determination that at least one rule deviation should be implemented, module 112 summarizes the one or more user feedbacks and interacts with module 116 and database 118 to manage one or more deviation reports based on the summary of user feedback. For example, module 112 creates one or more new deviation reports, directs module 116 to create one or more new deviation reports, retrieves one or more existing deviation reports from database 118, modifies one or more existing deviation reports, directs module 116 to modify one or more existing deviation reports, directs module 116 to interact or communicate with a second user, etc.

[0037] Meanwhile, module 112 performs one or more actions to manage source code 120 based on a determination that at least one rule deviation should not be executed. For example, module 112 modifies source code 120 based on at least one code modification presented to and agreed to by the first user, thereby avoiding violations of coding rules 130. Module 112 then outputs or provides modified source code 120 to code management system 140. For example, module 112 generates and sends a pull request command, a merge request command, a push command, and / or any other appropriate request or message to system 140, so that system 140 appropriately receives and stores modified source code 120. Module 112 may provide a notification or trigger to module 114 upon successful saving or uploading of modified source code 120, and module 114 generates and presents a notification message to first UE 150 to notify the first user that the modified source code 120 has been successfully uploaded. Alternatively, module 112 may not modify source code 120 and return source code 120 to the first user for modification or review.

[0038] According to an embodiment, module 112 outputs or provides reviewed source code 120 to code management system 140 based on a determination that source code 120 does not violate coding rules 130. For example, module 112 generates and sends merge and / or push commands (or any other suitable requests or messages) to system 140 so that system 140 may properly receive and store reviewed source code 120. Upon successful storage or upload of reviewed source code 120, module 112 provides a notification or trigger to module 114, which generates and presents a notification message to first UE 150 to notify the first user of the successful review and / or upload of reviewed source code 120.

[0039] The UI module 114 (or a component configured to implement the module 114) is configured to facilitate communication or interaction with one or more users. For example, the module 114 enables a first user to interact with the system 110 via the first UE 150. Specifically, the module 114 receives information or data from the module 112 and then generates and presents one or more user interfaces for interacting with the first user. Additionally, the module 114 receives one or more user feedbacks from the first user via the presented user interfaces and then provides the one or more user feedbacks to the module 112.

[0040] According to an embodiment, the one or more user interfaces generated by module 114 include one or more graphical user interfaces (GUIs) that include one or more chat windows (and / or other interactive interfaces) and one or more interactive elements that facilitate real-time (or near real-time) interaction and communication with one or more users during the code review and / or deviation management procedure. According to an embodiment, module 114 (or one or more GUIs generated by the module) receives source code 120 from first UE 150 via one or more GUIs, presents information related to code review (e.g., results of the code review, coding rules that were violated, portions of the code that violate the coding rules, etc.), presents information related to deviation management (e.g., code modification options to avoid coding rule violations, options to modify existing deviation reports, rule deviation options, etc.), presents notifications requesting one or more users to provide supplemental information, and receives one or more user feedback (e.g., user approval or rejection of presented options, user comments or queries, user additions to requested information, user explanations as to why rule violations are difficult to correct, user explanations as to the user's current design and implementation background, etc.).

[0041] Module 114 may be implemented to generate and present one or more GUIs as a communication channel between system 110 and one or more users (e.g., a first user of first UE 150, a second user of second UE 160, etc.), thereby providing an intuitive and interactive code review and deviation management procedure. Examples of GUIs generated and presented by module 114 are described below with reference to Figures 7 through 9B.

[0042] Deviation management module 116 (or a component configured to implement module 116) is configured to perform one or more operations to manage one or more deviation reports associated with one or more coding rule deviations (identified by module 112).

[0043] According to an embodiment, module 116 provides a deviation report template to module 112, thereby enabling module 112 to use the deviation report template to create new deviation reports as needed. The deviation report template outlines the structure and content requirements of the deviation report and includes placeholder or default parameters into which specific details of each rule violation and associated deviation can be entered. When module 116 (or any other component or module that uses the deviation report template to create a new deviation report) detects a coding rule violation, it obtains relevant information from module 112 (e.g., a new deviation ID, the ID of the violated coding rule, the ID of the associated deviation, information about the responsible user, the reason for the deviation, information about the deviation risk, information about how the risk of the deviation can be controlled and mitigated, etc.) and then enters the obtained information into the corresponding sections of the report template, thereby creating a new deviation report. According to an embodiment, a new deviation ID is assigned by module 112, and relevant information is extracted or generated by module 112 (e.g., based on one or more user feedback). This new deviation ID and relevant information are then provided to module 116 along with instructions for creating a new deviation report. Alternatively, module 112 provides the relevant information along with instructions to create a new deviation report to module 116, which assigns a new deviation ID when creating the new deviation report.

[0044] A deviation report serves as a structured and organized document that presents information about coding rule deviations and related details to relevant users or stakeholders. A deviation report may provide a summary or overview of one or more rule deviations. According to an embodiment, a deviation report may include information for multiple rule deviations. An example deviation report is described below with reference to FIG. 6.

[0045] According to an embodiment, module 116 retrieves an existing deviation report from deviation management database 118 and updates the deviation report based on information provided by module 112. Alternatively, or in addition, module 116 may provide a stored deviation report to module 112, which may then update the stored deviation report. In some embodiments, it is contemplated that module 112 may directly communicate with database 118 to retrieve a stored deviation report, update the stored deviation report, and then store the updated deviation report in database 118 without departing from the scope of the present disclosure.

[0046] According to an embodiment, module 116 stores one or more deviation reports in database 118. For example, module 116 receives new and / or updated deviation reports from module 112 and then stores the new / updated deviation reports in database 118. Similarly, module 116 stores new and / or updated deviation reports processed by module 116 in database 118.

[0047] According to an embodiment, module 116 is configured to facilitate communication or interaction with a second user associated with second UE 160. Specifically, module 116 generates one or more UIs (e.g., GUIs, etc.) including information of the deviation report, such as information of a new deviation report, information of a modified deviation report, etc., and presents them to the second user via second UE 160. Additionally, module 116 receives one or more feedbacks from the second user via the presented UIs, such as a rejection of the new / modified deviation report, an acceptance of the new / modified deviation report, a request for supplemental information, etc.

[0048] According to an embodiment, module 116 is communicatively coupled to module 114 (e.g., coupled to module 114 via module 112 or directly to module 114) and interacts with module 114 to generate and present one or more UIs to second UE 160. Alternatively, or in addition, another UI module (or operations related to generating and presenting a UI) may be implemented in module 116.

[0049] Deviation management database 118 (or a component configured to implement database 118) includes one or more storage media or repositories that may be configured to store one or more deviation reports (e.g., new deviation reports, modified deviation reports, etc.). For example, database 118 is configured to receive one or more deviation reports from module 116 and / or module 112 and then store the received deviation reports. Furthermore, database 118 is configured to, in response to a request from module 116 and / or module 112, retrieve one or more deviation reports associated with the request and provide the retrieved one or more deviation reports to module 116 and / or module 112. In some embodiments, deviation management database 118 stores one or more deviation reports in a relational database (RDB). In some embodiments, deviation management database 118 stores one or more deviation reports in a tabular format, such as a spreadsheet, comma-separated values ​​(CSV), or the like.

[0050] First user equipment (UE) 150 and second UE 160 are each associated with a respective user. For example, first UE 150 is associated with a first user (e.g., a software engineer, a test engineer, etc.) who manages source code 120, and second UE 160 is associated with a second user (e.g., a member of a rules committee, an administrator of the first user, etc.) who manages coding rules 130. UE 150 and UE 160 include one or more devices or equipment that enable their respective users to access system 110. For example, UE 150 and UE 160 each include a computing device (e.g., a desktop computer, a laptop computer, a tablet computer, a handheld computer, a smart speaker, a server, etc.), a mobile device (e.g., a smartphone, etc.), a SIM-based device, or other suitable device that may be associated with one or more users. Furthermore, first UE 150 and / or second UE 160 may include, for example, a workstation, a software testing system, a software development system, etc.

[0051] According to an embodiment, the first UE 150 enables an associated user (e.g., a first user) to submit or upload source code 120 to module 112 (e.g., via one or more GUIs generated and presented by module 114, etc.), receive information related to the code review performed by module 112 (e.g., results of the code review, coding rules that were violated, portions of the source code that violate the coding rules, etc.), receive information related to deviation management (e.g., code modification options to avoid rule violations and coding rule deviations, rule deviation report modification options, rule deviation options, etc.), and provide one or more user feedback to module 112 (e.g., via one or more GUIs generated and presented by module 114, etc.) (e.g., approval of the presented option, supplemental information needed, a user explanation as to why the presented option is difficult to apply, a user explanation of background on the user's current design and implementation, etc.).

[0052] Similarly, the second UE 160 enables an associated user (e.g., a second user) to receive information or requests related to deviation management (e.g., a new deviation report, a correction to an existing deviation report, etc.) and provide one or more user feedbacks (e.g., approval of a new deviation report, comments regarding a correction to an existing deviation report, a request for supplemental information, etc.) to the module 116.

[0053] Code management system 140 (or a component configured to implement system 140) may include a code repository, a code version control system (VCS), a distributed code version control system (DVCS), a continuous integration / continuous deployment (CI / CD) system, or any other suitable device that may be configured to manage one or more pieces of code (e.g., source code 120, etc.) analyzed and output by system 110. For example, in some embodiments, code management system 140 includes GitHub®, GitLab®, etc.

[0054] Communication between system 110, system 140, first UE 150, and / or second UE 160 may be performed via one or more wired communications and / or one or more wireless communications. For example, communication may be performed via one or more of a cellular network (e.g., a fifth-generation (5G) network, a sixth-generation (6G) network, a long-term evolution (LTE) network, a third-generation (3G) network, a code division multiple access (CDMA) network, etc.), a public land mobile network (PLMN), a local area network (LAN), a closed area network (CAN), a wide area network (WAN), a metropolitan area network (MAN), a telephone network (e.g., a public switched telephone network (PSTN)), a private network, an ad hoc network, an intranet, the Internet, a fiber-optic-based network, etc.

[0055] In view of the above, exemplary embodiments of the present disclosure provide a system that automatically analyzes or reviews source code, then identifies whether the source code violates coding rules and whether any deviation management is required, and then outputs the source code to a code management system. Furthermore, the system of the exemplary embodiments facilitates interactive and real-time (or near real-time) communication with relevant users (e.g., software engineers, coding rule managers, etc.) throughout the code review and deviation management procedure. Furthermore, the system of the exemplary embodiments intelligently suggests possible code fixes, deviation report fixes, and / or new deviation report creation in response to real-time conditions and user feedback.

[0056] 2 illustrates exemplary components of a code and deviation management system 200 (hereinafter "system 200") according to one or more embodiments. System 200 of FIG. 2 corresponds to system 110 of FIG. 1, and therefore, it is contemplated that features described herein with reference to systems 110 and 200 are applicable to one another unless expressly stated otherwise. Furthermore, one or more components of system 110 (e.g., modules 112-116 and database 118) may be implemented by one or more components of system 200.

[0057] 2, system 200 includes at least one bus 210, at least one processor 220, at least one memory 230, at least one storage component 240, at least one input component 250, at least one output component 260, and at least one communication interface 270. It is contemplated that system 200 may include more or fewer components than those shown in FIG. 2 without departing from the scope of the present disclosure. For example, in some embodiments, components 250-260 are optional and may be omitted from system 200, or multiple storage components 240 may be included.

[0058] At least one bus 210 includes one or more components that enable communication between components of system 200. At least one processor 220 is implemented in hardware, firmware, or a combination of hardware and software. According to embodiments, processor 220 includes a central processing unit (CPU), a graphics processing unit (GPU), a tensor processing unit (TPU), an accelerated processing unit (APU), a microprocessor, a microcontroller, a digital signal processor (DSP), a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), and / or another type of processing or computing component. In some implementations, processor 220 includes one or more processors that are programmable to perform one or more operations described herein.

[0059] At least one memory 230 includes random access memory (RAM), read-only memory (ROM), and / or another type of dynamic or static storage device (e.g., flash memory, magnetic memory, and / or optical memory) that stores information and / or instructions used by processor 220. At least one storage component 240 stores information and / or software related to the operation and use of system 200. For example, storage component 240 may include a hard disk (e.g., a magnetic disk, optical disk, magneto-optical disk, and / or solid-state disk), a compact disk (CD), a digital versatile disk (DVD), a floppy disk, a cartridge, a magnetic tape, and / or another type of non-transitory computer-readable medium and corresponding drive. According to an embodiment, storage component 240 may be configured to store computer-readable or computer-executable instructions for implementing one or more modules of the system (e.g., an LLM module, a UI module, a deviation management module, etc.), one or more AI / ML models for implementing the LLM module, one or more coding rules, etc., and provide the stored information to memory 230 for execution or utilization by processor 220 as needed.

[0060] At least one input component 250 includes one or more components (e.g., a touchscreen display, a keyboard, a keypad, a mouse, buttons, switches, and / or a microphone) that enable system 200 to receive information, such as via user input. Additionally or alternatively, input component 250 may include sensors for detecting information (e.g., a global positioning system (GPS) component, an accelerometer, a gyroscope, and / or an actuator). At least one output component 260 includes one or more components (e.g., a display, a speaker, and / or one or more light-emitting diodes (LEDs)) that provide output information from system 200. In some embodiments, input component 250 and output component 260 are combined into a single component that can receive and output information.

[0061] At least one communication interface 270 includes transceiver-like components (e.g., a transceiver and / or a separate receiver and transmitter) that enable system 200 to communicate with other devices, such as via a wired connection, a wireless connection, or a combination of wired and wireless connections. Communication interface 270 enables system 200 to receive information from and / or provide information to another device (e.g., one or more UEs, a component configured to implement a code management system, etc.). For example, communication interface 270 may include an Ethernet interface, an optical interface, a coaxial interface, an infrared interface, a radio frequency (RF) interface, a universal serial bus (USB) interface, a Wi-Fi interface, a cellular network interface, etc.

[0062] According to one or more embodiments, communication interface 270 includes at least one input / output (I / O) interface, at least one network interface, at least one storage interface, etc., that enable components 220-260 to communicate with other devices. Additionally, communication interface 270 includes one or more application programming interfaces (APIs) that enable system 200 (or one or more components included in system 200) to communicate with one or more software applications (e.g., software applications implemented in one or more UEs, software applications implemented in a code management system, etc.).

[0063] System 200 performs one or more operations described herein in response to at least one processor 220 executing computer-executable instructions for implementing one or more of components 112-118 of FIG. 1. Such computer-executable instructions are stored by a non-transitory computer-readable storage medium, such as memory 230 and / or storage component 240. A computer-readable medium is defined herein as a non-transitory memory device. A memory device includes memory space within a single physical storage device or memory space spanning multiple physical storage devices.

[0064] According to embodiments, computer-executable instructions (e.g., software instructions) are loaded into memory 230 and / or storage component 240 from another computer-readable medium or from another device via communication interface 270. The computer-executable instructions stored in memory 230 and / or storage component 240, when executed, cause processor 220 to perform one or more processes or operations described herein. Additionally, or alternatively, hardwired circuitry may be used in place of or in combination with software instructions to perform one or more processes described herein. Thus, implementations described herein are not limited to any particular combination of hardware circuitry and software. Exemplary operations that may be performed by the systems of example embodiments are described below with reference to FIGS. 3 through 9B.

[0065] 3 illustrates a flow diagram of an example method 300 for reviewing source code and performing one or more actions based on the review, according to one or more embodiments. One or more actions of method 300 are performed by at least one processor of an example embodiment system (e.g., processor 220 of FIG. 2). For example, the at least one processor executes at least an LLM module (or computer-executable instructions for implementing an LLM) to perform one or more actions described herein.

[0066] 3, in operation S301, at least one processor is configured to receive at least one source code. For example, the at least one processor receives source code (e.g., source code 120 of FIG. 1) from a first user (e.g., a software engineer). According to an embodiment, the at least one processor receives the source code from user equipment (e.g., first UE 150). According to an embodiment, the at least one processor receives the source code from one or more GUIs presented to the first user. Alternatively, or in addition, the at least one processor may receive the source code via an input component (e.g., input component 250 of FIG. 2).

[0067] Upon receiving source code, method 300 proceeds to operation S302, where at least one processor is configured to determine whether the source code violates at least one coding rule. For example, the at least one processor may determine at least one coding rule (e.g., coding rule 130) associated with the received source code and then retrieve the at least one coding rule (e.g., from a repository that stores the at least one coding rule, an associated UE, etc.). The at least one processor then compares the source code with the at least one coding rule to determine whether the source code violates one or more requirements or conditions defined in the at least one coding rule.

[0068] According to an embodiment, at least one processor is configured to perform static code analysis on the source code. For example, the at least one processor parses or decomposes the source code into individual pieces of information (e.g., statements, tokens, expressions, etc.), thereby summarizing the source code into one or more abstract syntax trees (ASTs) (or any other suitable information representation structure). The at least one processor then traverses the one or more ASTs and checks each node in the AST with reference to at least one coding rule to identify potential violations. In this manner, the at least one processor determines one or more requirements or conditions defined in the at least one coding rule and scans the source code to identify any portions or occurrences that match the one or more requirements or conditions.

[0069] Based on a determination that the source code does not violate at least one coding rule, method 300 proceeds to operation S303, where the at least one processor is configured to output the source code. For example, the at least one processor outputs the source code to a code management system (e.g., system 140 of FIG. 1 ) for further processing without modifying the source code. In this case, the at least one processor further generates and provides a notification to the first user to notify the first user about the completion of the code analysis and the upload of the source code without any coding rule violations or deviations. Thereafter, method 300 ends. In another embodiment, based on a determination that the source code does not violate at least one coding rule, the at least one processor simply notifies the relevant user of the notification without outputting the source code to the code management system.

[0070] Meanwhile, based on a determination that the source code violates at least one coding rule, method 300 may proceed to operation S304, where the at least one processor may be configured to present information related to the violation of the at least one coding rule to the first user.

[0071] The violation information may include the nature of the violation (e.g., code format violation, security practice violation, etc.), the portion of the source code that violates the coding rule (e.g., line number, code context causing the violation, etc.), a description of the coding rule that was violated (e.g., name of the coding rule, type of coding rule, etc.), options for modifying the code to avoid the violation (if available), options for modifying an existing deviation report to address the violation (if available), a notice that a new deviation must be created, a request for additional information, and / or any other appropriate information.

[0072] According to an embodiment, the at least one processor is configured to generate at least one GUI. The at least one GUI includes at least one chat window and at least one interactive element, where the at least one chat window includes violation information and the at least one interactive element allows a first user to interact with the GUI. The at least one processor is then configured to present the at least one GUI to the first user via an associated UE (e.g., first UE 150), thereby presenting the violation information to the first user. Exemplary GUIs according to embodiments are described below with reference to Figures 7 through 9B.

[0073] Upon presenting the violation information, the method proceeds to operation S305, where the at least one processor is configured to receive at least one user feedback (hereinafter "first user feedback") from the first user related to the presented information, wherein the first user feedback includes information utilized by the at least one processor to determine whether the at least one rule deviation should be implemented.

[0074] For example, the violation information (presented by the at least one processor in act S304) includes information on at least one code fix to avoid the violation. In this case, the first user feedback (received by the at least one processor in act S305) includes approval or rejection of the at least one presented code fix, a question or query from the first user regarding the presented information and / or coding rule violation, supplemental information that may be used to re-determine an appropriate code fix, (if the fix is ​​not accepted) why the code fix is ​​not accepted, information about the current design and implementation background, information about design and implementation constraints, etc. An example embodiment in this regard is described below with reference to FIG. 4.

[0075] As another example, the violation information (presented by the at least one processor in act S304) includes information on at least one modification to at least one existing deviation report to avoid the violation (herein a "deviation report modification"). In this case, the first user feedback (received by the at least one processor in act S305) includes approval or rejection of the at least one deviation report modification, a question or query of the first user regarding the presented information and / or the associated deviation report, supplemental information that may be utilized to redetermine an appropriate deviation report modification, etc. An example embodiment in this regard is described below with reference to FIG. 5.

[0076] In some embodiments, upon receiving user feedback, method 300 returns to operation S304, where the at least one processor is configured to present additional information. For example, the at least one processor evaluates the first user feedback (and any supplemental information, if available), redetermines additional or alternative solutions (e.g., code fixes, deviation report fixes, etc.) to address the coding rule violation based on the evaluation, and updates the at least one GUI to include information about the additional / alternative solutions. If the obtained information is insufficient, the at least one processor notifies the user to request supplemental information. Thus, a feedback loop is formed and is repeated until one or more predefined conditions are met. For example, the at least one processor proceeds to the next step if sufficient information is obtained, if the number of loops exceeds a threshold, if the user has determined via the GUI that a deviation report has been generated, etc.

[0077] It is contemplated that operations S304 and S305 (e.g., generating and displaying at least one GUI, receiving first user feedback) may be performed by at least one processor during execution of the UI module (or computer-executable instructions for implementing the UI module) and / or that at least one processor may instruct another component (e.g., another processor executing or implementing the UI module, an output component of the system, an input component of the system, etc.) to perform operations S304 and S305 without departing from the scope of the present disclosure.

[0078] Continuing with reference to Figure 3, in operation S306, the at least one processor is configured to determine whether at least one rule deviation should be implemented. Additional description of operations in this regard is provided below with reference to Figure 4.

[0079] Based on a determination that the at least one rule deviation should be implemented, method 300 proceeds to operation S307, where the at least one processor is configured to perform at least one operation for managing at least one rule deviation report according to the first user feedback. Example operations in this regard are described below with reference to FIG. 5 . Method 300 then proceeds to operation S303, where the at least one processor outputs source code to a code management system. In some embodiments, the at least one processor skips outputting the source code to the code management system if it determines that the at least one rule deviation should be implemented without modifying the code.

[0080] On the other hand, based on a determination that the at least one rule deviation should not be executed, method 300 proceeds to operation S308, where the at least one processor is configured to perform at least one operation for managing the source code to address the violation. For example, the at least one processor applies one or more code fixes to modify the code, thereby overcoming the violation of the at least one coding rule. Method 300 then proceeds to operation S303, where the at least one processor outputs the modified source code to a code management system.

[0081] Alternatively, method 300 may proceed directly to operation S303 without performing operation S308 based on a determination that at least one rule deviation should not be implemented. For example, the at least one processor determines that no code fixes are available to avoid the coding rule violation, determines that the user has rejected any available code fixes, or determines that the user would not like to implement any coding rule deviations. In that case, the at least one processor outputs the source code to a device of the first user (e.g., a first UE), thereby returning the source code to the original user without modifying the source code or outputting the source code to the code management system. Alternatively, the at least one processor may simply notify the user of the determination and skip outputting the source code to the user device and / or the code management system.

[0082] Reference is now made to FIG. 4, which illustrates a flow diagram of an example method 400 for determining whether at least one rule deviation should be implemented, in accordance with one or more embodiments.

[0083] One or more operations of method 400 of Figure 4 may be part of one or more operations of method 300 of Figure 3. For example, operations S402, S408, and S411 of method 400 are part of operation S304 of method 300, operations S403, S409, and S412 of method 400 are part of operation S305 of method 300, and operations S404-S406, S410, and S413 of method 400 are part of operation S306 of method 300. In this regard, it can be understood that one or more operations of method 400 may be performed by at least one processor of a system provided by an exemplary embodiment when executing or implementing at least an LLM module (or executing computer-executable instructions for implementing an LLM module). Furthermore, method 400 is performed based on a determination that source code received by the at least one processor (at operation S301) violates at least one coding rule.

[0084] As shown in FIG. 4 , in operation S401, the at least one processor is configured to determine whether at least one code fix is ​​available for modifying the source code to avoid a violation of the at least one coding rule. For example, based on a determination that the source code violates the at least one coding rule, the at least one processor classifies the detected violation based on the nature of the violation, the severity of the violation, etc. To this end, the at least one processor determines whether a code fix is ​​available for modifying the source code to avoid or address the violation from a set of predefined code fixes. According to an embodiment, the set of predefined code fixes is included in one or more action books. Here, the one or more action books are stored in a repository or a storage medium (e.g., storage component 240 of FIG. 2 ) and retrieved by the at least one processor as needed. The one or more action books are continuously (or periodically) updated, for example, based on current industry practices, user feedback, etc.

[0085] According to an embodiment, the at least one processor considers the particular context of the source code, comments contained in the source code, documentation associated with the source code, revision history (if any), project requirements, user information, user feedback, etc., to thereby provide customized or tailored recommendations for code revisions to the user.

[0086] Based on a determination that at least one code fix is ​​not available, method 400 proceeds to operation S407 (described further below after the description of operations S402-S406). Alternatively, based on a determination that at least one code fix is ​​available, method 400 may proceed to operation S402, where the at least one processor is configured to present information of the at least one code fix to the first user.

[0087] Thereafter, in operation S403, the at least one processor is configured to receive at least one user feedback from the first user, the at least one user feedback being substantially similar to the first user feedback described above with reference to FIG. 3 and including approval of at least one code fix, rejection of at least one code fix, a question or query from the first user, supplemental information that may be utilized to re-determine additional or alternative code fixes, etc.

[0088] The specific procedures of operations S402 and S403 may be substantially the same as the operation of presenting violation information (operation S304) and the operation of receiving first user feedback (operation S305) of FIG. 3, respectively. For example, at least one processor executes or implements a UI module (or executes computer-executable instructions for implementing a UI module) to generate and present at least one GUI including information of at least one code fix, and then receives at least one user feedback from the first user via the at least one GUI. Alternatively, or in addition, the at least one processor may instruct another component (e.g., another processor that executes or implements a UI module, an output component of the system, an input component of the system, etc.) to perform operations S402 and S403 in substantially the same manner without departing from the scope of the present disclosure. Examples of GUIs in this regard are described below with reference to FIGS. 7 through 9B.

[0089] Next, at operation S404, the at least one processor is configured to determine whether the user feedback (e.g., the first user feedback received at operation S403) includes an approval or a rejection of the at least one code modification (presented to the first user at operation S402). Based on a determination that the user feedback includes an approval, method 400 proceeds to operation S405, where the at least one processor determines that the at least one rule deviation should not be implemented. On the other hand, based on a determination that the user feedback includes a rejection, method 400 proceeds to operation S406, where the at least one processor determines that the at least one rule deviation should be implemented.

[0090] According to an embodiment, based on a determination that the user feedback includes a rejection, method 400 returns to operation S402, where the at least one processor is configured to redetermine one or more additional or alternative code fixes to address the coding rule violation based on the user feedback. The at least one processor then presents information regarding the one or more additional / alternative code fixes, and then receives additional user feedback from the first user.

[0091] Continuing with reference to FIG. 4, based on a determination that a code fix is ​​not available (at operation S401), method 400 proceeds to operation S407, where the at least one processor is configured to determine whether at least one deviation report fix is ​​available. Specifically, the at least one processor determines whether at least one existing deviation report associated with the at least one rule deviation is available, and based on a determination that the at least one existing deviation report is available, the at least one processor further determines whether the existing deviation report can be modified to avoid the violation of the at least one coding rule. Thus, the at least one processor determines that at least one deviation report fix is ​​available based on a determination that the existing deviation report can be modified to avoid the violation of the at least one coding rule. Otherwise, the at least one processor determines that no deviation report fix is ​​available.

[0092] Based on a determination that at least one deviation report correction is available, method 400 may proceed to operation S408, where the at least one processor is configured to present information related to the at least one deviation report correction to the first user. Thereafter, in operation S409, the at least one processor is configured to receive at least one user feedback from the first user. The at least one user feedback may be substantially similar to the first user feedback described above with reference to FIG. 3 and may include an approval for the at least one deviation report correction, a rejection for the at least one deviation report correction, a question or query of the first user, supplemental information that may be utilized for redetermining additional or alternative deviation report corrections, etc.

[0093] The specific procedures of operations S408 and S409 are substantially the same as the operation of presenting violation information (operation S304) and the operation of receiving first user feedback (operation S305) of FIG. 3, respectively. For example, at least one processor executes or implements a UI module (or executes computer-executable instructions for implementing a UI module) to generate and present at least one GUI including at least one deviation report correction information, and then receives at least one user feedback from the first user via the at least one GUI. Alternatively, or in addition, the at least one processor may instruct another component (e.g., another processor that executes or implements a UI module, an output component of the system, an input component of the system, etc.) to perform operations S408 and S409 in substantially the same manner without departing from the scope of the present disclosure. Exemplary GUIs in this regard are described below with reference to FIGS. 7 through 9B.

[0094] Next, in operation S410, the at least one processor is configured to determine whether the user feedback (e.g., the first user feedback received in operation S409) includes an approval or a rejection of the at least one deviation report modification (presented to the first user in operation S408). Based on a determination that the user feedback includes an approval, the method 400 proceeds to operation S406, where the at least one processor determines that the at least one rule deviation should be implemented. On the other hand, based on a determination that the user feedback includes a rejection, the method 400 returns to operation S407, where the at least one processor is configured to redetermine, based on the user feedback, one or more additional or alternative deviation report modifications to address the coding rule violation. The at least one processor then presents information regarding the one or more additional / alternative deviation report modifications, and then receives further user feedback from the first user.

[0095] 4, based on a determination that a deviation report correction is not available, method 400 proceeds to operation S411, where the at least one processor is configured to notify the user that a new deviation report needs to be created (or a new deviation report application is needed). For example, the at least one processor generates and presents one or more notifications including the reason why a new deviation report is needed. According to an embodiment, the notifications include a request for supplemental information needed to create the new deviation report.

[0096] Upon presenting the notification informing the user to create a new deviation report, method 400 may proceed to operation S412, where the at least one processor is configured to receive at least one user feedback from the first user, wherein the at least one user feedback is substantially similar to the first user feedback described above with reference to FIG. 3 and includes an approval for creating the new deviation report, a denial for creating the new deviation report, a question or query from the first user, supplemental information requested for creating the new deviation report, etc.

[0097] The specific procedures of operations S411 and S412 may be substantially the same as the operation of presenting violation information (operation S304) and the operation of receiving first user feedback (operation S305) in FIG. 3, respectively. For example, at least one processor executes or implements a UI module (or executes computer-executable instructions for implementing a UI module) to generate and present at least one GUI including a notification for creating a new deviation report, and then receives at least one user feedback from the first user via the at least one GUI. Alternatively, or in addition, the at least one processor instructs another component (e.g., another processor that executes or implements a UI module, an output component of the system, an input component of the system, etc.) to perform operations S411 and S412 in substantially the same manner without departing from the scope of the present disclosure. Exemplary GUIs in this regard are described below with reference to FIGS. 7 through 9B.

[0098] Next, at operation S413, the at least one processor is configured to determine whether the user feedback (e.g., the first user feedback received at operation S412) includes an approval or a denial for creating the new deviation report. Based on a determination that the user feedback includes an approval, the method 400 proceeds to operation S406, where the at least one processor determines that the at least one rule deviation should be implemented. On the other hand, based on a determination that the user feedback includes a denial, the method 400 proceeds to operation S405, where the at least one processor determines that the at least one rule deviation should not be implemented.

[0099] To this end, the system of the exemplary embodiment suitably determines whether at least one rule deviation should be implemented based on real-time conditions and communications with relevant users, and, upon determining whether at least one rule deviation should be implemented, performs one or more actions to appropriately respond to the violation of the coding rules.

[0100] FIG. 5 illustrates a flow diagram of an example method 500 for determining at least one action to respond to a coding rule violation, according to one or more embodiments.

[0101] One or more operations of method 500 of Figure 5 may be part of one or more operations of method 300 of Figure 3 and method 400 of Figure 4. For example, operation S501 of method 500 includes an operation of method 400, operation S502 of method 500 is substantially similar to operation S308 of method 300, operations S504-S506 and S508-S511 of method 500 are part of operation S307 of method 300, and operations S503, S507, and S511-S512 of method 500 are part of operation S303 of method 300. In this regard, it may be understood that one or more operations of method 500 may be performed by at least one processor of a system provided by an exemplary embodiment when executing or implementing at least an LLM module (or when executing computer-executable instructions to implement an LLM module).

[0102] 5, in operation S501, at least one processor is configured to determine whether at least one rule deviation should be implemented. Specifically, the at least one processor performs one or more operations of method 400 to determine whether at least one rule deviation should be implemented.

[0103] Based on a determination that the at least one rule deviation should not be executed, method 500 proceeds to operation S502, where the at least one processor is configured to execute at least one code modification. Specifically, based on the at least one code modification (e.g., determined in operation S401 and approved by the first user in operations S403-S404), the at least one processor modifies portions of the source code that violate coding rules, thereby addressing the violations. Thereafter, in operation S503, the at least one processor is configured to output the modified code to a code management system (e.g., system 140 of FIG. 1 ). According to an embodiment, the at least one processor further generates and provides a notification to the first user to notify the first user of the completion of the code analysis and the upload of source code without any coding rule violations or deviations.

[0104] Alternatively, based on a determination that at least one rule deviation should be implemented, method 500 proceeds to operation S504, where at least one processor is configured to determine whether an existing deviation report should be modified. Based on a determination that an existing deviation report modification is required, method 500 proceeds to operation S505. Otherwise, based on a determination that an existing deviation report modification is not required, method 500 proceeds to operation S508.

[0105] In operation S505, the at least one processor is configured to summarize the user feedback (e.g., received in operations S305, S403, and / or S409). According to an embodiment, the at least one processor tracks a conversation or communication between a first user and the system, then analyzes the conversation, and obtains from the analysis information necessary to modify an existing deviation report. The conversation may be a single conversation or multiple conversations. The at least one processor identifies one or more entities or specific aspects mentioned in the user feedback (e.g., identifying references to source code, coding rules, coding rule violations, proposed fixes, reasons for the deviation, purpose of the deviation, risk of the deviation, risk management and mitigation, etc.), and then extracts relevant parameters from the user feedback.

[0106] Having summarized the user feedback, method 500 proceeds to operation S506, where the at least one processor is configured to modify an existing deviation report. Specifically, the at least one processor retrieves the existing deviation report from a database (e.g., database 118 of FIG. 1 ) and then modifies the existing deviation report to include information of the summarized user feedback.

[0107] 6 illustrates an example of a deviation report 600 according to one or more embodiments. In the example of FIG. 6, the deviation report 600 includes multiple sections or fields, such as a deviation ID (i.e., an ID assigned to the deviation), a rule ID (i.e., an ID of the coding rule that was violated), a responsible team, a responsible person, a file name (e.g., a name of the source code, a name of a related document, etc.), a related deviation ID, a description (e.g., a description of the use case that requires the deviation), a reason for the deviation, a purpose of the deviation, a risk of the deviation, and a risk control.

[0108] According to an embodiment, part of the information in the deviation report is generated and obtained by at least one processor, and another part of the information is obtained by summarizing user feedback, e.g., deviation IDs are generated and assigned by at least one processor, rule IDs and associated deviation IDs are collected by at least one processor based on code analysis, and deviation reasons and purposes are obtained from the summarized user feedback.

[0109] The deviation report may be stored, utilized, or generated in any suitable computer-readable format, such as a plain text file format, a JavaScript Object Notation (JSON) format, a YAML format, an Extensible Markup Language (XML) format, etc. Additionally, while the information in the deviation report may be presented in a tabular format, it can be understood that the information may be presented in any suitable format without departing from the scope of this disclosure. Furthermore, the deviation report may include more or less information than that shown in FIG. 6 . For example, if multiple deviations are required to address a coding rule violation, the deviation report may include information for multiple deviations (e.g., multiple deviation IDs, multiple rule IDs, etc.).

[0110] 5, in operation S506, the at least one processor determines which fields of the existing deviation report need to be modified based on the summarized user feedback, and then modifies or updates one or more necessary fields according to the summary of the user feedback. For example, the at least one processor may modify a "Rule ID" field to reflect the ID of the coding rule that the source code violated, add a description of the new use case to a "Description" field, etc.

[0111] Thus, in operation S507, the at least one processor is configured to output the source code and the modified deviation report. For example, the at least one processor outputs the source code to a code management system (e.g., system 140 of FIG. 1) and stores the modified deviation report in a database (e.g., database 118 of FIG. 1).

[0112] According to embodiments, before outputting the source code to the code management system and / or outputting the modified deviation report to the database, the at least one processor outputs or provides the modified deviation report and / or the source code to a second user (e.g., an administrator of the first user, a member of a rules committee, etc.) for review. The at least one processor then receives at least one user feedback (herein “second user feedback”) from the second user. To that end, the at least one processor stores the modified deviation report and the second user feedback in the database. In some embodiments, the at least one processor performs one or more actions based on the second user feedback (e.g., redetermine feasible solutions to address the coding rule violations and communicate with the first user to convey the second user's opinion).

[0113] 5, at operation S508, the at least one processor is configured to determine whether a new deviation report should be created. Based on a determination that creation of a new deviation report is necessary, method 500 proceeds to operation S509. Otherwise, based on a determination that creation of a new deviation report is not necessary, method 500 proceeds to operation S512, where the at least one processor returns the source code to the first user without modifying the source code or violating any coding rules.

[0114] In operation S509, the at least one processor is configured to summarize the user feedback (e.g., received in operations S305, S403, S409, and / or S412). The specific operation is almost the same as operation S505, and therefore, for the sake of brevity, redundant descriptions related to this operation will be omitted below.

[0115] Having summarized the user feedback, method 500 proceeds to operation S510, where at least one processor is configured to generate a new deviation report. According to an embodiment, the at least one processor generates the new deviation report utilizing a deviation report template. The deviation report template outlines the structure and content requirements of the deviation report and includes placeholders or default parameters into which specific details of each rule violation and associated deviation can be entered. For example, the deviation report template may have substantially the same sections or fields as those described above with reference to FIG. 6, except that the content or parameters of each field may be empty or pre-populated with default parameters.

[0116] In this regard, the at least one processor retrieves a deviation report template (e.g., from a memory or storage component) and then enters the summarized user feedback into corresponding sections or fields of the deviation report template, thereby creating a new deviation report. For example, the at least one processor may assign a new deviation ID and insert the new deviation ID into a "Deviation ID" field, extract information related to the reason for the deviation from the summarized user feedback and insert the information into a "Reason" field, etc.

[0117] Thus, in act S511, the at least one processor is configured to output the source code and the new deviation report. For example, the at least one processor outputs the source code to a code management system (e.g., system 140 of FIG. 1) and stores the new deviation report in a database (e.g., database 118 of FIG. 1).

[0118] According to embodiments, before outputting the source code to the code management system and / or outputting the new deviation report to the database, the at least one processor outputs or provides the new deviation report and / or the source code to a second user for review. The at least one processor then receives at least one second user feedback from the second user. To do so, the at least one processor stores the new deviation report and the second user feedback in the database. In some embodiments, the at least one processor performs one or more actions based on the second user feedback (e.g., redetermine feasible solutions to address the coding rule violations and communicate with the first user to convey the second user's opinion).

[0119] 3-5 are provided for illustrative purposes only, and it is contemplated that the scope of the present disclosure should not be limited to such operations. One or more operations may be omitted from methods 300-500, one or more additional operations may be added to methods 300-500, or one or more operations of methods 300-500 may be combined or performed in parallel without departing from the scope of the present disclosure. Specifically, if the source code violates multiple coding rules, a solution for addressing the violations may include a combination of source modification, deviation report modification, and creation of a new deviation report.

[0120] 7 through 9B illustrate an example GUI for an example use case according to one or more embodiments. In the example use case, the system detects that source code violates three coding rules. After multiple communications with the user, the system determines, based on multiple user feedback, that a viable solution to address the violation includes a combination of (1) modifying the source code, (2) modifying an existing deviation report, and (3) creating a new deviation report. Descriptions related to FIGS. 7 through 9B are provided below.

[0121] 7 illustrates a diagram of an exemplary GUI 700, according to one or more embodiments. The GUI 700 is generated by at least one processor of the system of the exemplary embodiments (or any suitable component implementing the LLM module and the UI module) and presented to one or more users upon determining that source code violates one or more coding rules.

[0122] As shown in Figure 7, GUI 700 includes a chat window and one or more interactive elements. The chat window includes information related to the violation (e.g., information about the coding rule that was violated, information about the portion of the source code that violates the coding rule, information about potential code fixes to address the violation, etc.), and the one or more interactive elements allow a user to interact with the chat window to communicate and provide one or more user feedback. In the example of Figure 7, the chat window includes information 710-720 and interactive elements 730-750.

[0123] Information 710 is associated with timing information (e.g., when the code review was completed, when a violation was detected, when GUI 700 was presented to the user, etc.). Information 720 is associated with a violated coding rule, a portion of the source code that violates the coding rule, and code remediation options or recommendations to avoid the coding rule violation. According to an embodiment, at least a portion of information 720 includes one or more interactable or selectable text, each associated with a violated coding rule, a specific portion of the source code that violates the coding rule, and code remediation options or recommendations. When interacted with by the user, the interactable / selectable text provides additional information to the user. For example, upon detecting user interaction with the selectable text "coding rule xx-xx-xx," the system updates GUI 700 to indicate the violated portion of the coding rule or retracts and provides the coding rule document to the user. In the illustrated GUI, the interactable / selectable text is presented differently from the non-interactive / non-selectable text for illustrative purposes.

[0124] Interactive elements 730 include input fields 730 that can be interacted with by a user to provide feedback about the presented information. Interactive elements 740 include buttons 740 that, when interacted with by a user, provide user feedback to the system. Interactive elements 750 include buttons 750 that, when interacted with by a user, present additional interactive elements to enable the user to perform one or more additional actions.

[0125] 8 shows a diagram of an example GUI 800 according to one or more embodiments. GUI 800 is an updated version of GUI 700 upon detecting user interaction with interactive element 750. In the example of FIG. 8, GUI 800 includes a drop-down menu 860 that includes additional interactive components, such as a download button that allows a user to download at least a portion of the transformation presented in GUI 800, a file attachment button that allows a user to attach one or more documents (e.g., source code, reference materials, etc.) to supplement needed information during a conversation or communication, and an image attachment button that allows a user to attach one or more images to supplement needed information.

[0126] 9A and 9B illustrate an example GUI 900 according to one or more embodiments. GUI 900 is an updated version of GUI 700 and includes multiple interactions between the user and the system throughout the procedure, from detecting a coding rule violation to completing actions to address the violation. A description of the use case follows:

[0127] Referring to FIG. 9A , in an exemplary use case, the system identifies that a portion of source code (lines 100-102) violates three coding rules (i.e., coding rule xx-xx-xx, coding rule yy-yy-yy, and coding rule zz-zz-zz) and determines potential code fixes to address the violations. In response, the system presents relevant information to the user via GUI 900. The user then provides feedback to the system via interaction with GUI 900. In the exemplary use case, the user feedback includes a rejection of the proposed code fix and a reason for the rejection.

[0128] The system redetermines an alternative solution to address the violation based on the reason for the rejection and updates GUI 900 to present the alternative solution information to the user. In an exemplary use case, the system first determines an alternative code fix to address the violation and then receives user feedback including another rejection and associated reason.

[0129] The system determines that at least one rule deviation is necessary based on the second rejection reason and updates GUI 900 to notify the user of the determination. The system then receives user feedback including the user's intent to deviate from only some of the violated rules. Thus, the system redetermines and presents potential code fixes taking into account the user's intent and conditions defined in the user feedback. The system then receives user feedback including approval to fix the source code according to the latest recommendations.

[0130] Referring to FIG. 9B , a GUI 900 is shown that includes a conversation between a user and the system as a continuation of the conversation in GUI 900 in FIG. 9A . As shown in FIG. 9B , after receiving user approval, the system modifies the source code according to the approved code fixes and then notifies the user upon execution of the code fixes. The notification includes a reminder to address any remaining violations. Upon receiving user feedback, the system determines that the remaining violations may be addressed by modifying the existing deviation report and creating a new deviation report. Thus, based on a determination that the user agrees with the proposed solution, the system performs operations to modify the existing deviation report and create a new deviation report. In some embodiments, the system attaches a file of a copy of the applied deviation report in text format, PDF format, or the like.

[0131] It is contemplated that the GUIs shown in Figures 7 through 9B are merely examples of possible embodiments, and the scope of the present disclosure should not be limited to such GUIs. Specifically, the GUIs may include more or fewer components, and the layout or display of the GUIs may differ from those shown in Figures 7 through 9B, without departing from the scope of the present disclosure. Furthermore, it can be understood that the system may generate and present one or more GUIs to the second user in substantially the same manner, such that the second user may communicate and interact with the system to review and respond to requests for deviation report corrections and new deviation report creation.

[0132] To this end, exemplary embodiments of the present disclosure provide an interactive and intuitive procedure throughout the code and deviation management process.

[0133] Specifically, each time the source code violates a coding rule, the system considers the user's feedback and intent to determine a viable solution for addressing the violation. For example, context-aware recommendations for possible fixes can be provided, with the user providing feedback throughout the process, and the system updating the recommendations for possible solutions based on the user feedback in real time (or near real time). This allows for more accurate and efficient determination of solutions for addressing coding rule violations.

[0134] Furthermore, once the system determines a solution, it may appropriately perform the necessary actions without requiring user intervention. For example, if a code fix is ​​required, the system may automatically perform the necessary actions to fix the source code. As another example, the system may collaborate with relevant users or stakeholders regarding deviation management without requiring user involvement. This may reduce the burden on users and simplify the process of resolving code violations.

[0135] It is contemplated that the features, advantages, and significance of the exemplary embodiments described above are only a part of the present disclosure and are not intended to be exhaustive or to limit the scope of the present disclosure. An additional description of the features, components, configuration, operation, and implementation of the exemplary embodiments of the present disclosure, as well as related technical advantages and significance, is provided below.

[0136] It is understood that the specific order or hierarchy of blocks within the processes / flowcharts disclosed herein is an illustration of example approaches. Based on design preferences, it is understood that the specific order or hierarchy of blocks within the processes / flowcharts may be rearranged. Additionally, some blocks may be combined or omitted. The accompanying method claims present elements of the various blocks in a sample order and are not intended to be limited to the specific order or hierarchy presented.

[0137] Some embodiments may relate to systems, methods, and / or computer-readable media at any integration level of technical details. Further, as noted above, one or more of the above components may be stored on a computer-readable medium and implemented as instructions executable by at least one processor (and / or may include at least one processor). A computer-readable medium includes a computer-readable non-transitory storage medium (or media) that includes computer-readable program instructions for causing a processor to perform operations.

[0138] A computer-readable storage medium is a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded devices such as punch cards or ridge structures with instructions recorded thereon, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, should not be construed as a transitory signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted through wires.

[0139] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium into each computing / processing device, or downloaded to an external computer or external storage device via a network, such as, for example, the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface within each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on a computer-readable storage medium within the respective computing / processing device.

[0140] The computer readable program code / instructions for performing the operations may be either source code or object code written in any combination of one or more programming languages, such as assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or object-oriented programming languages ​​such as Smalltalk, C++, and procedural programming languages ​​such as the "C" programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. When executing entirely on a remote computer or server, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, electronic circuitry, including, for example, a programmable logic circuit, field programmable gate array (FPGA), or programmable logic array (PLA), executes computer-readable program instructions by utilizing state information in the computer-readable program instructions to individualize the electronic circuitry to perform aspects or operations.

[0141] Such computer-readable program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, executed by the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram blocks. Such computer-readable program instructions may also direct a computer, programmable data processing apparatus, and / or other device to function in a particular manner, such that a computer-readable storage medium having instructions stored thereon constitutes an article of manufacture containing instructions that implement aspects of the functions / acts specified in the flowchart and / or block diagram blocks.

[0142] The computer-readable program instructions may be loaded into a computer, other programmable data processing apparatus, or another device and execute a series of operational steps on the computer, other programmable apparatus, or other device to generate a computer-implemented process, such that the instructions executing on the computer, other programmable apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram blocks.

[0143] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer-readable media according to various embodiments. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or portion of instructions, including one or more executable instructions for implementing the specified logical function(s). The methods, computer systems, and computer-readable media may include more, fewer, different, or differently arranged blocks than those shown in the figures. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may actually be executed concurrently or nearly concurrently, or the blocks may be executed in the reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowchart diagrams, and combinations of blocks in the block diagrams and / or flowchart diagrams, may be implemented by a dedicated hardware-based system that performs the specified functions or actions or executes a combination of dedicated hardware and computer instructions.

[0144] It will be apparent that the systems and / or methods described herein may be implemented in various forms of hardware, firmware, or combinations of hardware and software. The actual specialized control hardware or software code used to implement such systems and / or methods is not intended to limit the implementation. Thus, although the operation and behavior of the systems and / or methods are described herein without reference to specific software code, it will be understood that software and hardware can be designed to implement the systems and / or methods based on the description herein.

Claims

1. 1. A method performed by at least one processor of a system when executing instructions for implementing a large language model (LLM), comprising: receiving source code; determining whether the source code violates at least one coding rule; based on a determination that the source code violates the at least one coding rule, presenting information related to the violation of the at least one coding rule to a first user; receiving first user feedback from the first user related to the presented information; determining whether at least one rule deviation should be implemented based on the first user feedback; performing at least one operation to manage at least one deviation report according to the first user feedback based on a determination that the at least one rule deviation should be implemented; performing at least one action to manage the source code based on a determination that the at least one rule deviation should not be implemented.

2. The step of presenting the information includes: determining whether at least one code fix is ​​available to modify the source code to avoid violation of the at least one coding rule; and presenting information about the at least one code fix to the first user based on the determination that the at least one code fix is ​​available.

3. The step of presenting the information includes: determining whether at least one deviation report fix is ​​available based on the determination that the at least one code fix is ​​not available, the deviation report fix comprising a fix to an existing deviation report to avoid a violation of the at least one coding rule; presenting information related to the at least one deviation report correction to the first user based on a determination that the at least one deviation report correction is available; and and presenting a notification to inform the first user to create a new deviation report based on a determination that the at least one deviation report correction is not available.

4. The step of determining whether the at least one rule deviation should be implemented comprises: determining whether the first user feedback includes approval or rejection of the at least one code modification; determining, based on a determination that the first user feedback includes the approval, that the at least one rule deviation should not be implemented; and determining that the at least one rule deviation should be implemented based on a determination that the first user feedback includes the rejection.

5. The step of determining whether at least one rule deviation should be implemented includes: determining whether the first user feedback includes an approval or a rejection of the at least one deviation report correction; and determining that the at least one rule deviation should be implemented based on a determination that the first user feedback includes the approval.

6. The step of determining whether at least one rule deviation should be implemented includes: determining whether the first user feedback includes approval or rejection of the creation of the new deviation report; determining that the at least one rule deviation should be implemented based on a determination that the first user feedback includes the approval; and determining that the at least one rule deviation should not be implemented based on a determination that the first user feedback includes the rejection.

7. The method of claim 2 , wherein performing the at least one operation to manage the source code comprises modifying the source code based on the at least one code modification.

8. The method of claim 3 , wherein performing the at least one action to manage the at least one deviation report comprises modifying the existing deviation report based on the at least one deviation report modification.

9. The method of claim 3 , wherein performing the at least one action to manage the at least one deviation report comprises creating the new deviation report.

10. The step of modifying the existing deviation report comprises: retrieving the existing deviation report from a database; Summarizing the first user feedback; modifying the existing deviation report to include information of the summarized first user feedback; providing the modified deviation report to a second user; receiving second user feedback from the second user regarding the modified deviation report; and storing the modified deviation report and the second user feedback in the database.

11. The step of generating a new deviation report comprises: Summarizing the first user feedback; generating the new deviation report based on the summarized first user feedback; providing the new deviation report to a second user; receiving second user feedback from the second user regarding the new deviation report; and storing the new deviation report and the second user feedback in a database.

12. The step of presenting the information related to the violation comprises: generating at least one graphical user interface (GUI) including at least one chat window and at least one interactive element, wherein the at least one chat window includes the information related to the violation and the at least one interactive element enables the first user to interact with the at least one chat window to provide the first user feedback; and presenting the at least one GUI to the first user.

13. receiving the first user feedback via the at least one GUI; updating the at least one GUI based on the first user feedback; 13. The method of claim 12, further comprising: presenting the at least one updated GUI to the first user.

14. 1. A system for code and deviation management, comprising: a storage device storing computer-executable instructions for implementing a large language model (LLM); at least one processor communicatively coupled to the storage device to execute the instructions, Receive the source code determining whether the source code violates at least one coding rule; presenting information to a first user related to the violation of the at least one coding rule based on a determination that the source code violates the at least one coding rule; receiving first user feedback from the first user related to the presented information; determining whether at least one rule deviation should be implemented based on the first user feedback; performing at least one operation to manage at least one deviation report according to the first user feedback based on a determination that the at least one rule deviation should be implemented; at least one processor configured to perform at least one action to manage the source code based on a determination that the at least one rule deviation should not be implemented.

15. The at least one processor determining whether at least one code fix is ​​available to modify the source code to avoid the violation of the at least one coding rule; and presenting information of the at least one code fix to the first user based on a determination that the at least one code fix is ​​available.

16. The at least one processor determining whether at least one deviation report fix is ​​available based on the determination that the at least one code fix is ​​not available, the deviation report fix comprising a fix to an existing deviation report to avoid a violation of the at least one coding rule; presenting information related to the at least one deviation report correction to the first user based on a determination that the at least one deviation report correction is available; and 16. The system of claim 15, further configured to present the information by: presenting a notification to inform the first user to create a new deviation report based on a determination that the at least one deviation report correction is not available.

17. The at least one processor determines whether at least one rule deviation should be implemented by: determining whether the first user feedback includes approval or rejection of the at least one code modification; determining, based on a determination that the first user feedback includes the approval, that the at least one rule deviation should not be performed; and determining that the at least one rule deviation should be implemented based on a determination that the first user feedback includes the rejection.

18. The at least one processor determines whether at least one rule deviation should be implemented by: determining whether the first user feedback includes an approval or a rejection of the at least one deviation report correction; and determining that the at least one rule deviation should be implemented based on a determination that the first user feedback includes the approval.

19. The step of determining whether at least one rule deviation should be implemented includes: determining whether the first user feedback includes approval or rejection of the creation of the new deviation report; determining that the at least one rule deviation should be implemented based on a determination that the first user feedback includes the approval; and determining that the at least one rule deviation should not be implemented based on a determination that the first user feedback includes the rejection.

20. 16. The system of claim 15, wherein the at least one processor is configured to perform the at least one operation to manage the source code by modifying the source code based on the at least one code modification.

Citation Information

Patent Citations

  • C code detection method and device based on security coding standard and storage medium

    CN115617352A

  • Software analysis system

    JP2008020972A

  • Coding protocol check system in source management program

    JP2011113296A

  • Inspection device, inspection method and program

    JP2012008918A

  • Displaying violated coding rules in source code

    US9081595B1