Code Quality Assessment via Violation Categorization and Weighting
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for assessing software code quality are limited as they do not accurately represent overall quality due to the varying criticality of coding standard violations and lack of comprehensive detection of macroscopic violations, leading to difficulties in interpreting code quality, especially in large projects.
Innovation Solution
The system categorizes coding violation indications based on coding quality attributes using both static and manual analysis, normalizes attribute violation counts, and calculates code quality indices to provide a comprehensive and accurate representation of software code quality.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If automated static analysis tools are used to detect coding violations, then the productivity of code quality assessment is improved, but the measurement precision of code quality is worsened due to inability to detect macroscopic violations and varying criticality of violations
Solution Approach 1:
The patent segments code quality assessment into multiple dimensions by categorizing violations into different types (critical, major, minor) and applying different weighting factors to each type. This segmentation allows the system to process violations systematically while capturing their varying impacts on code quality, thereby maintaining measurement precision while preserving automation efficiency.
Solution Approach 2:
The patent introduces an intermediary processing layer that combines automated static analysis results with manual review findings. This intermediary layer reconciles the outputs of automated tools with human expert judgment, particularly for macroscopic violations that automated tools miss, thereby improving measurement precision without sacrificing the productivity benefits of automation.
2Ease of operation
If simple violation counting is used to assess code quality, then the ease of operation is improved, but the measurement precision is worsened because not all violations are equivalent in impact
Solution Approach 1:
The patent applies local quality by assigning different weighting factors to different types of violations based on their specific impact on code quality. Critical violations receive higher weights while minor violations receive lower weights. This localized differentiation allows the system to maintain operational simplicity while achieving precise code quality measurement that reflects the varying severity of different violation types.
3Productivity
If automated static analysis tools are used, then the productivity is improved, but the detection capability for macroscopic violations is worsened as these tools cannot detect architecture-level issues
Solution Approach 1:
The patent merges automated static analysis with manual review processes into a unified code quality assessment system. The automated tools handle syntactic and coding standard violations efficiently, while manual reviewers focus on macroscopic violations and architectural issues. The system combines both sources of evidence with appropriate weighting, thereby achieving both high productivity and comprehensive detection capability.
4Difficulty of detecting and measuring
If manual inspection is performed to detect macroscopic violations, then the detection capability is improved, but the productivity is worsened due to the time-consuming nature of manual review
Solution Approach 1:
The patent applies partial action by having manual reviewers focus only on specific aspects of code quality (macroscopic violations and architectural issues) rather than performing comprehensive manual inspection of all code. The automated tools handle the bulk of routine violation detection, allowing manual reviewers to concentrate their efforts where they add the most value, thereby maintaining productivity while improving detection capability for critical issues.
Data Source
AI summary
A plurality of coding violation indications corresponding to software code are categorized according to a plurality of coding quality attributes. The coding violation indications may be reported via static analysis tools or via manual analysis of the software code. The categorized coding violations serve as the basis for determining a plurality of code quality indices each corresponding to a respective one of the plurality of coding quality attributes. In an embodiment, the plurality of code quality indices may be further processed to determine an overall code quality index for the software code. One or more of the resulting code quality indices may be displayed to a user. In this manner, code quality indices may be provided that are directly based on coding violations reported through static analysis.


