IP Library › Granted Patent US 11,966,446
Granted Patent B2
US 11,966,446 · App. 18/330,225 · Granted Apr 23, 2024

Systems and methods for a search tool of code snippets

Inventors: Richard Socher (Palo Alto, CA); Bryan McCann (Palo Alto, CA)
Assignee: SuSea, Inc
G06F16/9535G06F16/9538
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 11,966,446
App. No.
18/330,225
Granted
Apr 23, 2024
Kind
B2
Abstract

The present application generally relates to search engines, and more specifically to systems and methods for a search tool for code snippets. Embodiment described herein provide a customized code search system that generates code search results from customized data sources, extract code snippets from the code search results, and presents the code snippets via a user interface. In one embodiment, the search system adopts a machine learning module to generate and highlight search results from different data sources that include code examples, e.g., in a programming language. To improve search efficiency, in response to a code search query, the search system may extract code snippets from search results from relevant sources in a user interface element, such as user selectable panels.

Claims (56)

1. A processor-implemented method of performing real-time code search in an integrated development environment (IDE), the method comprising:

monitoring, via a client component with an IDE implemented on a user device, user activities relating to a code segment;

determining, by a neural network based prediction model implemented on one or more hardware processors, a code search query based at least in part on a first portion of the code segment and the monitored user activities;

transmitting, via a first search application programming interface (API) over a network, a first search input customized from the code search query to a first data source that has been pre-categorized for code search;

receiving, from the first search API, a first search result including a first link to a first webpage containing a first code snippet in response to the code search query;

extracting the first code snippet from the first webpage following the first link; and

causing a display of a first user-engageable widget displaying the first code snippet at a user interface within the IDE.

2. The method of claim 1 , wherein the code search query is determined further based on a user activity event indicative of a user intention for the code search.

3. The method of claim 1 , wherein the code search query is determined further based on identifying an error within a first portion of the code segment.

4. The method of claim 1 , further comprising:

transmitting, via a second search application programming interface (API) and over the network, a second search input customized from the code search query to a second data source that has been pre-categorized for code search;

receiving, from the second search API, a second search result including a second link to a second webpage containing a second code snippet in response to the code search query;

extracting the second code snippet from the second webpage following the second link;

ranking, by a ranker model, the first search result and the second search result; and

causing a display of the first user-engageable widget displaying the first code snippet and a second user-engageable widget displaying the second code snippet according to the ranking at a user interface within the IDE.

5. The method of claim 1 , wherein the first user-engageable widget includes a visual element indicating the first data source.

6. The method of claim 1 , wherein the monitored user activities are transmitted to a search server, and wherein the neural network based prediction model is implemented at the search server, and wherein the method further comprises:

transmitting the first code snippet to the user device thereby causing the display of a first user-engageable widget.

7. The method of claim 1 , wherein the neural network based prediction model is implemented by the client component at the user device.

8. The method of claim 1 , wherein the client component receives a user selection of the first code snippet, thereby causing automatic integration of the first code snippet into the code segment upon the user selection.

9. The method of claim 8 , wherein the automatic integration of the first code snippet comprises a replacement of a sub-portion of the code segment that has been identified as relating to a code error with the first code snippet.

10. A system for performing real-time code search in an integrated development environment (IDE), the system comprising:

a communication interface that receives, via a client component with an IDE implemented on a user device, user activities relating to a code segment;

a physical memory storing neural network based models and a plurality of processor-executable instructions; and

one or more physical processors executing the instructions to perform operations comprising:

determining, by a neural network based prediction model implemented on one or more hardware processors, a code search query based at least in part on a first portion of the code segment and the monitored user activities;

transmitting, via a first search application programming interface (API) over a network, a first search input customized from the code search query to a first data source that has been pre-categorized for code search;

receiving, from the first search API, a first search result including a first link to a first webpage containing a first code snippet in response to the code search query;

extracting the first code snippet from the first webpage following the first link; and

causing a display of a first user-engageable widget displaying the first code snippet at a user interface within the IDE.

11. The system of claim 10 , wherein the code search query is determined further based on a user activity event indicative of a user intention for the code search.

12. The system of claim 10 , wherein the code search query is determined further based on identifying an error within a first portion of the code segment.

13. The system of claim 10 , wherein the operations further comprise:

transmitting, via a second search application programming interface (API) and over the network, a second search input customized from the code search query to a second data source that has been pre-categorized for code search;

receiving, from the second search API, a second search result including a second link to a second webpage containing a second code snippet in response to the code search query;

extracting the second code snippet from the second webpage following the second link;

ranking, by a ranker model, the first search result and the second search result; and

causing a display of the first user-engageable widget displaying the first code snippet and a second user-engageable widget displaying the second code snippet according to the ranking at a user interface within the IDE.

14. The system of claim 10 , wherein the first user-engageable widget includes a visual element indicating the first data source.

15. The system of claim 10 , wherein the client component receives a user selection of the first code snippet, thereby causing automatic integration of the first code snippet into the code segment upon the user selection.

16. The system of claim 15 , wherein the automatic integration of the first code snippet comprises a replacement of a sub-portion of the code segment that has been identified as relating to a code error with the first code snippet.

17. A processor-readable non-transitory storage medium storing a plurality of processor-executable instructions for performing real-time code search in an integrated development environment (IDE), the instructions being executed by one or more processors to perform operations comprising:

monitoring, via a client component with an IDE implemented on a user device, user activities relating to a code segment;

determining, by a neural network based prediction model implemented on one or more hardware processors, a code search query based at least in part on a first portion of the code segment and the monitored user activities;

transmitting, via a first search application programming interface (API) over a network, a first search input customized from the code search query to a first data source that has been pre-categorized for code search;

receiving, from the first search API, a first search result including a first link to a first webpage containing a first code snippet in response to the code search query;

extracting the first code snippet from the first webpage following the first link; and

causing a display of a first user-engageable widget displaying the first code snippet at a user interface within the IDE.

18. The processor-readable non-transitory storage medium of claim 17 , wherein the code search query is determined further based on a user activity event indicative of a user intention for the code search.

19. The processor-readable non-transitory storage medium of claim 17 , wherein the code search query is determined further based on identifying an error within a first portion of the code segment.

20. The processor-readable non-transitory storage medium of claim 1 , wherein the operations further comprise:

transmitting, via a second search application programming interface (API) and over the network, a second search input customized from the code search query to a second data source that has been pre-categorized for code search;

receiving, from the second search API, a second search result including a second link to a second webpage containing a second code snippet in response to the code search query;

extracting the second code snippet from the second webpage following the second link;

ranking, by a ranker model, the first search result and the second search result; and

causing a display of the first user-engageable widget displaying the first code snippet and a second user-engageable widget displaying the second code snippet according to the ranking at a user interface within the IDE.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 12, 2023
From: SOCHER, RICHARD; MCCANN, BRYAN
To: SUSEA, INC.
Reel/Frame 063926/0637 →
Continuity (3)
Provisional Application 63446199 · Feb 16, 2023
Provisional Application 63349855 · Jun 7, 2022
Related Publication 20230394095A1 · Dec 7, 2023
Cited By (3)
US 12,197,912 US 12,271,866 US 12,277,126