Software Refactoring Tool Abstract Syntax Tree Code Violations
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
3Productivity
If automated refactoring tools are used, then refactoring speed and consistency are improved, but the ability to handle complex architectural decisions deteriorates
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.
Data Source
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.


