Code suggestion in a software development tool
US-9619211-B2 · Apr 11, 2017 · US
US10235141B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-10235141-B2 |
| Application number | US-201715609379-A |
| Country | US |
| Kind code | B2 |
| Filing date | May 31, 2017 |
| Priority date | Jun 28, 2016 |
| Publication date | Mar 19, 2019 |
| Grant date | Mar 19, 2019 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
Disclosed is a system for providing source code suggestion to a user in real-time. A mining module mines source code information, pre-stored in a source code repository, to create a reference model. A code receiving module receives input lines of code from a user, via a User Interface, in real-time. A mapping module maps the one or more parameters with the metadata corresponding to each source code block stored in the reference model. A code suggestion module identifies one or more target source code blocks from the plurality of source code blocks. The code suggestion module suggests at least one target source code block, of the one or more target source code blocks, to be populated in the input lines of code thereby providing the source code suggestion to a user in real-time.
Opening claim text (preview).
We claim: 1. A method for providing source code suggestion to a user in real-time, the method comprising: mining, by a processor, source code information, pre-stored in a source code repository, to make a system learn in an offline mode; creating, based on the learning, a reference model, wherein the reference model is created upon parsing and analyzing the source code information by using a machine learning technique, and wherein the reference model storing a plurality of source code blocks and metadata corresponds to each of the plurality of source code blocks upon categorizing the plurality of source code blocks into at least one category; receiving, by the processor, input lines of code from a user, via a User Interface, in real-time; determining, by the processor, one or more parameters corresponding to the input lines of code; mapping, by the processor, the one or more parameters with the metadata corresponding to each of the plurality of source code blocks stored in the reference model, wherein the one or more parameters are mapped with the metadata; determine a matching score for each of the plurality of source code blocks mapped with the one or more parameters, and wherein the matching score indicates a similarity between the input lines of code and the plurality of source code blocks; identifying, by the processor, one or more target source code blocks from the plurality of source code blocks, wherein the one or more target source code blocks are identified based on the matching score; and suggesting, by the processor, at least one target source code block, of the one or more target source code blocks, having a highest score; populating in the input lines of code in accordance with the one or more parameters used by the user in the input lines of code the suggested at least one target source code block; providing, based upon the populating, the suggested at least one target source code block to a user in real-time; selecting, by the user, the suggested at least one target source code block and populating, by the processor, the suggested at least one target source code block in the input lines of code of the User Interface. 2. The method of claim 1 , wherein the mining further comprising: parsing, by the processor, the source code information in order to determine the plurality of source code blocks; and analyzing, by the processor, the plurality of source code blocks to create the reference model comprising the metadata corresponding to each source code block, wherein the plurality of source code blocks is analyzed by using a machine learning technique. 3. The method of claim 2 , wherein the plurality of source code blocks comprises namespaces, class, functions, variables, literals, key words. 4. The method of claim 2 , wherein the machine learning technique is one of a classification, clustering, and association rules. 5. The method of claim 1 , wherein the one or more parameters comprise function sequence calls, function definition patterns, naming conventions, function execution sequence, return type, exception handling patterns, callback handling patterns, inheritance patterns, comment, control statements. 6. The method of claim 1 further comprising categorizing, by the processor, the plurality of source code blocks into at least one category comprising declaration, initialization, instantiation, exceptions handled, usage, return type, and call-flow. 7. The method of claim 1 , wherein the score is computed by one or more of a plurality of steps including, tokenizing: a plurality of source code blocks into a set of code elements, and each code element to extract co-occurrence of words; mapping each code element with an offset value in order to identify occurrence and location; classifying each source code block into a plurality of categories; computing co-occurrence of each code element; storing mapping of each word against one or more code elements in a matrix; and computing the score upon determining similarity between the input lines of code and the one or more code elements stored in the matrix, wherein the similarity is determined based on at least one distance computation method. 8. The method of claim 7 , wherein the at least one distance computation method comprises at least one of: a Euclidean Distance, a Squared Euclidean Distance, a Normalized Squared Euclidean Distance, a Manhattan Distance, a Chessboard Distance, Bray Curtis Distance, a Canberra Distance, Cosine Distance, a Correlation Distance, a Binary Distance, or a Time Warping Distance. 9. A system for providing source code suggestion to a user in real-time, the system comprising: a processor; and a memory coupled to the processor, wherein the processor is capable of executing a plurality of modules stored in the memory, and wherein the plurality of modules comprising: a mining module for mining source code information, pre-stored in a source code repository, to make the system learn in an offline mode; a reference model created based on the learning, wherein the reference model is created upon parsing and analyzing the source code information by using a machine learning technique, and wherein the reference model storing a plurality of source code blocks and metadata corresponds to each of the plurality of source code blocks upon categorizing the plurality of source code blocks into at least one category; a code receiving module for receiving input lines of code from a user, via a User Interface, in real-time; a parameter determining module for determining one or more parameters corresponding to the input lines of code; a mapping module for mapping the one or more parameters with the metadata corresponding to each of the plurality of source code blocks stored in the reference model, wherein the one or more parameters are mapped with the metadata; a matching score determined for each of the plurality of source code blocks mapped with the one or more parameters, and wherein the matching score indicates a similarity between the input lines of code and the plurality of source code blocks; and a code suggestion module for: identifying one or more target source code blocks from the plurality of source code blocks, wherein the one or more target source code blocks are identified based on the matching score; suggesting at least one target source code block, of the one or more target source code blocks, having a highest score; populating in the input lines of code in accordance with the one or more parameters used by the user in the input lines of code the suggested at least one target source code block; providing, based upon the populating, the suggested at least one target source code block to a user in real-time; and selecting, by the user, the suggested at least one target source code block and populating, by the processor, the suggested at least one target source code block in the input lines of code of the User Interface. 10. The system of claim 9 , wherein the mining module further: parse the source code information in order to determine the plurality of source code blocks; and analyze the plurality of source code blocks to create the reference model comprising the metadata corresponding to each source code block, wherein the plurality of source code blocks is analyzed by using a machine learning technique. 11. The system of claim 9 , wherein the mining module further categorizes the plurality of source code blocks into at least one category comprising declaration, initialization, instantiation, exceptions handled, usage, return type, and call-flow. 12. The system of claim 9 , wherein the score is computed by one or more of a plurality of steps includin
Related publications grouped by family.
Answers are generated from the same data shown on this page.