Method of identifying similarities in code segments
First Claim
1. A method of analyzing a plurality of code segments, each code segment comprised of one or more lines of program instructions, the method comprising:
- extracting from each code segment one or more predetermined static attributes;
running each said code segment;
extracting from each said code segment dynamic attributes;
computing a distance function based on said extracted static and dynamic attributes for a given pair of code segments, said distance function producing a number of distance measurements; and
displaying said distance measurements.
9 Assignments
0 Petitions
Accused Products
Abstract
A method of analyzing a plurality of code segments to determine the similar static and dynamic features of the code segments compares the static and dynamic features of each of the code segments. Each code segment is comprised of one or more lines of program instructions. One or more predetermined static attributes are extracted from each code segment. Each code segment is then run so that the dynamic attributes of the code segment can be determined. The dynamic attributes are extracted from each code segment and a distance function is computed which is based on the extracted static and dynamic attributes for a given pair of code segments. The distance function produces a distance measurement which indicates the relative degree of similarity between the given pair of code segments.
90 Citations
35 Claims
-
1. A method of analyzing a plurality of code segments, each code segment comprised of one or more lines of program instructions, the method comprising:
-
extracting from each code segment one or more predetermined static attributes; running each said code segment; extracting from each said code segment dynamic attributes; computing a distance function based on said extracted static and dynamic attributes for a given pair of code segments, said distance function producing a number of distance measurements; and displaying said distance measurements.
-
-
2. A method of analyzing at least one attribute in at least two code segments, each code segment comprised of one or more lines of program instructions, the method comprising:
-
identifying one or method dynamic attributes; running each code segment and extracting the identified dynamic attributes from said code segment; and computing a distance function based on the extracted dynamic attributes from each code segment, said distance function producing a measurement indicative of the degree of similarity between the code segments. - View Dependent Claims (3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A method of analyzing at least one attribute in at least two code segments, each code segment comprised of one or more lines of program instructions, the method comprising:
-
identifying one or more semantic attributes; extracting said identified semantic attributes from each code segment; and computing a distance function based on the extracted semantic attributes from each code segment said distance function producing a measurement indicative of the degree of similarity between the code segments. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
-
-
24. A method of analyzing at least one attribute in at least cut two code segments, each code segment comprised of one or more lines of program instructions, the method comprising:
-
identifying one or more semantic attributes; extracting said identified semantic attributes from each code segment; identifying one or more dynamic attributes; running each code segment and extracting the identified dynamic attributes from said code segment; and computing a distance function based on the extracted semantic and dynamic attributes from each code segment, said distance function producing a measurement indicative of the degree of similarity between the code segments. - View Dependent Claims (25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35)
-
Specification