Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Calculation of the amount of changes made to a software source code at the function and block level of granularity

IP.com Disclosure Number: IPCOM000225653D
Publication Date: 2013-Feb-25
Document File: 2 page(s) / 65K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a method to better calculate the amount of changes made to a software source code. The approach is to decrease the granularity from the file level to the function (method) or code block level. It applies an algorithm that identifies code change at a lower level of granularity in order to more easily identify error-prone functions as well as a more targeted and concise set of test cases for the respective code change.

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

Page 01 of 2

Calculation of the amount of changes made to a software source code at the function and block level of granularity

Information about the amount of changes made to a software source code is used in a number of software engineering processes. For example, this information is used to automatically identify a subset of test cases needed to verify code change [1] or to detect error-prone source code [2, 4].

This analysis can be performed at different levels of granularity . The most common levels are directory-level [3] and file-level [4]. Popularity of these two levels of analysis is determined by simplicity of data gathering at these levels of granularity. Modern source code management (SCM) systems store every version of each file and provide direct access to it. Therefore, calculation of the size of change made to a file is reduced to 1) comparing (e.g., using diff [5]) new and original versions of this file and computing the number of modified lines . In order to calculate all changes made to a file, an analyst need to recursively compute the amount of changes to every file version and its predecessor until the earliest file version of interest is reached. The directory level information is obtained by aggregating data about all the files and versions of interest in a given directory.

However, it is difficult to derive actions at these levels of granularity. Mature software can have source code files consisting of tens of thousands lines of code . The subset of test cases, associated with a given file, obtained using techniques described in [1] can be significantly larger than an actual set of test cases associated with an actual change made to a file. In a similar manner, if an oracle [2,


4] will highlight a given file as error-prone, developer will not be able to pinpoint specific problematic functionality due to the size of the file .

The solution to this problem is to decrease the granularity from the file level to the function (method) or code block level. The algorithm proposed herein identifies code change at a lower level of granularity (e.g., C function/Java* method or code block level). The advantage is that the identification of error-prone functions can be performed easily. This method also allows for more targeted and concise set of test cases being identified for the respective code change.

File level coverage approach, described above, can be formalized in the following pseudo code.

For each file-version pair of interest v :


1. Identify previous version of th...