Warning Matching Method for Static Analysis Tools
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional methods for matching warnings in source code before and after modification fail when the warning location is moved, renamed, or cut out, leading to difficulties in identifying matching warnings across different versions of the code.
Innovation Solution
A warning matching program that determines whether pre- and post-modification warning locations are used in the same processing by checking conditions such as method similarity, call relationships, and code structure, allowing for accurate association of warnings across modified code snippets.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If conventional matching methods (same file proximity, same character string, same surrounding character string) are used, then matching is simple and fast, but matching accuracy deteriorates when warning locations are moved, renamed, or cut out
Solution Approach 1:
The patent transitions from matching warnings based on location proximity and character string similarity (spatial dimensions) to matching based on semantic equivalence of processing operations (functional dimension). This allows warnings to be matched even when their physical locations and surrounding code have changed, as long as they represent the same type of processing operation.
Solution Approach 2:
The patent changes the matching parameters from static attributes (file location, character string content, surrounding code) to dynamic functional attributes (processing type, operation semantics). This enables the matching system to adapt to code modifications while maintaining accurate warning correspondence.
2Reliability
If strict matching criteria (same file, same location proximity, same character string) are applied, then false matches are reduced, but legitimate matches are missed when code is modified
Solution Approach 1:
The patent introduces dynamic matching criteria that can adapt to code modifications. Instead of fixed rules based on location and character strings, the system uses flexible semantic analysis of processing operations to determine matching, allowing it to reliably identify corresponding warnings even when code structure changes.
Solution Approach 2:
The patent creates a universal matching mechanism that works across various types of code modifications (movement, renaming, cutting out) by focusing on the fundamental processing operation rather than its specific implementation details. This single approach handles multiple modification scenarios that previously required different matching strategies.
3Ease of manufacture
If three conventional matching approaches are used, then implementation is straightforward, but matching fails when warning locations move or character strings change
Solution Approach 1:
The patent introduces an intermediary layer of semantic analysis that translates diverse code modifications into a common functional representation. This intermediary processing layer enables straightforward implementation while achieving high matching precision, as it abstracts away the specific details of code changes and focuses on the essential processing operations.
Data Source
AI summary
A computer-readable recording medium having stored therein a warning matching program for causing a computer to execute a process including: determining whether or not a pre-modification location where a pre-modification warning is output by a static analysis tool in a pre-modification source code and a post-modification location where a post-modification warning is output by the static analysis tool in a post-modification source code are used in same processing; and associating the pre-modification warning with the post-modification warning based on a result of determining whether or not the pre-modification location and the post-modification location are used in the same processing.


