Source Code Pattern Extraction and Visualization

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvecoding pattern extraction efficiencyVSAvoidcompleteness of coding pattern extraction
Core Design Contradiction:
ProductivityVSMeasurement precision

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

Inventive Principle:
Principle #1Segmentation

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

Inventive Principle:
Principle #35Parameter changes

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

Engineering Contradiction:
Improvecomprehensive understanding of source codeVSAvoidtime required for analysis
Core Design Contradiction:
Measurement precisionVSLoss of time

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

Inventive Principle:
Principle #25Self-service

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

Inventive Principle:
Principle #26Copying

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

Engineering Contradiction:
Improveease of pattern recognitionVSAvoidcomplexity of extraction and visualization process
Core Design Contradiction:
Ease of operationVSDevice complexity

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

Inventive Principle:
Principle #1Segmentation

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

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20240338212A1Pattern extraction visualization device, pattern extraction visualization method, pattern extraction visualization program
Publication Date: 2024.10.10 NIPPON TELEGRAPH & TELEPHONE CORP
  • US20240338212A1 patent drawing
  • US20240338212A1 patent drawing
  • US20240338212A1 patent drawing

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.