IP Library Granted Patent US 9,411,578
Granted Patent B2
US 9,411,578 · App. 14/794,280 · Granted Aug 9, 2016

Source code violation matching and attribution

Inventors: Anders Starcke Henriksen (Oxford, GB); Arthur Baars (Oxford, GB); Pavel Avgustinov (Oxford, GB); Julian Tibble (Oxford, GB); Max Schaefer (Oxford, GB); Oege de Moor (Oxford, GB)
Assignee: Semmle Limited
G06F8/71G06F8/43G06F8/75G06F8/77G06F11/3616G06Q10/06398
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,411,578
App. No.
14/794,280
Granted
Aug 9, 2016
Kind
B2
Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for matching and attributing code violations. One of the methods includes receiving a snapshot S of a code base of source code and a different snapshot T of the code base. Data representing first violations in the snapshot S and second violations in the snapshot T is received. Pairs of matching violations are determined using performing two or more matching processes, including performing a first matching process, the first matching process determining first pairs of matching violations according to a first matching algorithm and performing a second matching process, the second matching process determining second pairs of matching violations according to a second matching algorithm from violations not matched by the first matching process. The first pairs of matching violations and the second pairs of matching violations are included in the determined pairs of matching violations.

Claims (65)

1. A computer-implemented method comprising:

receiving data representing a plurality of snapshots of a code base, including respective status changes of source code violations for each snapshot of the plurality of snapshots, wherein each status change has a violation type and represents a violation introduction or a violation removal, and wherein each status change is attributed to a respective developer entity, each developer entity being one or more developers of a plurality of developers;

for each of one or more types:

computing, for a first developer entity, an introduction measure of a number of violation introductions of the type attributed to the first developer entity as indicated by the plurality of snapshots; and

computing, for the first developer entity, a removal measure of a number of violation removals of the type attributed to the first developer entity as indicated by the plurality of snapshots; and

generating a fingerprint for the first developer entity, the fingerprint comprising data representing the introduction measure and the removal measure for each of one or more types.

2. The method of claim 1 , wherein the fingerprint comprises a first vector of violation introductions, wherein each element of the first vector represents a measure of a number of violation introductions of a respective type attributed to the first developer entity.

3. The method of claim 2 , wherein the fingerprint comprises a second vector of violation removals, wherein each element of the second vector represents a measure of a number of violations of a respective type removed by the first developer entity between snapshots of the code base.

4. The method of claim 1 , wherein generating the fingerprint for the first developer entity comprises:

scaling a respective value of each data element of the fingerprint for the first developer entity by a measure of churn attributable to the first developer entity.

5. The method of claim 1 , wherein generating the fingerprint for the first developer entity comprises:

scaling a respective first value of each data element of the fingerprint corresponding to violations introduced by the developer entity by a measure of total violations introduced by the first developer entity; and

scaling a respective second value of each data element of the fingerprint corresponding to violations removed by the developer entity by a measure of total violations removed by the first developer entity.

6. The method of claim 1 , further comprising:

receiving an input specifying one or more selection criteria; and

selecting the plurality of snapshots to be snapshots committed to the code base that satisfy one or more selection criteria.

7. The method of claim 6 , wherein the one or more selection criteria include one or more of:

a time window for the snapshots,

a maximum churn threshold for the snapshots,

a minimum churn threshold for the snapshots,

a maximum violation threshold for the snapshots,

a minimum violation threshold for the snapshots,

snapshots committed by a particular developer or group of developers, or

a particular file or set of files changed in the snapshots.

8. The method of claim 1 , further comprising:

determining that the introduction measure or the removal measure for a first type attributed to the first developer entity has a value that satisfies a threshold; and

automatically reporting the determination.

9. The method of claim 8 , wherein determining that the introduction measure for the first type attributed to the first developer entity has a value that satisfies a threshold comprises:

determining that the introduction measure is within a predetermined top percentile among corresponding measures for the plurality of developers.

10. The method of claim 8 , wherein determining that the introduction measure for the first type attributed to the first developer entity has a value that satisfies a threshold comprises:

obtaining a reference fingerprint; and

determining that the introduction measure has a value that differs from a reference value of the reference fingerprint by at least a threshold value.

11. The method of claim 10 , further comprising:

computing the reference fingerprint as an average fingerprint from respective fingerprints for each of the developers in the plurality of developers.

12. The method of claim 1 , further comprising:

determining that the introduction measure for the first type attributed to the first developer entity has a value that indicates a need for training;

