Matching graphs generated from source code

    公开(公告)号:US11455152B2

    公开(公告)日:2022-09-27

    申请号:US17009306

    申请日:2020-09-01

    Inventor: Qianyu Zhang

    Abstract: Techniques are described herein for training a machine learning model and using the trained machine learning model to more accurately determine alignments between matching/corresponding nodes of predecessor and successor graphs representing predecessor and successor source code snippets. A method includes: obtaining a first abstract syntax tree that represents a predecessor source code snippet and a second abstract syntax tree that represents a successor source code snippet; determining a mapping across the first and second abstract syntax trees; obtaining a first control-flow graph that represents the predecessor source code snippet and a second control-flow graph that represents the successor source code snippet; aligning blocks in the first control-flow graph with blocks in the second control-flow graph; and applying the aligned blocks as inputs across a trained machine learning model to generate an alignment of nodes in the first abstract syntax tree with nodes in the second abstract syntax tree.

    Code change graph node matching with machine learning

    公开(公告)号:US11340873B2

    公开(公告)日:2022-05-24

    申请号:US16946982

    申请日:2020-07-14

    Abstract: Implementations are described herein for training and using machine learning to determine mappings between matching nodes of graphs representing predecessor source code snippets and graphs representing successor source code snippets. In various implementations, first and second graphs may be obtained, wherein the first graph represents a predecessor source code snippet and the second graph represents a successor source code snippet. The first graph and the second graph may be applied as inputs across a trained machine learning model to generate node similarity measures between individual nodes of the first graph and nodes of the second graph. Based on the node similarity measures, a mapping may be determined across the first and second graphs between pairs of matching nodes.

    Learning and using programming styles

    公开(公告)号:US11243746B2

    公开(公告)日:2022-02-08

    申请号:US16458713

    申请日:2019-07-01

    Abstract: Techniques are described herein for using artificial intelligence to “learn,” statistically, a target programming style that is imposed in and/or evidenced by a code base. Once the target programming style is learned, it can be used for various purposes. In various implementations, one or more generative adversarial networks (“GANs”), each including a generator machine learning model and a discriminator machine learning model, may be trained to facilitate learning and application of target programming style(s). In some implementations, the discriminator(s) and/or generator(s) may operate on graphical input, and may take the form of graph neural networks (“GNNs”), graph attention neural networks (“GANNs”), graph convolutional networks (“GCNs”), etc., although this is not required.

    LEARNING AND USING PROGRAMMING STYLES

    公开(公告)号:US20210004210A1

    公开(公告)日:2021-01-07

    申请号:US16458713

    申请日:2019-07-01

    Abstract: Techniques are described herein for using artificial intelligence to “learn,” statistically, a target programming style that is imposed in and/or evidenced by a code base. Once the target programming style is learned, it can be used for various purposes. In various implementations, one or more generative adversarial networks (“GANs”), each including a generator machine learning model and a discriminator machine learning model, may be trained to facilitate learning and application of target programming style(s). In some implementations, the discriminator(s) and/or generator(s) may operate on graphical input, and may take the form of graph neural networks (“GNNs”), graph attention neural networks (“GANNs”), graph convolutional networks (“GCNs”), etc., although this is not required.

    AUTOMATED IDENTIFICATION OF CODE CHANGES
    16.
    发明申请

    公开(公告)号:US20200371778A1

    公开(公告)日:2020-11-26

    申请号:US16418767

    申请日:2019-05-21

    Abstract: Implementations are described herein for automatically identifying, recommending, and/or effecting changes to a legacy source code base by leveraging knowledge gained from prior updates made to other similar legacy code bases. In some implementations, data associated with a first version source code snippet may be applied as input across a machine learning model to generate a new source code embedding in a latent space. Reference embedding(s) may be identified in the latent space based on their distance(s) from the new source code embedding in the latent space. The reference embedding(s) may be associated with individual changes made during the prior code base update(s). Based on the identified one or more reference embeddings, change(s) to be made to the first version source code snippet to create a second version source code snippet may be identified, recommended, and/or effected.

Patent Agency Ranking