G06F8/72

Methods and apparatus for finding long methods in code
11467829 · 2022-10-11 · ·

A method and apparatus are disclosed for finding overlong source code segments (e.g., methods) by evaluating input source code segments for a plurality of predetermined code metric values in order to identify candidate source code segments (e.g., non-autogenerated methods) which do not meet a first code metric value and to assess each candidate source code segment against a second code metric value to identify different sets of candidate source code segments (e.g., test methods and normal methods) so that each set of candidate source code segments may be assessed against a tailored set of code length thresholds to identify any overlong source code segment having a code length which meets or exceeds at least two of the tailored set of code length thresholds.

Methods and apparatus for finding long methods in code
11467829 · 2022-10-11 · ·

A method and apparatus are disclosed for finding overlong source code segments (e.g., methods) by evaluating input source code segments for a plurality of predetermined code metric values in order to identify candidate source code segments (e.g., non-autogenerated methods) which do not meet a first code metric value and to assess each candidate source code segment against a second code metric value to identify different sets of candidate source code segments (e.g., test methods and normal methods) so that each set of candidate source code segments may be assessed against a tailored set of code length thresholds to identify any overlong source code segment having a code length which meets or exceeds at least two of the tailored set of code length thresholds.

Code refactor renaming recommender

An approach to code refactor renaming may be provided. Source code with a naming convention for functions and classes can be presented to a machine learning model. The model may identify the names for functions and classes. The identified names may be tokenized. Docstrings associated with functions and classes may be identified. Code for the identified functions and classes and associated may be input into a feature vector generation mechanism. A model may be trained mapping the generated feature vectors to tokenized identified names, via regression. The model can be utilized to analyze input code with the same naming convention to predict names for functions and classes, allowing for the recommendation of function and class names in accordance with the programming code naming convention.

Code refactor renaming recommender

An approach to code refactor renaming may be provided. Source code with a naming convention for functions and classes can be presented to a machine learning model. The model may identify the names for functions and classes. The identified names may be tokenized. Docstrings associated with functions and classes may be identified. Code for the identified functions and classes and associated may be input into a feature vector generation mechanism. A model may be trained mapping the generated feature vectors to tokenized identified names, via regression. The model can be utilized to analyze input code with the same naming convention to predict names for functions and classes, allowing for the recommendation of function and class names in accordance with the programming code naming convention.

Blackbox Matching Engine

A method and apparatus are disclosed for enhancing operable functionality of input source code files from a software program by identifying a first code snippet and a first library function which generate similar outputs from a shared input by parsing each and every line of code in a candidate code snippet to generate a templatized code snippet data structure for the first code snippet, and then testing the templatized code snippet data structure against extracted library function information to check for similarity of outputs between the first code snippet and the first library function in response to a shared input so that the developer is presented with a library function recommendation which includes the first code snippet, the first library function, and instructions for replacing the first code snippet with the first library function.

Blackbox Matching Engine

A method and apparatus are disclosed for enhancing operable functionality of input source code files from a software program by identifying a first code snippet and a first library function which generate similar outputs from a shared input by parsing each and every line of code in a candidate code snippet to generate a templatized code snippet data structure for the first code snippet, and then testing the templatized code snippet data structure against extracted library function information to check for similarity of outputs between the first code snippet and the first library function in response to a shared input so that the developer is presented with a library function recommendation which includes the first code snippet, the first library function, and instructions for replacing the first code snippet with the first library function.

Ontology-based software modernization assessment engines

Techniques are described for enabling a software modernization assessment service of a cloud provider network to maintain a modernization knowledge base and to use the knowledge base to generate modernization recommendations for users' software applications. A modernization knowledge base comprises one or more modernization ontologies, where a modernization ontology defines concepts and relationships used to describe modernization tool capabilities and limitations, modernization strategies, etc. The modernization assessment service uses the modernization knowledge base to automate various software modernization processes including, for example, providing modernization recommendations for software applications (e.g., applications identified by users as candidates for modernization) and generating modernization assessment reports. A modernization knowledge base, including an ontology understood by a modernization assessment engine, can be readily updated to account for new modernization strategy information, modernization tool information, and modernization process and tool constraints, without necessitating changes to static definitions of such information defined by a modernization assessment service.

Ontology-based software modernization assessment engines

Techniques are described for enabling a software modernization assessment service of a cloud provider network to maintain a modernization knowledge base and to use the knowledge base to generate modernization recommendations for users' software applications. A modernization knowledge base comprises one or more modernization ontologies, where a modernization ontology defines concepts and relationships used to describe modernization tool capabilities and limitations, modernization strategies, etc. The modernization assessment service uses the modernization knowledge base to automate various software modernization processes including, for example, providing modernization recommendations for software applications (e.g., applications identified by users as candidates for modernization) and generating modernization assessment reports. A modernization knowledge base, including an ontology understood by a modernization assessment engine, can be readily updated to account for new modernization strategy information, modernization tool information, and modernization process and tool constraints, without necessitating changes to static definitions of such information defined by a modernization assessment service.

Automated extraction of isolated nodes during source code refactoring

Disclosed are various embodiments for the extraction of isolated nodes during source code refactoring. A graph model representative of a computing application is generated having nodes and bridges that connect some nodes to other nodes. An application component corresponding to a selected one of the nodes may be extracted from the computing application. An independently deployable component of the computing application may be generated and deployed on a network service such that the independently deployable component is accessible through a network-based call.

Automated extraction of isolated nodes during source code refactoring

Disclosed are various embodiments for the extraction of isolated nodes during source code refactoring. A graph model representative of a computing application is generated having nodes and bridges that connect some nodes to other nodes. An application component corresponding to a selected one of the nodes may be extracted from the computing application. An independently deployable component of the computing application may be generated and deployed on a network service such that the independently deployable component is accessible through a network-based call.