identifying a training session pertaining to the first type; and

automatically sending an invitation to the first developer entity to attend the training session pertaining to the first type.

13. The method of claim 1 , further comprising:

determining that the introduction measure for the first type attributed to the first developer entity has a value that indicates a need for training;

selecting a second developer entity, the second developer entity being one or more developers of the plurality of developers, the second developer entity having a second fingerprint that represents a corresponding introduction measure or removal measure or both for the second developer entity, wherein the corresponding introduction measure or removal measure or both have values that indicates that the second developer entity has achieved at least a threshold level of performance with respect to avoiding violations of the first type, correcting violations of the first type, or both; and

providing a suggested team pairing, the team pairing including the first developer entity and the second developer entity.

14. The method of claim 13 , wherein providing the suggested team pairing comprises providing a suggestion for the second developer entity to serve as a code reviewer for the first developer entity.

15. The method of claim 1 , further comprising:

receiving a second plurality of snapshots of a second code base;

generating a second fingerprint for the first developer entity using status changes of source code violations for each snapshot of the second plurality of snapshots;

comparing the second fingerprint to the first fingerprint; and

determining a likelihood that the first developer entity was responsible for status changes for the second code base based on comparing the second fingerprint to the first fingerprint.

16. A system comprising:

one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising:

receiving data representing a plurality of snapshots of a code base, including respective status changes of source code violations for each snapshot of the plurality of snapshots, wherein each status change has a violation type and represents a violation introduction or a violation removal, and wherein each status change is attributed to a respective developer entity, each developer entity being one or more developers of a plurality of developers;

for each of one or more types:

computing, for a first developer entity, an introduction measure of a number of violation introductions of the type attributed to the first developer entity as indicated by the plurality of snapshots; and

computing, for the first developer entity, a removal measure of a number of violation removals of the type attributed to the first developer entity as indicated by the plurality of snapshots; and

generating a fingerprint for the first developer entity, the fingerprint comprising data representing the introduction measure and the removal measure for each of one or more types.

17. The system of claim 16 , wherein the fingerprint comprises a first vector of violation introductions, wherein each element of the first vector represents a measure of a number of violation introductions of a respective type attributed to the first developer entity.

18. The system of claim 17 , wherein the fingerprint comprises a second vector of violation removals, wherein each element of the second vector represents a measure of a number of violations of a respective type removed by the first developer entity between snapshots of the code base.

19. A computer program product, encoded on one or more non-transitory computer storage media, comprising instructions that when executed by one or more computers cause the one or more computers to perform operations comprising:

receiving data representing a plurality of snapshots of a code base, including respective status changes of source code violations for each snapshot of the plurality of snapshots, wherein each status change has a violation type and represents a violation introduction or a violation removal, and wherein each status change is attributed to a respective developer entity, each developer entity being one or more developers of a plurality of developers;

for each of one or more types:

computing, for a first developer entity, an introduction measure of a number of violation introductions of the type attributed to the first developer entity as indicated by the plurality of snapshots; and

computing, for the first developer entity, a removal measure of a number of violation removals of the type attributed to the first developer entity as indicated by the plurality of snapshots; and

generating a fingerprint for the first developer entity, the fingerprint comprising data representing the introduction measure and the removal measure for each of one or more types.

20. The computer program product of claim 19 , wherein the fingerprint comprises a first vector of violation introductions, wherein each element of the first vector represents a measure of a number of violation introductions of a respective type attributed to the first developer entity.

21. The computer program product of claim 20 , wherein the fingerprint comprises a second vector of violation removals, wherein each element of the second vector represents a measure of a number of violations of a respective type removed by the first developer entity between snapshots of the code base.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 27, 2020
From: GITHUB SOFTWARE UK LTD.
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 051710/0252 →
CHANGE OF NAME Recorded Dec 10, 2019
From: SEMMLE LIMITED
To: GITHUB SOFTWARE UK LTD.
Reel/Frame 051244/0305 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 3, 2015
From: HENRIKSEN, ANDERS STARCKE; BAARS, ARTHUR; AVGUSTINOV, PAVEL; TIBBLE, JULIAN; SCHAEFER, MAX; MOOR, OEGE DE
To: SEMMLE LIMITED
Reel/Frame 036491/0808 →
Continuity (3)
Continuation 14696185 · Apr 24, 2015
Provisional Application 61983932 · Apr 24, 2014
Related Publication 20150324195A1 · Nov 12, 2015