Identification of relevant code block within relevant software package for a query
AssigneeMicro Focus LLC
InventorsCarl Emil Wareus, Nils Valdemar Barr Zeilon, Per Filip Heden
Life of this patent
Estimating the term…
Abstract
A database stores, for each of a number of software packages, a software package embedding representing the software package. The database stores, for each software package, code block embeddings respectively representing code blocks of the software package. The database stores, for each software package, functionality embeddings respectively representing functionality clusters into which the code block embeddings representing the code blocks of the software package have been clustered. A query embedding representing a query is generated, and used to query the database to identify a relevant code block within a relevant software package for the query.
Claims20
A non-transitory computer-readable data storage medium storing program code executable by a processor to perform processing comprising, for each of a plurality of software packages:
- generating code block embeddings respectively representing a plurality of code blocks of the software package;
- clustering the code block embeddings into a plurality of functionality clusters;
- generating functionality embeddings respectively representing the functionality clusters;
- generating a software package embedding representing the software package, using the code block embeddings or the functionality embeddings;
- and
- storing the software package embedding, the functionality embeddings, and the code block embeddings in a database queryable to identify a relevant code block within a relevant software package for a query.
A computing device comprising:
- a database storing, for each of a plurality of software packages:
- a software package embedding representing the software package;
- a plurality of code block embeddings respectively representing a plurality of code blocks of the software package;
- and
- a plurality of functionality embeddings respectively representing a plurality of functionality clusters into which the code block embeddings representing the code blocks of the software package have been clustered;
- a processor;
- and
- a memory storing program code executable by the processor to:
- generate a query embedding representing a query;
- query the database using the query embedding to identify a relevant code block within a relevant software package for the query;
- and
- return the relevant code block within the relevant software package that has been identified.
A method comprising:
- for each of a plurality of software packages:
- generating, by a processor, code block embeddings respectively representing a plurality of code blocks of the software package;
- clustering, by the processor, the code block embeddings into a plurality of functionality clusters;
- generating, by the processor, functionality embeddings respectively representing the functionality clusters;
- generating, by the processor, a software package embedding representing the software package, using the code block embeddings or the functionality embeddings;
- storing, by the processor, the software package embedding, the functionality embeddings, and the code block embeddings in a database;
- generating, by the processor, a query embedding representing a query;
- querying, by the processor, the database using the query embedding to identify a relevant code block within a relevant software package for the query;
- and
- returning, by the processor, the relevant code block within the relevant software package that has been identified.
Dependencies are inferred from the claim text.