Software Refactoring via Runtime and Source Code Modeling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current software modernization and refactoring processes are often inaccurate, resource-intensive, and lack flexibility, making them time-consuming and inefficient, as they fail to effectively leverage architectural diagrams and human-level relations in generating user-friendly suggestions for modifying software applications.

Innovation Solution

A method and system that analyze source code and runtime components, generate a software and hardware model, and create a refactoring model code to produce refactored code, accompanied by a dashboard GUI for interactive modification, enabling automated and human-in-the-loop refactoring processes that preserve functionality while improving design and structure.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If automated refactoring processes are implemented, then productivity is improved, but manufacturing precision deteriorates due to inaccuracy in code transformation

Engineering Contradiction:
Improverefactoring speedVSAvoidcode transformation accuracy
Core Design Contradiction:
ProductivityVSManufacturing precision

Solution Approach 1:

The system incorporates multiple verification mechanisms including static analysis, dynamic analysis, and test execution to continuously verify the accuracy of refactored code. This feedback loop ensures that automated refactoring maintains high precision by detecting and correcting errors before deployment.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent introduces intermediate representation models and abstraction layers between the source code and refactored code. These intermediaries serve as mediators that preserve semantic meaning while enabling automated transformation, thus maintaining accuracy throughout the refactoring process.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Manufacturing precision

If comprehensive code analysis is performed to improve manufacturing precision, then device complexity increases due to multiple analysis components

Engineering Contradiction:
Improverefactoring accuracyVSAvoidsystem structure
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The patent combines static analysis, dynamic analysis, and test execution into an integrated refactoring system. By merging these previously separate processes into a unified workflow, the system reduces overall complexity while maintaining comprehensive code analysis capabilities.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The system employs multi-functional analysis components that can perform multiple types of code analysis simultaneously. This universality reduces the need for separate specialized tools, thereby simplifying the overall system architecture while maintaining high refactoring precision.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Manufacturing precision

If manual refactoring processes are used to maintain manufacturing precision, then loss of time increases due to time-consuming operations

Engineering Contradiction:
Improvecode qualityVSAvoidrefactoring duration
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The system performs preliminary static analysis and generates refactoring proposals before actual code transformation. This preliminary action allows developers to review and approve changes beforehand, ensuring high precision while reducing the time required for manual intervention during the actual refactoring execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The automated refactoring system performs self-verification through built-in test execution and validation mechanisms. This self-service capability reduces the need for extensive manual testing and verification, thereby maintaining code quality while significantly reducing overall refactoring time.

Inventive Principle:
Principle #25Self-service

4Manufacturing precision

If resource-intensive analysis methods are applied to improve manufacturing precision, then use of energy increases due to large computational requirements

Engineering Contradiction:
Improveanalysis accuracyVSAvoidcomputational energy
Core Design Contradiction:
Manufacturing precisionVSUse of energy by moving object

Solution Approach 1:

The system applies analysis at appropriate levels of detail rather than exhaustive analysis throughout. Static analysis is applied to all code, while dynamic analysis is selectively applied to critical paths and high-risk areas. This partial action approach maintains precision where needed while reducing overall computational energy consumption.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11429381B1Software application refactoring and modification
Publication Date: 2022.08.30 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11429381B1 patent drawing
  • US11429381B1 patent drawing
  • US11429381B1 patent drawing

AI summary

A system, method, and computer program product for implementing software modernization and refactoring is provided. The method includes analyzing source code. In response, components and associated interconnections of the source code are identified and a runtime associated with a software application is analyzed. Likewise, components and associated interconnections of the runtime are identified and architectural data is analyzed with respect to the source code and runtime. In response, a software and hardware model associated with operation of the server and software application is generated and the software and hardware model is correlated with results of analyzing the architectural data, source code, and runtime. A dashboard graphical user interface and refactoring model code associated with a modernization and refactoring process configured to generate refactored code are generated and the refactoring model code is executed. In response, refactored code of the software application is generated thereby operationally modifying the software application.