Automated Code Analysis System for Violation Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering Contradiction Analysis

1Loss of time

If automated code analysis is implemented, then debugging time and costs are reduced, but system complexity increases

Engineering Contradiction:
Improvedebugging timeVSAvoidcode analysis system complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

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

Inventive Principle:
Principle #1Segmentation

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

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If comprehensive code principle tests are applied, then code quality improves, but analysis time increases

Engineering Contradiction:
Improvecode qualityVSAvoidanalysis time
Core Design Contradiction:
ReliabilityVSLoss of time

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

Inventive Principle:
Principle #16Partial or excessive action

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

Inventive Principle:
Principle #10Preliminary action

3Ease of operation

If real-time code analysis is implemented, then immediate feedback is provided, but processing overhead increases

Engineering Contradiction:
Improvereal-time feedbackVSAvoidprocessing overhead
Core Design Contradiction:
Ease of operationVSUse of energy by moving object

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

Inventive Principle:
Principle #19Periodic action

Data Source

PatentUS10853231B2Detection and correction of coding errors in software development
Publication Date: 2020.12.01 SAP SE
  • US10853231B2 patent drawing
  • US10853231B2 patent drawing
  • US10853231B2 patent drawing

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.