Source Code Quality Analysis via Comment Similarity Filtering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In large-scale software development, identifying incomplete program statements in source code is inefficient and prone to variability due to manual analysis, which can lead to different interpretations based on user skill levels.

Innovation Solution

A computer-implemented method that extracts candidate comments from source code by excluding specific comments based on similarity analysis between adjacent code fragments, using a classification model to determine incompletion indicators, and outputs an evaluation of source code incompleteness.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If manual analysis is used to identify incomplete program statements, then flexibility in interpretation is maintained, but efficiency and consistency deteriorate due to variability based on user skill levels

Engineering Contradiction:
ImproveFlexibility in interpretationVSAvoidEfficiency of identification
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent replaces manual mechanical analysis with an automated computer-implemented system that uses classification models and similarity analysis to identify incomplete program statements, thereby improving efficiency while maintaining consistent interpretation through standardized algorithms

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The system enables self-service quality analysis by automatically extracting comments, analyzing similarity between code fragments, and generating evaluations of incompletion without requiring manual intervention, thus improving productivity while maintaining operational flexibility through configurable parameters

Inventive Principle:
Principle #25Self-service

2Adaptability or versatility

If manual analysis is used to identify incomplete program statements, then adaptability to different contexts is maintained, but consistency and reliability deteriorate due to different interpretations based on user skill levels

Engineering Contradiction:
ImproveAdaptability to different contextsVSAvoidConsistency of identification
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent changes the parameter of analysis from human judgment to automated classification model output, using similarity metrics and predetermined thresholds to consistently identify incomplete statements across different contexts while maintaining adaptability through configurable analysis parameters

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent introduces a classification model as an intermediary between the source code and the quality evaluation, which standardizes the interpretation process by mediating between raw code comments and final incompletion assessments, thereby improving consistency while maintaining contextual adaptability

Inventive Principle:
Principle #24Intermediary (Mediator)

3Quantity of substance

If all comments are analyzed without exclusion, then comprehensive coverage is achieved, but accuracy deteriorates due to inclusion of redundant or non-informative comments

Engineering Contradiction:
ImproveCoverage of commentsVSAvoidAccuracy of incompletion identification
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The patent extracts and excludes specific comments that are determined to be redundant or non-informative through similarity analysis with adjacent code fragments, thereby improving the accuracy of incompletion identification by focusing only on meaningful comments while maintaining comprehensive coverage of relevant code sections

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial analysis by selectively excluding certain comments from the analysis process based on predetermined criteria and similarity thresholds, rather than analyzing all comments uniformly, which improves precision by concentrating computational resources on the most informative portions of the code

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11269626B2Quality analysis of source code
Publication Date: 2022.03.08 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11269626B2 patent drawing
  • US11269626B2 patent drawing
  • US11269626B2 patent drawing

AI summary

Systems and methods for quality analysis of a source code are disclosed. The method includes obtaining plural comments included in the source code. Each of the plural comments includes at least one of plural predetermined words. Also the method extracts plural candidate comments which are comments obtained by excluding plural specific comments from the obtained plural comments. Each of the plural specific comments can be identified using a similarity between a source code fragment relating to any of the obtained plural comments and an adjacent source code fragment adjacent to the source code fragment. In addition, the method outputs an evaluation about incompletion of the source code. The evaluation is determined using the plural candidate comments.