Software Refactoring Tool Abstract Syntax Tree Code Violations

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Legacy software often contains code violations and architectural issues that hinder readability, efficiency, and migration to newer architectures, posing challenges for developers due to the lack of skilled experts and the need for manual refactoring, which is resource-intensive and prone to missing issues.

Innovation Solution

A software refactoring tool that analyzes source code using an abstract syntax tree to identify code violations and generate refactoring options, allowing developers to automatically or manually correct these issues, facilitating migration to service-oriented architectures and integrating with development tools like Microsoft Visual Studio.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If manual refactoring is performed by skilled developers, then code quality and readability are improved, but resource consumption and time requirements increase significantly

Engineering Contradiction:
Improvecode qualityVSAvoidrefactoring efficiency
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The refactoring system performs self-service by automatically analyzing source code, identifying code violations, and generating refactoring options without requiring manual intervention from developers. The system serves itself in detecting and proposing fixes for code smells, thereby improving refactoring efficiency while maintaining code quality standards.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the mechanical manual process of code review and refactoring with an automated computational system. Instead of developers manually examining and rewriting code, the system uses abstract syntax tree analysis and rule-based detection to automatically identify issues and generate refactoring proposals, substituting human mechanical effort with automated processing.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Manufacturing precision

If comprehensive code analysis is performed to identify all code violations, then code quality is improved, but system complexity and processing time increase

Engineering Contradiction:
Improvecode violation detection accuracyVSAvoidanalysis system complexity
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The code analysis system is segmented into distinct functional modules: abstract syntax tree generation, code violation detection, refactoring option generation, and solution application. Each module handles a specific aspect of the refactoring process, making the overall complex system manageable and maintainable while achieving comprehensive code analysis through coordinated operation of these specialized components.

Inventive Principle:
Principle #1Segmentation

3Productivity

If automated refactoring tools are used, then refactoring speed and consistency are improved, but the ability to handle complex architectural decisions deteriorates

Engineering Contradiction:
Improverefactoring speedVSAvoidarchitectural decision handling
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The system incorporates feedback mechanisms where refactoring options are generated and presented to developers for review. The system can learn from developer selections and adjustments, adapting its refactoring strategies based on feedback about what changes are appropriate for specific codebases and architectural contexts, thereby improving both speed and architectural decision handling over time.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10853060B2Software refactoring systems and methods
Publication Date: 2020.12.01 ARCHITECTURE TECH CORP
  • US10853060B2 patent drawing
  • US10853060B2 patent drawing
  • US10853060B2 patent drawing

AI summary

A computer-implemented method includes creating, by a computing device, an abstract syntax tree based on a source code file of a software application, the source code file including source code defining operations of the software application. The method also includes traversing, by the computing device, the abstract syntax tree. The method further includes identifying, by the computing device and based on the traversing of the abstract syntax tree, one or more code violations present in the source code. The method also includes generating, by the computing device, at least one refactoring option for the one or more code violations, each refactoring option of the at least one refactoring option representing a change to the source code file that is configured to remediate the associated code violation.