Hierarchical clustering for coding practice discovery
AssigneeAmazon Technologies, Inc.
InventorsRajdeep Mukherjee, Hoan Anh Nguyen, Pranav Garg, Omer Tripp, Sengamedu Hanumantha Rao Srinivasan
Life of this patent
Estimating the term…
Abstract
Code changes may be hierarchically clustered to discover coding practices. Code change graphs for changes to code in a source code repository may be clustered according to hierarchy of different features determined for the source code into groups. The code change graphs in the groups may then be indexed according their similarity with other code change graphs in the groups. Then one or more coding practices corresponding to the indexed code changes may be provided.
Claims20
A system, comprising:
- at least one processor;
- and
- a memory, storing program instructions that when executed by the at least one processor, cause the at least one processor to:
- obtain a plurality of change graphs that describe respective changes to different portions of code stored in a source code repository;
- generate a hierarchy of code portion features respectively determined for the plurality of change graphs that groups at a lowest level of the hierarchy the plurality of change graphs into respective groups;
- for individual ones of the respective groups, determine a similarity between the respective changes to the different portions of code described by those change graphs within the group to index the respective changes to the different portions of code described by those change graphs in the group according to the similarity;
- generate at least one coding practice from the indexed respective changes to the different portions of code in the respective groups according to the hierarchy;
- and
- provide the generated at least one coding practice to at least one feature of a code development system that applies the at least one coding practice as part of coding practice detection, wherein the coding practice detection includes analyzing code being developed, detecting one or more issues in the code being developed, and correcting the one or more issues by applying the at least one coding practice.
A method, comprising:
- obtaining, by a coding practice discovery system, a plurality of change graphs that describe respective changes to different portions of code stored in a source code repository;
- clustering, by the coding practice discovery system, the plurality of change graphs into respective groups according to a hierarchy of code portion features respectively determined for the plurality of change graphs;
- for individual ones of the respective groups, determining, by the coding practice discovery system, a similarity between the respective changes to the different portions of code described by those change graphs within the group to index the respective changes to the different portions of code described by those change graphs in the group according to the similarity;
- and
- providing, by the coding rule practice system, one or more of the indexed respective changes to the different portions of code in the respective groups according to the hierarchy as one or more coding practices to at least one feature of a code development system that applies the one or more coding practices as part of coding practice detection, wherein the coding practice detection includes analyzing code being developed, detecting one or more issues in the code being developed, and correcting the one or more issues by applying the at least one coding practice.
One or more non-transitory, computer-readable storage media, storing program instructions that when executed on or across one or more computing devices cause the one or more computing devices to implement:
- obtaining a plurality of change graphs that describe respective changes to different portions of code stored in a source code repository;
- generating a hierarchy of code portion features respectively determined for the plurality of change graphs that groups at a lowest level of the hierarchy the plurality of change graphs into respective groups;
- for individual ones of the respective groups, determining a similarity between the respective changes to the different portions of code described by those change graphs within the group to index the respective changes to the different portions of code described by those change graphs in the group according to the similarity;
- and
- providing one or more of the indexed respective changes to the different portions of code in the respective groups according to the hierarchy as one or more coding practices to at least one feature of a code development system that applies the one or more coding practices as part of coding practice detection, wherein the coding practice detection includes analyzing code being developed, detecting one or more issues in the code being developed, and correcting the one or more issues by applying the at least one coding practice.
Dependencies are inferred from the claim text.