Automated Source Code Alarm Classification via AST Clustering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Manual classification of alarm types in static analyzers for source code errors is resource-intensive and prone to false alarms, as static analyzers may incorrectly determine errors, leading to unnecessary resource allocation for classification processes.

Innovation Solution

An automated method for classifying error detection alarms using an alarm type classifying apparatus that converts source code into an abstract syntax tree, removes unnecessary sub-trees, generates feature vectors based on preset patterns, and clusters alarms using the K-means algorithm to identify and categorize error detection alarms.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If manual classification of alarm types is performed by developers, then alarm type classification can be done with simple tools, but resource consumption increases and time is wasted

Engineering Contradiction:
Improvesimplicity of classification processVSAvoidresource consumption and time efficiency
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The system performs automatic alarm type classification without requiring developer intervention. The alarm type classifying apparatus autonomously receives alarm information, converts it to AST, extracts features, and classifies alarms using clustering algorithms, making the system self-sufficient in the classification task.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The manual mechanical classification process by developers is replaced with an automated computational system. The apparatus uses computer-based technologies including AST conversion, feature extraction, and clustering algorithms to substitute human manual classification work.

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

2Reliability

If static analyzers perform comprehensive error detection, then detection coverage is improved, but false alarms increase leading to resource waste

Engineering Contradiction:
Improveerror detection coverageVSAvoidfalse alarm rate
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The system provides feedback by classifying alarms into types including false alarms, and enabling additional analysis for specific alarm types. This feedback mechanism helps identify and respond to false alarms, allowing the static analyzer to improve its detection accuracy over time.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system changes the parameter of alarm analysis by introducing alarm type classification. By categorizing alarms into different types based on extracted features and clustering, the system transforms raw alarm data into structured information that can be selectively analyzed, reducing the impact of false alarms.

Inventive Principle:
Principle #35Parameter changes

3Measurement precision

If alarm type classification is performed for all alarms, then analysis accuracy is improved, but resource consumption increases

Engineering Contradiction:
Improvealarm analysis accuracyVSAvoidresource consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

Instead of performing comprehensive additional analysis on all alarms, the system applies partial action by classifying alarms into types and enabling additional analysis only for specific alarm types that benefit from it. This selective approach maintains necessary analysis accuracy while conserving resources.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system applies different levels of analysis to different alarm types based on their characteristics. By extracting specific features and applying clustering algorithms locally to relevant alarm categories, the system optimizes resource allocation by focusing computational effort where it is most needed rather than uniformly processing all alarms.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10394687B2Method for classifying alarm types in detecting source code error and nontransitory computer readable recording medium therefor
Publication Date: 2019.08.27 SPARROW CO LTD
  • US10394687B2 patent drawing

AI summary

The present invention relates to a method for classifying alarm types in detecting source code errors, a computer program therefor, and a recording medium thereof. The method for classifying alarm types in detecting source code errors includes: receiving input of alarm path information about an occurring error detection alarm and source code information that is an object associated with the occurring alarm, the alarm path information being information about an execution path related to the error detection; converting the source code into an abstract syntax tree (AST); removing, from the AST, an unnecessary sub-tree that is not related to the error detection alarm; obtaining a feature vector of the AST having the unnecessary sub-tree removed therefrom based on a preset feature pattern set; and classifying, by types, the error detection alarm associated with the feature vector by clustering the obtained feature vector using a preset method.