×

Identification of code features potentially associated with code behavior

  • US 10,565,089 B2
  • Filed: 08/15/2016
  • Issued: 02/18/2020
  • Est. Priority Date: 08/15/2016
  • Status: Active Grant
First Claim
Patent Images

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.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×