Automated Defect Tagging for Duplicate Code Snippets

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Software development teams face challenges in identifying and addressing duplicate or similar code snippets that may cause future support issues, as existing methods only correct defects in the specific code module where the issue is logged, unaware of their presence in other code modules.

Innovation Solution

An automated system that scans the entire source code or a defined subset after identifying and correcting a defect, identifies and tracks duplicate or similar code snippets, creating service records for each instance found, enabling comprehensive defect tracking and correction across the codebase.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If developers correct defects only in the specific code module where the issue is logged, then the immediate defect is resolved, but duplicate defects may occur in other code modules containing similar code snippets

Engineering Contradiction:
Improvedefect resolution completenessVSAvoidfuture support time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary action by automatically scanning the entire codebase for duplicate or similar code snippets immediately after a defect is corrected. This proactive identification and tagging of potential duplicate defects prevents future support issues before they occur, rather than waiting for the same defect to manifest in other modules.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system establishes a feedback loop where defect correction triggers an automated scan that identifies similar code patterns. The results feed back into the development process by creating service records and notifications, enabling developers to proactively address duplicate issues across the codebase, thus continuously improving defect resolution completeness.

Inventive Principle:
Principle #23Feedback

2Reliability

If developers manually scan the entire codebase to identify duplicate code snippets, then all potential defects can be found, but the process becomes extremely time-consuming and complex

Engineering Contradiction:
Improvedefect identification completenessVSAvoiddefect tracking system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system enables self-service by automatically performing the code scanning, comparison, and duplicate identification tasks that would otherwise require manual developer effort. The automated defect tracking system serves itself by triggering scans upon defect correction and independently identifying similar code patterns across the codebase without human intervention.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system replaces the mechanical manual process of code scanning and comparison with an automated computational system. Instead of developers manually reviewing code, the system uses automated tools to scan, compare code snippets, identify duplicates, and create service records, thereby reducing complexity while maintaining identification completeness.

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

3Device complexity

If no automated scanning is performed after defect correction, then the defect tracking process remains simple, but duplicate code issues persist and cause future support problems

Engineering Contradiction:
Improvedefect tracking process complexityVSAvoidsupport efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The system introduces an intermediary automated scanning mechanism that bridges defect correction and future defect prevention. This intermediary process automatically scans for similar code patterns and creates service records, serving as a mediator between the defect tracking system and potential future defects, thereby improving support efficiency without requiring complex manual processes.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Productivity

If developers focus only on the reported defect without checking for similar code elsewhere, then the immediate task is completed quickly, but the same defect may recur in other modules

Engineering Contradiction:
Improvedefect correction speedVSAvoidlong-term code quality
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system ensures continuity of useful action by automatically extending the defect correction process beyond the immediate issue. Upon correcting a defect, the system continuously scans the codebase for similar patterns and maintains service records for potential duplicates, ensuring that the useful action of defect prevention continues automatically without interrupting the developer's primary correction task.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS9015664B2Automated tagging and tracking of defect codes based on customer problem management record
Publication Date: 2015.04.21 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9015664B2 patent drawing
  • US9015664B2 patent drawing
  • US9015664B2 patent drawing

AI summary

A routine for tagging and tracking source code may be implemented in a software development environment. The routine begins upon the identification of a defect in a software product or system. Once the defect has been identified and rectified, a search of other source code (typically located in a source code management system that supports version control) is specified. Using the search specification, the system automatically identifies the code snippet to be searched and begins searching the identified codebase for duplicates. A ticket or service record is then created for every duplicate/similar code snippet found during the search. The ticket/record enables software defect tracking to be carried out on the newly-located instances of the code. The system also automatically manages the code snippets identified by the duplicate detection.