Identification of code features potentially associated with code behavior
First Claim
1. A computing system that implements a code analysis system, the computing system comprising:
- a memory;
one or more processing units coupled to the memory; and
one or more computer readable storage media storing instructions that, when loaded into the memory, cause the one or more processing units to perform operations for;
receiving a first code version, the first code version comprising a first plurality of source code features;
receiving a second code version, the second code version comprising a second plurality of source code features;
executing an executable version of the first code version, which can be the first code version;
monitoring the execution of the executable version of the first code version, the monitoring comprising determining a third plurality of source code features from the first plurality of source code features which are executed during the execution of the executable version of the first code version, the determining comprising determining classes or methods executed, called, invoked, constructed, or instantiated during execution of the executable version of the first code version;
generating a first plurality of source code signatures for the first code version from one or more source code features of the first plurality of source code features defined in source code or byte code of the first code version;
wherein at least a first source code feature of the first plurality of source code features comprises (i) a declaration of a method, function, or class, the declaration comprising a first plurality of first source code elements or a first plurality of first byte code elements of the at least a first source code feature, the first plurality of first source code elements or the first plurality of first byte code elements being selected from the group consisting of access types, return types, method names, arguments numbers, and argument types;
or (ii) a first plurality of operations, defined in source code or byte code of the at least a first source code feature, that implement a method or function; and
wherein a first source code signature of the at least a first source code feature comprises (i) a concatenation of the first plurality of first source code elements or the first plurality of first byte code elements, or a concatenation of the first plurality of operations;
or (ii) a hash value generated from a concatenation of the first plurality of first source code elements or the first plurality of first byte code elements, or a hash value generated from a concatenation of the first plurality of operations;
generating a second plurality of source code signatures for the second code version from one or more source code features of the second plurality of source code features defined in source code or byte code of the second code version;
wherein at least a second source code feature of the second plurality of source code features comprises (i) a declaration of a method, function, or class, the declaration comprising a second plurality of second source code elements or a second plurality of second byte code elements, the second plurality of second source code elements or the second plurality of second byte code elements being selected from the group consisting of access types, return types, method names, arguments numbers, and argument types;
or (ii) a second plurality of operations, defined in the source code or byte code of the at least a second code feature, that implement a method or function; and
wherein a second source code signature of the at least a second source code feature comprises (i) a concatenation of the second plurality of second source code elements or the second plurality of second byte code elements, or a concatenation of the second plurality of operations;
or (ii) a hash value generated from a concatenation of the second plurality of second source code elements or the second plurality of second byte code elements, or a hash value generated from a concatenation of the second plurality of operations;
comparing the first plurality of source code signatures with the second plurality of source code signature;
in response to determining that a third source code signature for a given source code feature of the first code version differs from a fourth source code signature for a source code feature of the second code version corresponding to the given source code feature, adding the given source code feature to a fourth plurality of source code features;
comparing the third plurality of source code features and the fourth plurality of source code features, at least a portion of the compared third plurality of source code features not directly identified by the monitoring as associated with a runtime error, wherein source code features present in both the third plurality of source code features and the fourth plurality of source code features are added to a fifth plurality of source code features; and
providing an indication that a source code feature of the fifth plurality of source code features is potentially associated with the code behavior of interest.
1 Assignment
0 Petitions
Accused Products
Abstract
A first code version is received. The first code version includes a plurality of code features, such as methods or classes. A second code version is received. The second code version includes a plurality of code features. The first code version is executed. A first plurality of code features executed during the execution of the first code version are determined. A second plurality of code features differing between the first and second code versions are determined. The first and second plurality of code features are compared. An indication is provided that a code feature is potentially relevant to the code behavior if the code feature is present in the first plurality of code features and in the second plurality of code features.
-
Citations
15 Claims
-
1. A computing system that implements a code analysis system, the computing system comprising:
-
a memory; one or more processing units coupled to the memory; and one or more computer readable storage media storing instructions that, when loaded into the memory, cause the one or more processing units to perform operations for; receiving a first code version, the first code version comprising a first plurality of source code features; receiving a second code version, the second code version comprising a second plurality of source code features; executing an executable version of the first code version, which can be the first code version; monitoring the execution of the executable version of the first code version, the monitoring comprising determining a third plurality of source code features from the first plurality of source code features which are executed during the execution of the executable version of the first code version, the determining comprising determining classes or methods executed, called, invoked, constructed, or instantiated during execution of the executable version of the first code version; generating a first plurality of source code signatures for the first code version from one or more source code features of the first plurality of source code features defined in source code or byte code of the first code version; wherein at least a first source code feature of the first plurality of source code features comprises (i) a declaration of a method, function, or class, the declaration comprising a first plurality of first source code elements or a first plurality of first byte code elements of the at least a first source code feature, the first plurality of first source code elements or the first plurality of first byte code elements being selected from the group consisting of access types, return types, method names, arguments numbers, and argument types;
or (ii) a first plurality of operations, defined in source code or byte code of the at least a first source code feature, that implement a method or function; andwherein a first source code signature of the at least a first source code feature comprises (i) a concatenation of the first plurality of first source code elements or the first plurality of first byte code elements, or a concatenation of the first plurality of operations;
or (ii) a hash value generated from a concatenation of the first plurality of first source code elements or the first plurality of first byte code elements, or a hash value generated from a concatenation of the first plurality of operations;generating a second plurality of source code signatures for the second code version from one or more source code features of the second plurality of source code features defined in source code or byte code of the second code version; wherein at least a second source code feature of the second plurality of source code features comprises (i) a declaration of a method, function, or class, the declaration comprising a second plurality of second source code elements or a second plurality of second byte code elements, the second plurality of second source code elements or the second plurality of second byte code elements being selected from the group consisting of access types, return types, method names, arguments numbers, and argument types;
or (ii) a second plurality of operations, defined in the source code or byte code of the at least a second code feature, that implement a method or function; andwherein a second source code signature of the at least a second source code feature comprises (i) a concatenation of the second plurality of second source code elements or the second plurality of second byte code elements, or a concatenation of the second plurality of operations;
or (ii) a hash value generated from a concatenation of the second plurality of second source code elements or the second plurality of second byte code elements, or a hash value generated from a concatenation of the second plurality of operations;comparing the first plurality of source code signatures with the second plurality of source code signature; in response to determining that a third source code signature for a given source code feature of the first code version differs from a fourth source code signature for a source code feature of the second code version corresponding to the given source code feature, adding the given source code feature to a fourth plurality of source code features; comparing the third plurality of source code features and the fourth plurality of source code features, at least a portion of the compared third plurality of source code features not directly identified by the monitoring as associated with a runtime error, wherein source code features present in both the third plurality of source code features and the fourth plurality of source code features are added to a fifth plurality of source code features; and providing an indication that a source code feature of the fifth plurality of source code features is potentially associated with the code behavior of interest. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. One or more computer-readable storage media storing computer-executable instructions for causing a computing system to perform processing to identify at least one code feature potentially associated with a code behavior of interest, the processing comprising:
-
displaying on a graphical user interface a user interface control allowing a user to select a user-selected timeframe during which changed code may be associated with a code behavior of interest, the user interface control being useable to define a start date and an end date for the user-selected timeframe; through the user interface control, receiving user input selecting the user-selected timeframe; receiving a first code version of computer code, the first code version defined by source code comprising a first plurality of source code features; executing an executable version of the first code version, which can be the first code version; monitoring the execution of the executable version of the first code version, the monitoring comprising determining a second plurality of source code features executed during the execution of the executable version of the first code version, the determining comprising determining classes or methods defined in the source code of the first code version and executed, called, invoked, constructed, or instantiated during execution of the executable version of the first code version; analyzing a priority of stored code versions of the computer code to determine one or more second code versions of the computer code created or modified within the user-selected timeframe by determining whether a created-on or modified-on date associated with a stored code version is within the user-selected timeframe; for the one or more second code versions, determining a third plurality of source code features differing between the first code version and the one or more second code version by one or both of; (i) comparing source code signatures, a source code signature being associated with one or more source code features, wherein a given source code signature is generated from one or more source code elements or byte code elements of the one or more source code features, for one or more source code features of the first code version and a given second code version, wherein if source code signatures for an associated source code feature of the one or more source code features differ between the first code version and the given second code version, and a date of the given second code version is within the user-selected timeframe, the one or more source code features are added to the third plurality of source code features;
or(ii) comparing source code or byte code text between one or more source code features of source code or byte code for the first code version and source code or byte code of a given second code version of the one or more second code versions, wherein if a source code text or a byte code text differs between the first code version and the given second code version, and a date of the given second code version is within the user-selected timeframe, code features defined by the changed source code text or byte code text are added to the third plurality of source code features; comparing, the second plurality of source code features and the third plurality of source code features, at least a portion of the compared third plurality of third source code features not directly identified by the monitoring as associated with a runtime error, wherein source code features present in both the second plurality of source code features and the third plurality of source code features are added to a fourth plurality of code features; and providing an indication that a source code feature of the fourth plurality of source code features is potentially relevant to the code behavior of interest.
-
-
13. In a computing system comprising a memory and one or more processors, a method of determining methods potentially associated with a code error, the method comprising:
-
receiving a first code version, the first code version comprising a first plurality of source code features; receiving a second code version, the second code version comprising a second plurality of source code features; executing an executable version of the first code version, which can be the first code version; monitoring the execution of the executable version of the first code version, the monitoring comprising determining a third plurality of source code features from the first plurality of source code features which are executed during the execution of the executable version of the first code version, the determining comprising determining classes or methods executed, called, invoked, constructed, or instantiated during execution of the executable version of the first code version; generating a first plurality of source code signatures for the first code version from one or more source code features of the first plurality of source code features defined in source code or byte code of the first code version; wherein at least a first source code feature of the first plurality of source code features comprises (i) a declaration of a method, function, or class, the declaration comprising a first plurality of first source code elements or a first plurality of first byte code elements of the at least a first source code feature, the first plurality of first source code elements or the first plurality of first byte code elements being selected from the group consisting of access types, return types, method names, arguments numbers, and argument types;
or (ii) a first plurality of operations, defined in source code or byte code of the at least a first source code feature, that implement a method or function; andwherein a first source code signature of the at least a first source code feature comprises (i) a concatenation of the first plurality of first source code elements or the first plurality of first byte code elements, or a concatenation of the first plurality of operations;
or (ii) a hash value generated from a concatenation of the first plurality of first source code elements or the first plurality of first byte code elements, or a hash value generated from a concatenation of the first plurality of operations;generating a second plurality of source code signatures for the second code version from one or more source code features of the second plurality of source code features defined in source code or byte code of the second code version; wherein at least a second source code feature of the second plurality of source code features comprises (i) a declaration of a method, function, or class, the declaration comprising a second plurality of second source code elements or a second plurality of second byte code elements, the second plurality of second source code elements or the second plurality of second byte code elements being selected from the group consisting of access types, return types, method names, arguments numbers, and argument types;
or (ii) a second plurality of operations, defined in the source code or byte code of the at least a second code feature, that implement a method or function; andwherein a second source code signature of the at least a second source code feature comprises (i) a concatenation of the second plurality of second source code elements or the second plurality of second byte code elements, or a concatenation of the second plurality of operations;
or (ii) a hash value generated from a concatenation of the second plurality of second source code elements or the second plurality of second byte code elements, or a hash value generated from a concatenation of the second plurality of operations;comparing the first plurality of source code signatures with the second plurality of source code signature; in response to determining that a third source code signature for a given source code feature of the first code version differs from a fourth source code signature for a source code feature of the second code version corresponding to the given source code feature, adding the given source code feature to a fourth plurality of source code features; comparing the third plurality of source code features and the fourth plurality of source code features, at least a portion of the compared third plurality of source code features not directly identified by the monitoring as associated with a runtime error, wherein source code features present in both the third plurality of source code features and the fourth plurality of source code features are added to a fifth plurality of source code features; and providing an indication that a source code feature of the fifth plurality of source code features is potentially associated with the code behavior of interest. - View Dependent Claims (14, 15)
-
Specification