Browse Prior Art Database

Method and System for Managing Source Code Modification Reapprovals based on Analysis of Source Code Changes

IP.com Disclosure Number: IPCOM000237989D
Publication Date: 2014-Jul-24
Document File: 3 page(s) / 60K

Publishing Venue

The IP.com Prior Art Database

Abstract

A method and system is disclosed for managing source code modification reapprovals based on analysis of source code changes.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 45% of the total text.

Page 01 of 3

Method and System for Managing Source Code Modification Reapprovals based on Analysis of Source Code Changes

Disclosed is a method and system for analyzing changes to one or more source code files and dynamically determining whether a source code commit reapproval is required under certain circumstances.

The method and system determines whether a change is trivial or non-trivial based on a given context. The method and system, then, differentiates the definition of a trivial change depending on the history of a particular developer. Thereafter, the method and system indicates to the developer that a particular change on a local save will require a reapproval. Subsequently, one or more reviewers can be assigned as the risk of a code change increases.

In an embodiment, the method and system leverages one or more static code analysis techniques in order to determine what differences exist between one or more approved source code files and one or more modified source code file(s). The method and system analyzes each change analyzed according to a process and a decision is reached regarding the requirement for reapproval of the change set. The process to analyze each change is described below.

Firstly, the method and system reviews an enumeration of one or more source code files and approves the one or more source code files successfully. The method and system, then, calculates one or more hash values of the contents of the one or more source code files and stores the one or more hash values along with one or more approved records. When a source code file is saved, the method and system recalculates the one or more hash values of the one or more source code files in the associated change set. The method and system, then, compares the one or more hash values stored along with the one or more approval records with a new record. If the values match or no approval hash is located, the method and system takes no action.

If the one or more hash values are different, the method and system determines

whether a reapproval of the change set is required. For each difference, the method and system classifies the changes into one or more potential trivial or non-trivial cases. The one or more trivial cases include, but need not be limited to,


• Comment related changes, file level comments, method level comments, inline comments.


• Globalization changes such as removing hardcoded strings and putting them into a properties file or resource bundle.


• White space changes that depend on programming language. For example python is sensitive to white space so this kind of change may not be trivial.


• Variable, method or class name changes.


• Method overloading syntax changes. For example in some programming

1


Page 02 of 3

languages like Groovy or Bash, semicolons are optional.


• Simple refactoring. For example replace a string comparison with a new enumeration definition and comparison.


• Limited "touching" of other methods/files. For examp...