# US 2024/0004644 A1 · Automating Identification of Code Snippets for Library Suggestion Models

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0004644 A1
- Document ID: US20240004644A1
- Status: Published application
- Kind: A1
- Application number: 18/465,812
- Filed: 2023-09-12
- Published: 2024-01-04
- Earliest claimed: 2017-09-08
- Assignees: DevFactory Innovations FZ-LLC
- Applicants: DevFactory Innovations FZ-LLC
- Inventors: Tushar Makkar
- Web page: https://patentgrep.com/patent/US20240004644A1

## CPC

- G06F 8/71: Version control (security arrangements therefor G06F21/57); Configuration management
- G06F 8/36: Software reuse
- G06F 8/73: Program documentation
- G06F 40/30: Semantic analysis
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method, system, and apparatus are disclosed for adding library models to a library knowledge base by defining a template for a library configuration file that conveys information about each library model, custom inputs and code snippets to facilitate library comparison operations, and education content for the library model, where the library configuration file template may be automatically filled by populating selected data fields in the template with information identifying the library model and a set of custom inputs for the library model, and then passing a set of test cases from the set of custom inputs to an input/output matching engine to evaluate a repository of code snippets and identify a set of functionally similar code snippets for inclusion one or more data fields in the template.

## Claims

### Claim 1

A method for adding a library model to a library knowledge base, comprising:
receiving, by a device comprising a processor and a memory, a software program to be submitted as a library model;
generating, by the device, a library configuration file by filling a configuration file template with extracted data to automatically populate a plurality of data fields in the library configuration file with information identifying the library model and a set of custom inputs for the library model, and passing a set of test cases from the set of custom inputs to an input/output matching engine to evaluate a repository of code snippets and identify a set of functionally similar code snippets for inclusion in one of the data fields in the library configuration file;
submitting, by the device, the library configuration file to a validator which validates the library configuration file to ensure that the library model is correctly formatted and satisfies predetermined library model constraints; and
adding the library model to the library knowledge base if the library configuration file is correctly formatted and satisfies predetermined library model constraints.

### Claim 2 (depends on 1)

The method of claim 1, where generating the library configuration file comprises defining the configuration file template with a standardized human-readable format which is parsable by software.

### Claim 3 (depends on 2)

The method of claim 2, where the configuration file template comprises a YAML format configuration file template.

### Claim 4 (depends on 3)

The method of claim 3, where generating the library configuration file comprises conducting an iterative sequence of operations to retrieve, scrape or extract data to automatically populate the plurality of data fields in the YAML format configuration file template.

### Claim 5 (depends on 4)

The method of claim 4, where conducting the iterative sequence of operations comprises performing a first iterative pass to generate an initial version of the YAML library configuration file template in which only a subset of the plurality of data fields is filled with extracted data, and then performing a second iterative pass to generate a final version of the YAML library configuration file template in which one of the data fields in the YAML library configuration file is filled with the set of functionally similar code snippets.

### Claim 6 (depends on 1)

The method of claim 1, where the repository of code snippets comprises an online hosting service for storing a plurality of open source projects.

### Claim 7 (depends on 1)

The method of claim 1, where the information identifying the library model comprises a library name, a library function name, one or more library descriptors, a documentation link for the library model, and a method signature for the library model.

### Claim 8 (depends on 7)

The method of claim 7, where the one or more library descriptors comprises a library function code type descriptor, an embedded video tutorial link descriptor, a maven repository link descriptor for the library model, a library source code link descriptor for the library model, a library function summary descriptor, a code line number descriptor for adding the library model, and a code snippet advantages descriptor for the library model.

### Claim 9 (depends on 1)

The method of claim 1, where the information identifying the library model comprises a first list of conditions that will determine a valid match when the when a code snippet output evaluates to true and a second list of conditions that will determine a valid match when the when a code snippet output evaluates to false.

### Claim 10

