IP Library Granted Patent US 12,001,821
Granted Patent B2
US 12,001,821 · App. 18/119,640 · Granted Jun 4, 2024

Generation and/or recommendation of tools for automating aspects of computer programming

Inventors: Bin Ni (Fremont, CA); Owen Lewis (Stanford, CA); Qianyu Zhang (Sunnyvale, CA)
G06F8/40G06N20/00
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 12,001,821
App. No.
18/119,640
Granted
Jun 4, 2024
Kind
B2
Abstract

Implementations are described herein for leveraging prior source code transformations to facilitate automatic creation and/or recommendation of tools for automating aspects of source code transformations captured in real time. In various implementations, a transformation made by a programmer to a source code snipped may be captured in a source code editor application in real time. Based on the transformation and the intent, one or more candidate source code transformations may be identified from one or more repositories of prior source code transformations made by one or more other programmers. The source code editor application may be caused to provide output indicative of a tool that is operable to automate one or more edits associated with both the transformation made by the programmer to the source code snippet and with one or more of the candidate source code transformations.

Claims (44)

1. A method implemented using one or more processors, comprising:

capturing, in a source code editor application in real time, a transformation made by a programmer to a source code snippet;

determining an intent behind the transformation, wherein determining the intent includes:

applying data indicative of the transformation as input across a machine learning model to generate an embedding,

identifying one or more nearest neighbors to the embedding in an embedding space indexed by reference intents behind prior source code transformations, and

determining the intent based one or more reference intents behind the one or more nearest neighbors;

based on the transformation and the intent, selecting, from a plurality of transformation repositories, one or more candidate source code transformations;

causing the source code editor application to provide output indicative of a tool that is operable to automate one or more edits associated with both the transformation made by the programmer to the source code snippet and with one or more of the candidate source code transformations; and

automating one or more of the edits associated with both the transformation made by the programmer to the source code snippet and with one or more of the candidate source code transformations based on the output.

2. The method of claim 1 , wherein the one or more candidate source code transformations comprise a plurality of candidate source code transformations.

3. The method of claim 2 , wherein the tool comprises a graphical user interface (GUI) that includes a list of source code files containing the plurality of candidate source code transformations.

4. The method of claim 3 , wherein each source code file in the list is selectable to navigate to the source code file.

5. The method of claim 1 , wherein determining the intent behind the transformation further comprises semantically processing a natural language comment contained in a source code file that also includes the source code snippet.

6. The method of claim 1 , wherein determining the intent behind the transformation further comprises semantically processing one or more tokens of the source code snippet.

7. The method of claim 1 , further comprising determining a context in which the transformation is being made, wherein the selecting is further based on the context.

8. The method of claim 7 , wherein the context is determined based on one or more other transformations the programmer made to other source code snippets prior to the programmer making the transformation to the source code snippet.

9. The method of claim 7 , wherein the context in which the transformation is being made by the programmer includes a function of an executable application that results from compilation of the source code snippet.

10. A system comprising one or more processors and memory storing instructions that, in response to execution by the one or more processors, cause the one or more processors to:

capture, in a source code editor application in real time, a transformation made by a programmer to a source code snippet;

determine an intent behind the transformation, wherein the instructions to determine the intent include instructions to:

apply data indicative of the transformation as input across a machine learning model to generate an embedding,

identify one or more nearest neighbors to the embedding in an embedding space indexed by reference intents behind prior source code transformations, and

determine the intent based one or more reference intents behind the one or more nearest neighbors;

based on the transformation and the intent, select, from a plurality of transformation repositories, one or more candidate source code transformations;

cause the source code editor application to provide output indicative of a tool that is operable to automate one or more edits associated with both the transformation made by the programmer to the source code snippet and with one or more of the candidate source code transformations; and

automate one or more of the edits associated with both the transformation made by the programmer to the source code snippet and with one or more of the candidate source code transformations based on the output.

11. The system of claim 10 , wherein the one or more candidate source code transformations comprise a plurality of candidate source code transformations.

12. The system of claim 11 , wherein the tool comprises a graphical user interface (GUI) that includes a list of source code files containing the plurality of candidate source code transformations.

13. The system of claim 12 , wherein each source code file in the list is selectable to navigate to the source code file.

14. The system of claim 10 , comprising instructions to semantically process a natural language comment contained in a source code file that also includes the source code snippet.

15. The system of claim 10 , wherein the instructions to determine the intent behind the transformation comprise instructions to semantically process one or more tokens of the source code snippet.

16. The system of claim 10 , further comprising instructions to determine a context in which the transformation is being made, wherein the selecting is further based on the context.

17. The system of claim 16 , wherein the context is determined based on one or more other transformations the programmer made to other source code snippets prior to the programmer making the transformation to the source code snippet.

18. The system of claim 16 , wherein the context in which the transformation is being made by the programmer includes a function of an executable application that results from compilation of the source code snippet.

19. At least one non-transitory computer-readable medium comprising instructions that, when executed by one or more processors, cause the one or more processors to:

capture, in a source code editor application in real time, a transformation made by a programmer to a source code snippet;

determine an intent behind the transformation, wherein determining the intent includes:

apply data indicative of the transformation as input across a machine learning model to generate an embedding,

identify one or more nearest neighbors to the embedding in an embedding space indexed by reference intents behind prior source code transformations, and

determine the intent based one or more reference intents behind the one or more nearest neighbors;

based on the transformation and the intent, select, from a plurality of transformation repositories, one or more candidate source code transformations;

cause the source code editor application to provide output indicative of a tool that is operable to automate one or more edits associated with both the transformation made by the programmer to the source code snippet and with one or more of the candidate source code transformations; and

automate one or more of the edits associated with both the transformation made by the programmer to the source code snippet and with one or more of the candidate source code transformations based on the output.

20. The at least one non-transitory computer-readable medium of claim 19 , wherein the one or more candidate source code transformations comprise a plurality of candidate source code transformations.

Assignments (3)
NUNC PRO TUNC ASSIGNMENT Recorded Mar 6, 2024
From: X DEVELOPMENT LLC
To: GOOGLE LLC
Reel/Frame 066669/0491 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 20, 2023
From: NI, BIN; LEWIS, OWEN; ZHANG, QIANYU
To: X DEVELOPMENT LLC
Reel/Frame 063029/0426 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 20, 2023
From: X DEVELOPMENT LLC
To: GOOGLE LLC
Reel/Frame 063029/0470 →
Continuity (2)
Continuation 17123768 · Dec 16, 2020
Related Publication 20230214195A1 · Jul 6, 2023
Cited By (1)
US 12,664,157