Code Line Identification via Forum Keyword Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Software development tools face inefficiencies in identifying and generating patches for errors in code snippets, as they often include unrelated lines that can lead to less effective patches and increased complexity.

Innovation Solution

A system that uses natural language processing to identify keywords in answer posts from developer forums, marking relevant lines of code related to errors in buggy snippets, and pruning out unrelated lines to generate more effective software repairs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If software development tools analyze entire code snippets from discussion forums to generate patches, then they can identify potential error corrections, but they include unrelated lines of code that reduce patch effectiveness and increase complexity

Engineering Contradiction:
Improvepatch effectivenessVSAvoidcode snippet complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system segments the code snippet into individual lines and evaluates each line's relevance to the error independently. This is achieved by analyzing semantic relationships between each line and the error description, allowing the system to identify and exclude unrelated lines, thereby reducing complexity while maintaining patch effectiveness.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system extracts and removes unrelated lines of code from the snippet before generating the patch. By filtering out lines that do not contribute to error correction, the system produces a more focused and effective patch with reduced complexity, directly addressing the contradiction between reliability and device complexity.

Inventive Principle:
Principle #2Taking out (Extraction)

2Loss of information

If software development tools include all lines of code from forum posts in generated patches, then they preserve complete context, but they include unrelated lines that reduce efficiency and effectiveness

Engineering Contradiction:
Improvecontext informationVSAvoidpatch generation efficiency
Core Design Contradiction:
Loss of informationVSProductivity

Solution Approach 1:

The system applies partial action by including only the necessary subset of lines required for error correction rather than all lines from the forum post. By selectively including only relevant lines that contribute to fixing the error, the system maintains sufficient context information while significantly improving patch generation efficiency by eliminating extraneous code.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system extracts and removes unrelated lines of code from the forum post before generating the patch. This extraction process preserves the essential context needed for error correction while eliminating redundant information, thereby improving productivity without causing loss of critical information.

Inventive Principle:
Principle #2Taking out (Extraction)

3Measurement precision

If natural language processing is used to identify keywords in answer posts, then relevant error lines can be marked accurately, but processing time and computational resources increase

Engineering Contradiction:
Improveerror line identification accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs preliminary action by pre-processing and indexing keywords from answer posts before they are needed for error identification. This preliminary keyword extraction and storage allows for faster matching and identification of relevant error lines during actual analysis, thereby maintaining high identification accuracy while reducing processing time when patches are generated.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11366742B2Automated identification of lines of code related to errors field
Publication Date: 2022.06.21 FUJITSU LTD
  • US11366742B2 patent drawing
  • US11366742B2 patent drawing
  • US11366742B2 patent drawing

AI summary

Operations may include obtaining a buggy code snippet from a question included in a post of a discussion forum, the buggy code snippet including an error and a plurality of lines of code. The operations may further include obtaining text from an answer to the question and identifying keywords from the text. In addition, the operations may include marking a particular line from the plurality of lines as being related to the error based on one or more of the keywords corresponding to one or more elements of the particular line. Moreover, the operations may include performing one or more software program repair operations based on the marking of the particular line.