A computer program product comprising at least one recordable medium having stored thereon executable instructions and data which, when executed by at least one processing device, cause the at least one processing device to:
receive a software program to be submitted as a library model;
generate a library configuration file by filling a configuration file template with extracted data to automatically populate a plurality of data fields in the library configuration file with information identifying the library model and a set of custom inputs for the library model, and passing a set of test cases from the set of custom inputs to an input/output matching engine to evaluate a repository of code snippets and identify a set of functionally similar code snippets for inclusion in one of the data fields in the library configuration file;
submit the library configuration file to a validator which validates the library configuration file to ensure that the library model is correctly formatted and satisfies predetermined library model constraints; and
add the library model to the library knowledge base if the library configuration file is correctly formatted and satisfies predetermined library model constraints.

### Claim 11 (depends on 10)

The computer program product of claim 10, wherein the computer readable program, when executed on the system, causes the at least one processing device to generate the library configuration file by generating a YAML format configuration file template.

### Claim 12 (depends on 10)

The computer program product of claim 10, wherein the computer readable program, when executed on the system, causes the at least one processing device to generate the library configuration file by conducting an iterative sequence of operations to retrieve, scrape or extract data to automatically populate the plurality of data fields in the YAML format configuration file template.

### Claim 13 (depends on 12)

The computer program product of claim 12, wherein the computer readable program, when executed on the system, causes the at least one processing device to conduct the iterative sequence of operations by performing a first iterative pass to generate an initial version of the YAML library configuration file template in which only a subset of the plurality of data fields is filled with extracted data, and then performing a second iterative pass to generate a final version of the YAML library configuration file template in which one of the data fields in the YAML library configuration file is filled with the set of functionally similar code snippets.

### Claim 14 (depends on 10)

The computer program product of claim 10, wherein where the repository of code snippets comprises an online hosting service for storing a plurality of open source projects.

### Claim 15 (depends on 10)

The computer program product of claim 10,
where the information identifying the library model comprises a library name, a library function name, one or more library descriptors, a documentation link for the library model, and a method signature for the library model; and
where the one or more library descriptors comprises a library function code type descriptor, an embedded video tutorial link descriptor, a maven repository link descriptor for the library model, a library source code link descriptor for the library model, a library function summary descriptor, a code line number descriptor for adding the library model, and a code snippet advantages descriptor for the library model.

### Claim 16

A system comprising:
one or more processors;
a memory coupled to at least one of the processors; and
a set of instructions stored in the memory and executed by at least one of the processors to enhance operable functionality of a software program by adding a library model to a library knowledge base, wherein the set of instructions are executable to perform actions of:
receiving a software program to be submitted as a library model;
generating a library configuration file by filling a configuration file template with extracted data to automatically populate a plurality of data fields in the library configuration file with information identifying the library model and a set of custom inputs for the library model, and passing a set of test cases from the set of custom inputs to an input/output matching engine to evaluate a repository of code snippets and identify a set of functionally similar code snippets for inclusion in one of the data fields in the library configuration file;
submitting the library configuration file to a validator which validates the library configuration file to ensure that the library model is correctly formatted and satisfies predetermined library model constraints; and
adding the library model to the library knowledge base if the library configuration file is correctly formatted and satisfies predetermined library model constraints.

### Claim 17 (depends on 16)

The system of claim 16, where generating the library configuration file comprises generating a YAML format configuration file template.

### Claim 18 (depends on 17)

The system of claim 17, where generating the library configuration file comprises conducting an iterative sequence of operations to retrieve, scrape or extract data to automatically populate the plurality of data fields in the YAML format configuration file template.

### Claim 19 (depends on 18)

The system of claim 18, where conducting the iterative sequence of operations comprises performing a first iterative pass to generate an initial version of the YAML library configuration file template in which only a subset of the plurality of data fields is filled with extracted data, and then performing a second iterative pass to generate a final version of the YAML library configuration file template in which one of the data fields in the YAML library configuration file is filled with the set of functionally similar code snippets.

### Claim 20 (depends on 16)

The system of claim 16, where the repository of code snippets comprises an online hosting service for storing a plurality of open source projects.
