Automated Code Analysis System for Violation Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Debugging and identifying code principle violations in software development is a time-consuming and tedious task, consuming over fifty percent of software development time and costs, due to poor coding practices and the limitations of existing code analysis tools which are often confined to specific developers or code editors.
Innovation Solution
An automated or semi-automated code analysis system that detects and corrects code principle violations by applying tests to source code, providing classification and reporting features, and allowing dynamic analysis during code writing or editing, with options to exclude automatically generated code and offer real-time feedback and correction.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If automated code analysis is implemented, then debugging time and costs are reduced, but system complexity increases
Solution Approach 1:
The code analysis system is segmented into distinct modular components including a code retrieval module, test execution module, violation detection module, and reporting module. Each module performs a specific function in the code analysis pipeline, making the overall system more manageable and maintainable while achieving automated debugging assistance
Solution Approach 2:
The patent introduces an intermediary code analysis system that acts as a mediator between the source code and the developer. This intermediary automatically retrieves code, executes tests, detects violations, and provides reports, thereby reducing the direct time investment required by developers for debugging while managing system complexity through automation
2Reliability
If comprehensive code principle tests are applied, then code quality improves, but analysis time increases
Solution Approach 1:
The system allows for selective application of code principle tests based on project needs, code criticality, and risk assessment. Not all tests are applied uniformly to all code - instead, tests are selected and applied partially based on specific requirements, achieving adequate code quality without the overhead of exhaustive analysis on every code segment
Solution Approach 2:
Code principle violations are detected and reported in advance before they become critical issues. The system performs preliminary analysis during code development phases, allowing developers to correct violations early when they are easier and faster to fix, thereby improving code quality without requiring extensive rework later
3Ease of operation
If real-time code analysis is implemented, then immediate feedback is provided, but processing overhead increases
Solution Approach 1:
Instead of continuously analyzing every keystroke or code change in real-time, the system employs periodic analysis at appropriate intervals such as when code is saved, when a development phase is completed, or when triggered by specific events. This periodic approach provides timely feedback while avoiding the excessive processing overhead of truly continuous real-time analysis
Data Source
AI summary
Techniques and solutions are described for automatically analyzing code for code principle violations. A code analysis can be configured that includes one or more tests for one or more code principle violations. The code analysis can be applied statically, against previously generated code, or can be conducted in a dynamic manner as code is being written or edited. Code, such as automatically generated code, can be excluded from analysis, or reports of analysis results. When a code principle violation is detected, the violation can be displayed to a user. Information regarding correcting the violation can be displayed. In some cases, a code principle violation can be automatically corrected. Code violations can be classified, such as by severity, and can be associated with particular code, such as code packages or objects, or particular developers or development groups. Reports can be prepared summarizing changes in code principle violations over time.


