US 12,277,126 B2
Methods and systems for search and ranking of code snippets using machine learning models
Ashok Balasubramanian, Chennai (IN); Arul Reagan S, Chengalpattu District (IN); Balaji Munusamy, Chennai (IN); and Karthikeyan Krishnaswamy Raja, Chennai (IN)
Assigned to OPEN WEAVER INC., Miami, FL (US)
Filed by Open Weaver Inc., Miami, FL (US)
Filed on Jun. 30, 2023, as Appl. No. 18/217,490.
Prior Publication US 2025/0005026 A1, Jan. 2, 2025
Int. Cl. G06F 16/2457 (2019.01); G06F 16/248 (2019.01)
CPC G06F 16/24578 (2019.01) [G06F 16/248 (2019.01)] 17 Claims
OG exemplary drawing
 
8. A method for automatically generating search list rankings of code snippets, the method comprising:
searching one or more source code repositories to identify a plurality of code snippets in response to a search query;
assigning a plurality of weight values to a plurality of ranking parameters, each of the plurality of ranking parameters corresponding to a different type of rating score for plurality of code snippets;
processing the plurality of code snippets using one or more machine learning models to generate a plurality of rating scores for each of the plurality of code snippets, wherein each rating score of the plurality of rating scores applies to a corresponding ranking parameter of the plurality of ranking parameters;
generating a combined score for each of the plurality of code snippets, wherein the combined score for a code snippet is generated by combining the plurality of rating scores for the code snippet according to the plurality of weight values assigned to the corresponding ranking parameters; and
generating and presenting a user interface comprising an ordered list of the plurality of code snippets based on the combined score for each of the plurality of code snippets,
wherein the ranking parameters comprise a popularity score, a relevancy score, a recency score, an engagement score, and a document type score, wherein:
the popularity score is a standardized measurement relative to a popularity of a code snippet;
the relevancy score is a standardized measurement relative to a relevance of a code snippet to the search query;
the recency score is a standardized measurement relative to how recently a code snippet was used;
the engagement score is a standardized measurement relative to an amount of engagement a code snippet receives; and
the document type score is a standardized measurement relative to a type of document from which the code snippet was derived.