Source Code Pattern Extraction and Visualization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods struggle to comprehensively extract and visualize coding patterns, especially those appearing at low frequencies, making it difficult to understand and establish rules for source codes.
Innovation Solution
A pattern extraction visualization device and method that includes a syntax analysis unit for classifying source codes, a preprocessing unit for abstracting patterns, an alignment derivation unit for generating alignments, and a visualization unit for displaying these alignments in a user-friendly format.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If sequential pattern mining technique is used to extract coding patterns, then coding patterns frequently appearing in source codes can be extracted, but coding patterns appearing at low frequencies cannot be extracted
Solution Approach 1:
The patent segments the source code into multiple abstraction levels (e.g., class level, method level, line level) and extracts patterns at each level separately. This allows low-frequency patterns to be captured at finer granularities while maintaining extraction efficiency through hierarchical processing
Solution Approach 2:
The patent changes the extraction parameters dynamically based on frequency thresholds and abstraction levels. By adjusting minimum frequency thresholds and pattern matching criteria at different abstraction levels, the system can extract both high-frequency and low-frequency patterns effectively
2Measurement precision
If manual analysis of all API adapters is performed, then comprehensive understanding of source code configuration is achieved, but a lot of labor is required
Solution Approach 1:
The system performs automatic pattern extraction and visualization without requiring manual analysis. The automated pipeline includes syntax analysis, pattern extraction, alignment generation, and visualization components that work autonomously to provide comprehensive source code understanding
Solution Approach 2:
The patent creates visual representations and abstracted copies of source code patterns that preserve essential structural information. These visual copies enable comprehensive understanding without requiring direct manual examination of the original source code
3Ease of operation
If source codes are abstracted to extract common patterns, then coding patterns can be visualized and recognized easily, but the complexity of the extraction and visualization process increases
Solution Approach 1:
The patent divides the complex extraction and visualization process into separate modular components: syntax analysis unit, pattern extraction unit, alignment generation unit, and visualization unit. Each component handles a specific task independently, making the overall system more manageable and easier to implement
Solution Approach 2:
The patent introduces alignment data as an intermediary representation between the abstracted patterns and the final visualization. This alignment information serves as a bridge that connects the abstract pattern representations with their visual displays, simplifying the overall processing architecture
Data Source
AI summary
A syntax analysis unit (12) that analyzes a plurality of source codes and classifies them into a plurality of patterns, a preprocessing unit (13) that abstracts each of the patterns classified by the syntax analysis unit (12), and an alignment derivation unit (15) that derives an alignment between the source codes for each of the abstracted patterns included in each of the source codes are included. Further, a visualization unit (16) that generates an image indicating the alignment in a predetermined format, and a display unit (17) that displays the image indicating the alignment are included.


