Cognitive redundant coding corpus determination system
AssigneeInternational Business Machines Corporation
InventorsKelley Anders, Lisa Seacat DeLuca, Jeremy R. Fox, Rick A. Hamilton, II
Life of this patent
Estimating the term…
Abstract
A system dynamically assesses computer code as it is constructed to determine if there is better wording for the code, a more efficient way of writing that code, or preferred code or programming language based on a set of predetermined factors and then proposes the best resource for obtaining that piece of code. The predetermined factors may include, but are not limited to an enterprise's policy, and business rules.
Claims14
A method for analyzing code in a programming language, the code being entered by a user into a computer for an enterprise, comprising the steps of:
- a) the computer receiving the code from the user;
- b) after the code entered by the user and received by the computer includes a call to a third party library, the computer providing the code to a search engine to execute a search of the code received from the user within at least one repository of enterprise-specific code;
- c) the computer receiving at least one result from the search engine, the at least one result comprising at least one enterprise-specific computer code segment;
- d) the computer comparing the programming language used in the at least one result of enterprise-specific code to the programming language of the code entered by the user to determine if there is a match;
- e) if the computer determines that there is a match, the computer displaying a suggested new enterprise-specific code segment to the user from the at least one search result based on a classification and regression decision tree (CART) and relative usage rates among the enterprise's programmers of the code received from the user as compared to the enterprise-specific code;
- f) the computer receiving a response from the user to accept or reject the new enterprise-specific code segment suggested in step (e);
- and
- g) if the computer receives a response from the user to accept the new enterprise-specific code segment, the computer replacing the code received from the user with the new enterprise-specific code segment.
A computer system for analyzing code in a programming language, the code being entered by a user into a computer for an enterprise comprising a computer comprising at least one processor, one or more memories, one or more computer readable storage media having program instructions executable by the computer to perform the program instructions comprising:
- a) receiving, by the computer, the code from the user;
- b) providing, by the computer, the code to a search engine to execute a search of the code received from the user within at least one repository of enterprise-specific code after the code being entered by the user and received by the computer includes a call to a third party library;
- c) receiving, by the computer, at least one result from the search engine, the at least one result comprising at least one enterprise-specific computer code segment;
- d) comparing, by the computer, the programming language used in the at least one result of enterprise-specific code to the programming language of the code entered by the user to determine if there is a match;
- e) if the computer determines that there is a match, displaying, by the computer, a suggested new enterprise-specific code segment to the user from the at least one search result based on a classification and regression decision tree (CART) and relative usage rates among the enterprise's programmers of the code received from the user as compared to the enterprise-specific code;
- f) receiving, by the computer, a response from the user to accept or reject the new enterprise-specific code segment suggested in step (e);
- and
- g) if the computer receives a response from the user to accept the new enterprise-specific code segment, replacing, by the computer, the code received from the user with the new enterprise-specific code segment.
Dependencies are inferred from the claim text.