IP Library › Granted Patent US 9,383,973
Granted Patent B2
US 9,383,973 · App. 13/171,846 · Granted Jul 5, 2016

Code suggestions

Inventors: Nicolas Villar (Cambridge, GB); James Scott (Cambridge, GB); Stephen Hodges (Cambridge, GB); Albrecht Schmidt (Satteldorf, DE)
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
G06F8/33
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,383,973
App. No.
13/171,846
Granted
Jul 5, 2016
Kind
B2
Abstract

Code suggestion technique embodiments are presented that improve the productivity of a programmer by assisting in both the writing of code and in debugging the code as it is being written. In general, this is accomplished by automating a search of a database of the past work and problem solving activities of programmers to make suggestion to a programmer currently writing code. For example, as a programmer enters code, suggested ways of finishing a line or code section are presented based on how previous programmers finished a similar line or code section. Another example involves a programmer who encounters an error message while writing code. In such a case, the programmer is provided with a suggested fix or fixes, based on the actions taken by previous developers when encountering a similar problem.

Claims (26)

1. A computer-implemented process for creating a database of code suggestions for use in suggesting one or more lines of program code to a programmer as the programmer is writing program code, comprising:

using a computer to perform the following process actions:

obtaining previously written lines of code;

identifying sections of one or more lines of code within the previously written lines of code that correspond to a prescribed code structure, or which were created or modified within a prescribed time period, or both; and then

designating each of the identified sections of code as a potential code suggestion; and then

creating a database of code suggestions comprising a plurality of the identified sections of code which were designated as potential code suggestions.

2. The process of claim 1 , further comprising a process action of, for each designated potential code suggestion, associating one or more prescribed attributes which characterize the potential code suggestion.

3. The process of claim 2 , wherein the process action of associating one or more prescribed attributes, comprises an action of associating at least one of a code category which indicates which of a group of prescribed types of code the potential code suggestion belongs to, or an identity of a software program used to generate the code of the potential code suggestion, or a version identifier of a software code library used in generating the code of the potential code suggestion, or an identity of the person who generated the code of the potential code suggestion, or information related to a software program or project associated with the potential code suggestion, or a date or time or both that the code of the potential code suggestion was generated.

4. The process of claim 2 , wherein whenever a code suggestion is suggested to a programmer it is recorded whether that programmer employed the suggested code, and wherein the process action of associating one or more prescribed attributes, comprises an action of associating a use indication whenever the potential code suggestion was employed by a programmer to which it was suggested.

5. The process of claim 2 , further comprising a process action of identifying potential code suggestions that are the same or substantively similar to a prescribed degree, and wherein the process action of associating one or more prescribed attributes, comprises an action of associating a frequency indication indicative of how many potential code suggestions have been identified as being the same as, or substantively similar to a prescribed degree to, a potential code suggestion under consideration.

6. The process of claim 1 , wherein the process action of obtaining previously written lines of code, comprises an action of, for each of a group of one or more programmers, recording each line of code written by the programmer during a programming session.

7. The process of claim 1 , wherein the process action of obtaining previously written lines of code, comprises an action of, accessing a repository of code previously written by a group of one or more programmers.

8. The process of claim 1 , wherein the process action of identifying sections of one or more lines of code within the previously written lines of code that correspond to a prescribed code structure, or which were created or modified within a prescribed time period, or both, comprises the actions of:

identifying a section of one or more lines of code that resulted in an issuance of an error message indicating a problem with the code section; and

identifying a section of one or more lines of code which were created or modified after the issuance of the error message and which resulted in the removal of the error that caused the error message to be issued.

9. The process of claim 8 , wherein the process action of designating the identified sections of code as a potential code suggestions, comprises an action of designating the identified section of one or more lines of code that resulted in an issuance of an error message, the error code message issued, and the identified section of one or more lines of code which were created or modified after the issuance of the error message and which resulted in the removal of the error that caused the error message, to be issued as a potential code suggestion.

10. A computer-implemented process for providing an error correction code suggestion comprising one or more lines of program code to a programmer as the programmer is writing program code, comprising:

using a computer to perform the following process actions:

detecting whether an error message has been issued as the programmer is writing program code; and

whenever an error message is detected,

searching one or more code suggestion databases for one or more error correction code suggestions pertinent to the detected error message, each of said code suggestion databases comprising error correction code suggestions each of which comprises a section of one or more lines of code that resulted in an issuance of an error message, the error code message issued, and a section of one or more lines of code which were created or modified after the issuance of the error message and which resulted in the removal of the error that caused the error message to be issued, and wherein an error correction code suggestion is pertinent to the detected error message if it at least comprises an error message that is the same as, or substantively similar to a prescribed degree to, the detected error message, and

presenting at least one error correction code suggestion found to be pertinent to the detected error message that were found in the search of said one or more code suggestion databases to the programmer.

11. The process of claim 10 , wherein said error correction code suggestions each further comprise a ranking which was established based on one or more attributes associated with the error correction code suggestion which characterize the likelihood that the error correction code suggestion will resolve a coding error associated with a detected error message, and wherein the process action of presenting at least one error correction code suggestion found to be pertinent to the detected error message, comprises presenting along with each error correction code suggestion, the ranking associated with that suggestion.

12. The process of claim 10 , wherein the process action of searching one or more code suggestion databases for one or more error correction code suggestions pertinent to the detected error message, comprises a process action of searching at least one of only the database or databases specified by the programmer, or only the database or databases that the programmer is authorized to access.

13. The process of claim 10 , wherein an error correction code suggestion is pertinent to the detected error message if it comprises one or more attributes which match attributes associated with the program code the programmer was writing when the error message was issued.

14. The process of claim 13 , wherein the one or more attributes which match attributes associated with the program code the programmer was writing when the error message was issued comprises at least one of a code category which indicates which of a group of prescribed types of code the error correction code suggestion belongs to, or an identity of a software program used to generate the code of the error correction code suggestion, or a version identifier of a software code library used in generating the code of the error correction code suggestion, or information related to a software program or project associated with the error correction code suggestion.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034544/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 6, 2011
From: VILLAR, NICOLAS; SCOTT, JAMES; HODGES, STEPHEN; SCHMIDT, ALBRECHT
To: MICROSOFT CORPORATION
Reel/Frame 026545/0980 →
Continuity (1)
Related Publication 20130007700A1 · Jan 3, 2013