Method and system for providing source code suggestion to a user in real-time

US10235141B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10235141-B2
Application numberUS-201715609379-A
CountryUS
Kind codeB2
Filing dateMay 31, 2017
Priority dateJun 28, 2016
Publication dateMar 19, 2019
Grant dateMar 19, 2019

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

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.

First claim

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

Assignees

Inventors

Classifications

  • Software design · CPC title

  • G06F8/36Primary

    Software reuse · CPC title

  • model driven · CPC title

  • Version control (security arrangements therefor G06F21/57); Configuration management · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10235141B2 cover?
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 …
Who is the assignee on this patent?
Hcl Technologies Ltd, Hcl Technologies Ltd
What technology area does this patent fall under?
Primary CPC classification G06F8/36. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Mar 19 2019 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 4 related publications on this page (citations in our corpus or others sharing the same primary CPC).