Multi-Level Code Classification for Reliable Quality Indicators

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing code classification methods fail to accurately and reliably identify portions of code that require the most development or maintenance efforts, particularly in large and dynamically changing code bases, leading to inefficient resource allocation and potential oversight of critical improvement areas.

Innovation Solution

A computer-implemented method for code classification that evaluates code structure characteristics on multiple levels, determines violations of level-specific conditions, and generates a weighted code quality indicator by combining these violations to guide development and maintenance efforts.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing code classification methods are used, then code quality can be assessed, but the identification of code portions needing development/maintenance efforts is inaccurate and unreliable

Engineering Contradiction:
Improvecode quality measurement accuracyVSAvoidreliability of code portion identification
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The patent segments code quality evaluation into multiple independent code structure levels (e.g., file level, function level, method level, class level). Each level has specific conditions that are evaluated separately, and violations are aggregated to produce the final code quality indicator. This segmentation allows for more precise and reliable identification of code portions needing improvement by considering context at different hierarchical levels.

Inventive Principle:
Principle #1Segmentation

2Quantity of substance

If code analysis is performed on large and dynamically changing code bases, then comprehensive code quality assessment is possible, but the process becomes cumbersome and time-consuming

Engineering Contradiction:
Improvecode base sizeVSAvoidcode analysis time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The patent performs preliminary parsing of the source code to obtain code structure characteristics before evaluation. By pre-processing the code base to extract and store structural information (such as nesting depth, number of execution paths, lines of code), the system can quickly assess code quality without re-analyzing the entire code base from scratch, thus reducing time consumption for large and dynamically changing code bases.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If existing code evaluation approaches are used, then code quality can be measured, but development/maintenance efforts are not efficiently concentrated on the most needed portions

Engineering Contradiction:
Improvedevelopment/maintenance efficiencyVSAvoidease of identifying priority areas
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The patent generates a code quality indicator that provides feedback about the current state of code portions. By evaluating code structure characteristics against predefined conditions and calculating violation weights, the system produces actionable feedback that guides developers and maintainers to prioritize specific code portions. This feedback mechanism enables efficient concentration of development/maintenance efforts on areas with the highest quality indicators.

Inventive Principle:
Principle #23Feedback

Data Source

PatentEP4469890B1An approach for classifying source code with a code quality indicator
Publication Date: 2026.01.14 CODESCENE AB
  • EP4469890B1 patent drawingFigure 1~2
  • EP4469890B1 patent drawingFigure 3~5

AI summary

A computer-implemented method for code classification is disclosed. The method comprises parsing source code stored on a code carrier to obtain a plurality of code structure characteristics of the source code, and evaluating the code structure characteristics on at least three code structure levels. In some embodiments, the at least three code structure levels comprise one or more of: a global level, a module level, an intermodule level, a function level, an inter-function level, and an implementation level. The evaluation on each code structure level comprises, for each of one or more level-specific conditions, determining whether the code structure characteristics violate the level-specific condition, and (when the level-specific condition is violated) representing the violation by a weighted value. The method also comprises combining the weighted values for at least some of the violated level- specific conditions over the at least three code structure levels to generate one or more code quality indicator for the source code. Corresponding computer program product, apparatus, and system are also disclosed.