IP Library › Granted Patent US 11,836,469
Granted Patent B2
US 11,836,469 · App. 17/337,602 · Granted Dec 5, 2023

Dynamic code snippet promotion

Inventors: Bo Tong Liu (Beijing, CN); Li Cao (Beijing, CN); Qi Li (Beijing, CN); Jin Sheng Gao (Beijing, CN); Yan Wei Zhao (Beijing, CN); Jun Long Xiang (Beijing, CN)
Assignee: International Business Machines Corporation
G06F8/36G06F16/24578G06F40/40
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 11,836,469
App. No.
17/337,602
Granted
Dec 5, 2023
Kind
B2
Abstract

Aspects include determining a coding intention and a dimension of interest to a user. A plurality of relevant projects that each include a logical code block that meets the coding intention are located. The locating includes searching a plurality of code repositories based at least in part on the coding intention. A score is assigned to each of the plurality of logical code blocks based at least in part on properties associated with the logical code blocks and on the dimension of interest to the user. A logical code block with the highest score is promoted to the user.

Claims (37)

1. A method comprising:

determining, by a processor, a coding intention and a dimension of interest to a user;

locating, by the processor, a plurality of relevant projects that each include a logical code block that meets the coding intention, the locating comprising searching a plurality of code repositories based at least in part on the coding intention;

assigning, by the processor, a score to each of the plurality of logical code blocks based at least in part on properties associated with the logical code blocks and on the dimension of interest to the user; and

promoting to the user, by the processor, a logical code block with a highest assigned score from the plurality of logical code blocks,

wherein the coding intention comprises a plurality of keywords that indicate a function to be performed and a characteristic of a computer environment where the logical code block will be used,

wherein the characteristic of a computer environment where the logical code block will be used includes an operating system of the computer environment and a type of database used in the computer environment.

2. The method of claim 1 , further comprising suggesting an other logical code block included in one of the plurality of relevant projects to the user, the other logical code block not one of the each of the logical code blocks that meets the coding intention.

3. The method of claim 2 , wherein the other logical code block is selected from a group of additional logical code blocks in the plurality of relevant projects that are related to each other and to the coding intention.

4. The method of claim 1 , further comprising receiving user input and project context, wherein the determining the coding intention comprises applying natural language processing (NLP) to the user input and the project context.

5. The method of claim 4 , wherein the determining further comprises modifying the coding intention based on contents of a knowledge tree that was constructed based on contents of at least a subset of the repositories.

6. The method of claim 1 , wherein the dimension of interest is selected from the group consisting of stability, popularity, reusability, security, correlation, and scalability.

7. The method of claim 1 , wherein a plurality of dimensions of interest including the dimension of interest are determined and input to the assigning.

8. The method of claim 1 , wherein at least one of the logical code blocks includes a code block that meets the coding intention and one or more additional code blocks that the code block is dependent on for execution.

9. The method of claim 1 , wherein at least one additional logical code block from the plurality of logical blocks is promoted to the user.

10. A system comprising:

one or more processors for executing computer-readable instructions, the computer-readable instructions controlling the one or more processors to perform operations comprising:

determining a coding intention and a dimension of interest to a user;

locating a plurality of relevant projects that each include a logical code block that meets the coding intention, the locating comprising searching a plurality of code repositories based at least in part on the coding intention;

assigning a score to each of the plurality of logical code blocks based at least in part on properties associated with the logical code blocks and on the dimension of interest to the user; and

promoting to the user a logical code block with a highest assigned score from the plurality of logical code blocks,

wherein the coding intention comprises a plurality of keywords that indicate a function to be performed and a characteristic of a computer environment where the logical code block will be used,

wherein the characteristic of a computer environment where the logical code block will be used includes an operating system of the computer environment and a type of database used in the computer environment.

11. The system of claim 9 , wherein the operations further comprise suggesting an other logical code block included in one of the plurality of relevant projects to the user, the other logical code block not one of the each of the logical code blocks that meets the coding intention.

12. The system of claim 11 , wherein the other logical code block is selected from a group of additional logical code blocks in the plurality of relevant projects that are related to each other and to the coding intention.

13. The system of claim 9 , wherein the operations further comprise receiving user input and project context, wherein the determining the coding intention comprises applying natural language processing (NLP) to the user input and the project context.

14. The system of claim 13 , wherein the determining further comprises modifying the coding intention based on contents of a knowledge tree that was constructed based on contents of at least a subset of the repositories.

15. The system of claim 9 , wherein the dimension of interest is selected from the group consisting of stability, popularity, reusability, security, correlation, and scalability.

16. The system of claim 9 , wherein at least one of the logical code blocks includes a code block that meets the coding intention and one or more additional code blocks that the code block is dependent on for execution.

17. A computer program product comprising a computer-readable storage medium having program instructions embodied therewith, the program instructions executable by one or more processors to cause the one or more processors to perform operations comprising:

determining a coding intention and a dimension of interest to a user;

locating a plurality of relevant projects that each include a logical code block that meets the coding intention, the locating comprising searching a plurality of code repositories based at least in part on the coding intention;

assigning a score to each of the plurality of logical code blocks based at least in part on properties associated with the logical code blocks and on the dimension of interest to the user; and

promoting to the user a logical code block with a highest assigned score from the plurality of logical code blocks,

wherein the coding intention comprises a plurality of keywords that indicate a function to be performed and a characteristic of a computer environment where the logical code block will be used,

wherein the characteristic of a computer environment where the logical code block will be used includes an operating system of the computer environment and a type of database used in the computer environment.

18. The computer program product of claim 17 , wherein the operations further comprise suggesting an other logical code block included in one of the plurality of relevant projects to the user, the other logical code block not one of the each of the logical code blocks that meets the coding intention.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 3, 2021
From: LIU, BO TONG; CAO, LI; LI, QI; GAO, JIN SHENG; ZHAO, YAN WEI; XIANG, JUN LONG
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 056426/0770 →
Continuity (1)
Related Publication 20220391180A1 · Dec 8, 2022