Automated Code Comment Maintenance via Intermediate Language Matching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Programmers face challenges in maintaining up-to-date code comments, as they become outdated with code changes, leading to a tedious and error-prone process, especially when managing code across different platforms and languages.

Innovation Solution

A system that compiles code into an intermediate language, compares it to a library of code snippets associated with comments, and presents relevant comments to users for selection and integration, using methods like Levenstein distance or models for matching and updating obsolete comments.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If programmers manually maintain code comments, then comments can be kept relevant to code, but the process becomes tedious and error-prone

Engineering Contradiction:
Improvecomment accuracyVSAvoidcomment maintenance effort
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The system enables comments to maintain themselves automatically by comparing code changes with associated comments and generating update suggestions without requiring manual programmer intervention for each comment maintenance task

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces the manual mechanical process of comment maintenance with an automated computational system that uses code comparison algorithms and natural language processing to identify and suggest comment updates

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

2Adaptability or versatility

If code is managed across multiple platforms and languages, then code reusability increases, but comment maintenance complexity increases

Engineering Contradiction:
Improvecode portabilityVSAvoidcomment management complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system provides a universal comment maintenance solution that works across multiple programming languages and platforms by using language-agnostic code comparison techniques and adaptable natural language processing models

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent introduces an intermediary automated system that mediates between code changes across different platforms and the corresponding comments, translating and adapting comment maintenance requirements across various programming languages and environments

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If code changes frequently, then code becomes more adaptable to requirements, but comments become outdated faster

Engineering Contradiction:
Improvecode flexibilityVSAvoidcomment validity period
Core Design Contradiction:
Adaptability or versatilityVSDuration of action of stationary object

Solution Approach 1:

The system implements continuous feedback by monitoring code changes and automatically generating comment update suggestions, creating a closed-loop process that maintains comment relevance alongside code evolution

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent performs preliminary actions by proactively identifying when comments may become outdated based on code change detection, and generating update suggestions before the comments are actually used, ensuring they remain current

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12124844B2Methods and arrangements to process comments
Publication Date: 2024.10.22 CAPITAL ONE SERVICES LLC
  • US12124844B2 patent drawing
  • US12124844B2 patent drawing
  • US12124844B2 patent drawing

AI summary

Described herein are embodiments for managing comments in a program code file. A system may select program code and compile it to an intermediary code. The system may compare the intermediary code to a library of intermediary code snippets associated with comments. Based on the comparison, a system may recognize the code to be obsolete. In some embodiments, a system may generate one or more recommendations to update a code. Based on received feedback regarding a recommendation, a system may accordingly update a code.