Source Code Quality Analysis via Comment Similarity Filtering
Find Innovative SolutionsGenerate 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
Engineering 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
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
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
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
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
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
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
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
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
Data Source
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.


