Code Review Using Quantitative Linguistics for Error Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Automated code review tools often fail to detect errors beyond explicit programmatic and syntax errors, especially in large and complex software projects, due to inefficiencies in manual code reviews and limitations in existing automated systems.

Innovation Solution

The use of Quantitative Linguistics (QL) in conjunction with Hapax Legomenon and Zipf's Law to identify potentially problematic portions of source code by comparing received code to repositories, annotating rare code, and transmitting it to a testing platform for further evaluation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional automated code review tools are used, then explicit programmatic and syntax errors can be detected, but errors beyond these categories cannot be detected

Engineering Contradiction:
Improveerror detection accuracyVSAvoiddetection capability scope
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The patent introduces Quantitative Linguistics as an intermediary methodology to bridge the gap between traditional code analysis and error detection. By applying linguistic theories (Hapax Legomenon and Zipf's Law) to code structures, the system can identify rare and suspicious code patterns that traditional tools miss, thereby expanding detection capability while maintaining precision

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the analysis parameters from traditional syntax and semantics to quantitative linguistic metrics. By measuring code frequency, rarity, and distribution patterns using QL parameters, the system detects anomalies that indicate errors beyond conventional programmatic and syntax categories

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If manual code review is performed, then comprehensive code analysis can be achieved, but efficiency and productivity are reduced

Engineering Contradiction:
Improvecode review thoroughnessVSAvoidcode review efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent implements an automated system that performs code review independently without requiring manual intervention. The Quantitative Linguistics engine automatically analyzes code repositories, identifies rare patterns, and generates reports, thereby achieving both comprehensive analysis and high productivity simultaneously

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the mechanical manual review process with an automated computational system based on Quantitative Linguistics. This substitution maintains the thoroughness of manual review while dramatically improving efficiency through automated pattern recognition and analysis

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

3Productivity

If existing automated systems are used, then basic code checking can be performed, but limitations prevent detection of complex errors in large software projects

Engineering Contradiction:
Improveautomation levelVSAvoiderror detection reliability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent adds a new dimension to code analysis by applying Quantitative Linguistics methodologies. Instead of only analyzing code structure and syntax, the system examines code through linguistic dimensions (frequency, rarity, distribution), enabling reliable detection of complex errors in large software projects while maintaining high automation

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentUS11474816B2Code review using quantitative linguistics
Publication Date: 2022.10.18 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11474816B2 patent drawing
  • US11474816B2 patent drawing
  • US11474816B2 patent drawing

AI summary

Described are techniques for code review using Quantitative Linguistics (QL). The techniques include comparing received code to one or more repositories of code and identifying one or more portions of rare code in the received code that satisfy a rarity threshold relative to the one or more repositories of code. The techniques further include generating annotated code by annotating the received code at the one or more portions of rare code and transmitting the annotated code to a testing platform.