US-12619516-B2 - Automated code scanning for pre-emptive issue detection and resolution
Abstract
An issue source scanning system scans a source of information about an issue to identify characteristics of code which indicate that the issue will manifest in code. A code scanning system scans code to match the identified characteristics against the code to determine whether the source code includes the identified characteristics. The code scanning system automatically generates a suggested operation to perform based upon a match between the identified characteristic and the code.
Inventors
- Michael Andrew HAWKER
Assignees
- MICROSOFT TECHNOLOGY LICENSING, LLC
Dates
- Publication Date
- 20260505
- Application Date
- 20230616
Claims (20)
- 1 . A computer implemented method, comprising: identifying an issue source that stores information about an issue corresponding to an identified code dependency for code in a code repository; automatically scanning the information in the issue source to identify: a problematic code characteristic causing manifestation of the issue when the code in the code repository is executed; and a presence of: a positive code pattern indicating a presence of a workaround that is no longer needed in the code, wherein the workaround prevents the code in the code repository from experiencing the issue when the code in the code repository is executed; or a negative code pattern indicating that the workaround is needed and is not found in the code in the code repository; matching the problematic code characteristic against the code in the code repository; automatically identifying a suggested operation to perform on the code in the code repository based on; the problematic code characteristic in the code in the code repository; and the presence of the positive code pattern or the negative code pattern; and generating an action signal to control a user interface system to generate an output indicative of the suggested operation, wherein the suggested operation comprises removing the workaround from the code in the code repository or adding the workaround to the code in the code repository.
- 2 . The computer implemented method of claim 1 wherein automatically scanning the information in the issue source to identify the problematic code characteristic comprises: generating an artificial intelligence (AI) prompt based on the information in the issue source; submitting the AI prompt to an AI model; receiving a response from the AI model; and identifying the problematic code characteristic based on the response from the AI model.
- 3 . The computer implemented method of claim 1 wherein automatically scanning the information in the issue source to identify the problematic code characteristic comprises: performing natural language understanding on the information in the issue source to obtain a semantic understanding of the information in the issue source; and identifying the problematic code characteristic based on the semantic understanding of the issue-related data.
- 4 . The computer implemented method of claim 1 and further comprising: detecting a scan trigger; and generating a scan trigger signal, wherein automatically scanning the information in the issue source is performed based on the scan trigger signal.
- 5 . The computer implemented method of claim 4 wherein detecting the scan trigger comprises: detecting a change in the identified code dependency.
- 6 . The computer implemented method of claim 4 wherein detecting the scan trigger comprises: detecting an operation-based trigger indicative of an operation performed on the code in the code base.
- 7 . The computer implemented method of claim 1 wherein identifying the issue source comprises: identifying the code dependency as a dependency of interest; and accessing a reference to the issue source based on the dependency of interest.
- 8 . The computer implemented method of claim 7 wherein accessing a reference to the issue source comprises: calling a reference identifier service based on the dependency of interest to obtain the reference to the issue source.
- 9 . The computer implemented method of claim 1 and further comprising: determining whether the suggested operation is an operation that can be performed in the code repository automatically; and if so, generating the action signal to control the user interface system to generate the output indicative of the suggested operation with a selection actuator that is actuatable by a user to automatically perform the suggested operation.
- 10 . The computer implemented method of claim 1 wherein matching the problematic code characteristic against the code in the code repository comprises: detecting a location in the code in the code repository where the problematic code characteristic is located, and wherein generating the action signal comprises controlling the user interface system to generate the output to indicate the location in the code where the problematic code characteristic is detected.
- 11 . A computer system, comprising: an issue source identifier configured to identify an issue source that stores information about an issue corresponding to an identified code dependency for code in a code repository; an issue source scanner configured to automatically scan the information in the issue source to identify: a problematic code characteristic causing manifestation of the issue when the code in the code repository is executed; and a presence of: a positive code pattern indicating a presence of a workaround that is no longer needed in the code, wherein the workaround prevents the code in the code repository from experiencing the issue when the code in the code repository is executed; or a negative code pattern indicating that the workaround is needed and is not found in the code in the code repository; a matching system configured to match the problematic code characteristic against the code in the code repository; a suggestion generator configured to automatically identify a suggested operation to perform on the code in the code repository based on; the problematic code characteristic in the code in the code repository; and the presence of the positive code pattern or the negative code pattern; a control signal generator configured to generate an action signal based on the suggested operation, wherein the suggested operation comprises removing the workaround from the code in the code repository or adding the workaround to the code in the code repository; and a user interface system configured to generate an output indicative of the suggested operation.
- 12 . The computer system of claim 11 wherein the issue source scanner comprises: an artificial intelligence (AI) prompt generator configured to generate an AI prompt based on the information in the issue source and to submit the AI prompt to an AI model; and a response processor configured to receive a response from the AI model and identify the problematic code characteristic based on the response from the AI model.
- 13 . The computer system of claim 11 and further comprising: a trigger detector configured to detect a scan trigger and generate a scan trigger signal, wherein the issue source scanner is configured to automatically scan the information in the issue source based on the scan trigger signal.
- 14 . The computer system of claim 13 wherein the trigger detector is configured to detect, as the scan trigger, a change in the identified code dependency.
- 15 . The computer system of claim 13 wherein the trigger detector is configured to detect, as the scan trigger an operation-based trigger indicative of an operation performed on the code in the code base.
- 16 . The computer system of claim 11 wherein the issue source identifier comprises: a dependency of interest identification system configured to identify the code dependency as a dependency of interest; and an issue source reference accessing system configured to access a reference to the issue source based on the dependency of interest.
- 17 . The computer system of claim 11 wherein the suggestion generator comprises: an automated operation generator configured to determine that the suggested operation is an operation that can be performed in the code repository automatically and wherein the control signal generator is configured to generate the action signal to control the user interface system to generate the output indicative of the suggested operation with a selection actuator that is actuatable by a user to automatically perform the suggested operation.
- 18 . A computer system, comprising: at least one processor; and a memory storing computer executable instructions which, when executed by the at least one processor, cause the at least one processor to perform steps, comprising: identifying an issue source that stores information about an issue corresponding to an identified code dependency for code in a code repository; automatically generating a first artificial intelligence (AI) prompt based on the information in the issue source; submitting the first AI prompt to an AI model; receiving a response from the AI model; identifying a problematic code characteristic based on the response from the AI model, the problematic code characteristic causing manifestation of the issue when the code in the code repository is executed, wherein the problematic code characteristic is one of: a positive code pattern indicating a presence of a workaround that is no longer needed in the code, wherein the workaround prevents the code in the code repository from experiencing the issue when the code in the code repository is executed; or a negative code pattern indicating that the workaround is needed and is not found in the code in the code repository; matching the problematic code characteristic against the code in the code repository; automatically identifying a suggested operation to perform on the code in the code repository based on: the problematic code characteristic in the code in the code repository; and the presence of the positive code pattern or the negative code pattern; and generating an action signal to control a user interface system to generate an output indicative of the suggested operation, wherein the suggested operation comprises removing the workaround from the code in the code repository or adding the workaround to the code in the code repository.
- 19 . The computer system of claim 18 wherein identifying the issue source comprises: identifying the code dependency as a dependency of interest; and accessing a reference to the issue source based on the dependency of interest.
- 20 . The computer system of claim 18 wherein accessing the reference to the issue source comprises: calling a reference identifier service based on the dependency of interest to obtain the reference to the issue source.
Description
BACKGROUND Computing systems are currently in wide use. Some computing systems host or distribute applications that are accessed by end users. The hosted or distributed applications may provide a wide variety of different functionality. Some such applications are generated using a continuous integration system in which multiple developers can collaborate in generating human readable code that is stored in a shared code base or code repository. Version control is used to resolve editing conflicts among the various developers, and build automation is used to create a machine runnable snapshot of a version of the code. That snapshot can then be distributed to end users through any of a variety of different networks. For instance, when the application is a web-based application, the snapshot created during the build process may be copied to a website where it can be accessed by users. When the application is a mobile application, then the snapshot created during the build process may be copied to a location where it can be downloaded by a user to a mobile device. The discussion above is merely provided for general background information and is not intended to be used as an aid in determining the scope of the claimed subject matter. SUMMARY An issue scanning system scans a source of information about an issue to identify characteristics of code which indicate that the issue will manifest in code. A code scanning system examines code to match the identified characteristics against the code to determine whether the source code includes the identified characteristics. A suggestion generator automatically generates a suggested operation to perform based upon a match between the identified characteristic and the code. This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. The claimed subject matter is not limited to implementations that solve any or all disadvantages noted in the background. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of one example of a computing system architecture. FIG. 2 is a block diagram of one example of a scanning system. FIGS. 3A and 3B (collectively referred to herein as FIG. 3) show a flow diagram illustrating one example of the operation of a code scanning system. FIG. 4 is a flow diagram illustrating one example of identifying a source of information about an issue. FIG. 5 is a block diagram showing the computing system architecture illustrated in FIG. 1, deployed in a remote server architecture. FIG. 6 is a block diagram of one example of a computing environment. DETAILED DESCRIPTION As discussed above, some computing systems use continuous integration (CI) systems to allow a plurality of different developers to collaborate on a code base that is stored in a code repository. Some portions of the code in the code base may depend on other code, and these portions of other code may thus be referred to as dependent code (or dependencies). It is common that, while writing code, a developer must workaround a known issue within the dependent code. By “issue” it is meant, for example, that a piece of code is malfunctioning, crashing, or behaving in an undesired way and the malfunction, crash, or undesired behavior is caused by dependent code. In order to restore correct behavior, the developer may write extra code to work-around the malfunction, crash, or undesired behavior caused by the dependent code. The extra code is called a workaround. Information about issues may be stored in a variety of different types of issue tracking systems. For instance, an issue tracking system may be a developer's own issue tracking system, an issue tracking system that is maintained by a developer's team, an issue tracking system corresponding to a dependency (or dependent code), or another issue tracking system. Some issue tracking systems are accessible by a wide variety of different developers so that those developers can provide comments, suggested workarounds, information about where and under what circumstances the issue manifests itself, a version identifier for a dependency in which the issue arises, and other information. For instance, some developers may provide comments in an issue tracking system. The comments may identify the code, in their code base, which caused an issue in a dependency to manifest itself. Other information in an issue tracking system may identify problematic characteristics of code which may cause an issue to manifest itself in other ways. It is often very difficult for a developer to know when a dependency will cause an issue to manifest itself in code. Sometimes, issues are specific to certain features or versions of the dependent code, and it is not always known to a devel