IP Library › Granted Patent US 12,282,518
Granted Patent B2
US 12,282,518 · App. 18/611,031 · Granted Apr 22, 2025

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 12,282,518
App. No.
18/611,031
Granted
Apr 22, 2025
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 (59)

1. A processor-implemented method of performing a real-time code search, the method comprising:

receiving, from a user device and at a search server, a user input relating to a code program;

generating, by a neural network based prediction model implemented on one or more hardware processors at the search server, a code search query based at least in part on the user input;

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

transmitting, to the user device, the extracted first code snippet taking a format that is to be directly incorporated into a coding environment.

2. The method of claim 1 , wherein the user input comprises a text description describing the code program.

3. The method of claim 1 , wherein the user input comprises one or more user entered code segments in the coding environment.

4. The method of claim 1 , wherein the user input comprises real-time user coding activities within the coding environment, and wherein the code search query is generated further in response to detecting a user activity event indicative of a user intention for the code search from the real-time user coding activities, wherein the user activity event comprises one or more of:

a pause in user input;

a scrolling movement around at least a segment of the one or more user entered code segments; and

an error detection within the one or more user entered code segments.

5. The method of claim 1 , wherein the transmitting, to the user device, the extracted first code snippet causes a display of a first user-engageable widget displaying the first code snippet at the user device.

6. The method of claim 4 , 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 of the user device.

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

8. The method of claim 1 , wherein the transmitting, to the user device, the extracted first code snippet causes an integration of the extracted first code snippet into the coding environment.

9. A system for performing a real-time code search, the system comprising:

a communication interface that receives, from a user device, a user input relating to a code program;

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

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

generating, by a neural network based prediction model implemented on one or more hardware processors at the search server, a code search query based at least in part on the user input;

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

wherein the communication interface transmits, to the user device, the extracted first code snippet taking a format that is to be directly incorporated into a coding environment.

10. The system of claim 9 , wherein the user input comprises a text description describing the code program.

11. The system of claim 9 , wherein the user input comprises one or more user entered code segments in the coding environment.

12. The system of claim 9 , wherein the user input comprises real-time user coding activities within the coding environment, and wherein the code search query is generated further in response to detecting a user activity event indicative of a user intention for the code search from the real-time user coding activities, wherein the user activity event comprises one or more of:

a pause in user input;

a scrolling movement around at least a segment of the one or more user entered code segments; and

an error detection within the one or more user entered code segments.

13. The system of claim 9 , wherein the operation of transmitting, to the user device, the extracted first code snippet causes a display of a first user-engageable widget displaying the first code snippet at the user device.

14. The system of claim 13 , 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 of the user device.

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

16. The system of claim 9 , wherein the operation of transmitting, to the user device, the extracted first code snippet causes an integration of the extracted first code snippet into the coding environment.

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

receiving, from a user device and at a search server, a user input relating to a code program;

generating, by a neural network based prediction model implemented on one or more hardware processors at the search server, a code search query based at least in part on the user input;

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

transmitting, to the user device, the extracted first code snippet taking a format that is to be directly incorporated into a coding environment.

18. The medium of claim 17 , wherein the user input comprises a text description describing the code program.

19. The medium of claim 17 , wherein the user input comprises one or more user entered code segments in the coding environment.

20. The medium of claim 17 , wherein the user input comprises real-time user coding activities within the coding environment, and wherein the code search query is generated further in response to detecting a user activity event indicative of a user intention for the code search from the real-time user coding activities, wherein the user activity event comprises one or more of:

a pause in user input;

a scrolling movement around at least a segment of the one or more user entered code segments; and

an error detection within the one or more user entered code segments.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 20, 2024
From: MCCANN, BRYAN; SOCHER, RICHARD
To: SUSEA, INC.
Reel/Frame 066844/0717 →
Continuity (4)
Continuation 18330225 · Jun 6, 2023
Provisional Application 63446199 · Feb 16, 2023
Provisional Application 63349855 · Jun 7, 2022
Related Publication 20240311434A1 · Sep 19, 2024
References Cited (15)
US 7631294B2 · Rush · 2009 [cited by examiner]
US 10671358B2 · Olivier · 2020 [cited by examiner]
US 20100131517A1 · Huang · 2010 [cited by examiner]
US 20180081881A1 · Poddar · 2018 [cited by examiner]
US 20190050319A1 · Gondalia et al. · 2019 [cited by applicant]
US 20190227774A1 · Banuelos et al. · 2019 [cited by applicant]
US 20200097261A1 · Smith et al. · 2020 [cited by applicant]
US 20200117446A1 · Smith et al. · 2020 [cited by applicant]
US 20200293291A1 · Guan · 2020 [cited by examiner]
US 20210303989A1 · Bird et al. · 2021 [cited by applicant]
US 20210357187A1 · Clement · 2021 [cited by examiner]
US 20220107802A1 · Rao et al. · 2022 [cited by applicant]
US 20220188081A1 · Ni et al. · 2022 [cited by applicant]
US 20220334835A1 · Gottschlich · 2022 [cited by examiner]
International Search Report and Written Opinion of PCT/US2023/068081, dated Aug. 23, 2023, 13 pages. [cited by applicant]