Library suggestion engine
AssigneeDevFactory FZ-LLC
InventorTushar Makkar
Life of this patent
Estimating the term…
Abstract
A method and apparatus are disclosed for enhancing operable functionality of input source code files from a software program by identifying candidate code snippets from the plurality of input source code files that meet a similarity threshold measure for library functions stored in the system library and then identifying at least a first validated code snippet from the candidate code snippets that matches a first library function stored in the system memory on the basis of at least first and second matching metrics so that the developer is presented with a library function recommendation which includes the first validated code snippet, the first library function, and instructions for replacing the first validated code snippet with the first library function.
Claims26
A method performed by a device having an operating system and a system library for enhancing operable functionality of a software program, comprising:
- receiving, by the device, a plurality of input source code files from the software program submitted by a developer;
- identifying, by the device, one or more candidate code snippets from the plurality of input source code files by comparing source code feature vectors for the plurality of input source code files to library function feature vectors for library functions stored in the system library to identify at least a first candidate code snippet which meets at least a first similarity threshold measure for a first library function stored in the system library, and removing one or more code snippets that do not meet a similarity threshold measure for library functions stored in the system library;
- identifying, by the device, at least a first validated code snippet from the one or more candidate code snippets that matches a first library function stored in the system memory on the basis of at least first and second matching metrics comprising implementing an input/output matching algorithm for selecting a candidate code snippet which generates the same output as the first library function when both are injected with a shared input;
- and
- presenting, to the developer, a library function recommendation comprising the first validated code snippet, the first library function, and instructions for replacing the first validated code snippet with the first library function.
A computer program product comprising at least one computer readable storage 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 plurality of input source code files from the software program submitted by a developer;
- identify one or more candidate code snippets from the plurality of input source code files by comparing source code feature vectors for the plurality of input source code files to library function feature vectors for library functions stored in a system library to identify at least a first candidate code snippet which meets at least a first similarity threshold measure for a first library function stored in the system library, and removing one or more code snippets that do not meet a similarity threshold measure for library functions stored in the system library;
- identify at least a first validated code snippet from the one or more candidate code snippets that matches a first library function stored in the system memory on the basis of at least first and second matching metrics comprising implementing an input/output matching algorithm for selecting a candidate code snippet which generates the same output as the first library function when both are injected with a shared input;
- and
- generate a library function recommendation comprising the first validated code snippet, the first library function, and instructions for replacing the first validated code snippet with the first library function.
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 recommending library substitutions for input source code files submitted by a developer, wherein the set of instructions are executable to perform actions of:
- receiving a plurality of input source code files from the software program submitted by a developer;
- identifying one or more candidate code snippets from the plurality of input source code files by comparing source code feature vectors for the plurality of input source code files to library function feature vectors for library functions stored in a system library to identify at least a first candidate code snippet which meets at least a first similarity threshold measure for a first library function stored in the system library, and removing one or more code snippets that do not meet a similarity threshold measure for library functions stored in the system library;
- identifying at least a first validated code snippet from the one or more candidate code snippets that matches a first library function stored in the system memory on the basis of at least first and second matching metrics comprising implementing an input/output matching algorithm for selecting a candidate code snippet which generates the same output as the first library function when both are injected with a shared input;
- and
- presenting to the developer a library function recommendation comprising the first validated code snippet, the first library function, and instructions for replacing the first validated code snippet with the first library function.
Dependencies are inferred from the claim text.