Source Code Analysis Tool for Automated Review Comments

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The source code review process is error-prone due to its reliance on manual interaction, leading to missed obvious errors and inefficiencies, as human reviewers may overlook issues like the absence of tests corresponding to changed source code.

Innovation Solution

Implementing a source code analysis tool that automatically executes analysis modules to identify issues, such as security problems, coding standards adherence, and test coverage, and integrates their output as comments within a source code review tool, allowing developers to focus on complex issues and flag serious problems before human review.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If manual source code review is performed by human developers, then feedback and code quality improvement are achieved, but human error causes obvious mistakes to be missed and review efficiency decreases

Engineering Contradiction:
Improvereview accuracyVSAvoidreview time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary automated analysis of source code changes before they reach human reviewers. Code analysis tools scan the diff data to identify obvious issues such as missing tests, security vulnerabilities, and coding standard violations in advance, so that when human reviewers examine the code, these preliminary problems have already been detected and can be addressed separately.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

An intermediary automated code analysis system is introduced between the code submission and human review processes. This intermediary layer processes the source code changes through multiple analysis tools and generates preliminary feedback, acting as a mediator that filters obvious issues before they reach human reviewers, thereby improving both accuracy and efficiency.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If automated code analysis tools are used to identify obvious issues, then review efficiency improves and human error is reduced, but the complexity of the review system increases

Engineering Contradiction:
Improvereview efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The code analysis system is segmented into multiple independent analysis tools, each specializing in detecting specific types of issues. Different tools analyze different aspects of the code (security, testing, coding standards, etc.), allowing the system to achieve comprehensive coverage while maintaining modularity and manageable complexity through division of labor among specialized components.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The code analysis system is designed as a universal platform that can perform multiple types of analysis through different tools. The same infrastructure supports security scanning, test coverage analysis, coding standard checking, and other analysis types, allowing the system to handle diverse review requirements without requiring separate systems for each function.

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

Data Source

PatentUS10180836B1Generating source code review comments using code analysis tools
Publication Date: 2019.01.15 AMAZON TECH INC
  • US10180836B1 patent drawing
  • US10180836B1 patent drawing
  • US10180836B1 patent drawing

AI summary

Technologies are disclosed herein for generating comments in a source code review tool using code analysis tools. A producer module can be executed in order to obtain source code from a source code review tool. One or more source code analysis modules can then be executed in order to analyze the source code. A reporter module can then store the output of the source code analysis modules as comments in the source code review tool for use by a developer of the source code. The producer, reporter, and source code analysis modules can be executed in response to a request from the source code developer to perform a source code review, by a job scheduler, or in another manner. An application programming interface (API) exposed by the source code review tool can be utilized to obtain the source code and to store the comments associated with the source code.