27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

nique estimate the impact set based on transitive closure on<br />

the call graph [3]. This paper also used the call graph to<br />

represent the system and then computed the impact set on<br />

this representation. But different from traditional call graph<br />

based CIA technique, this paper attempts to compute a more<br />

precise impact set in respect to two factors: setting a stable<br />

state for the impact set computation on the call graph and<br />

considering interference among multiple changed entities<br />

in the change set. The case study on the real-world program<br />

has shown the effectiveness of our approach.<br />

This paper is organized as follows: in the next section,<br />

we introduce our CIA approach. Section 3 gives the experimental<br />

evaluation to show the effectiveness of our CIA technique.<br />

In Section 4, some related work of CIA techniques<br />

are presented. Finally, we conclude our CIA technique and<br />

show some future work in Section 5.<br />

2 Our Approach<br />

Given the change set, CIA is employed to estimate the<br />

impact set of the changes made to the software. In this paper,<br />

CIA is performed based on mining the call graph.<br />

2.1 Basics for CIA<br />

As proposed above, our approach uses call graph to represent<br />

the system and CIA is performed relying on mining<br />

this call graph. In this section, some definitions and some<br />

operations in call graph are given. First, we introduce the<br />

definition of the call graph [8].<br />

Definition 1 (Call Graph) A call graph is a directed graph<br />

G =(V,E). V is a set of vertices representing methods in<br />

the system, and E ⊆ V × V is a set of edges representing<br />

the call relationship between the caller and callee.<br />

In addition, there are two useful definitions to help mining<br />

the call graph: inner-degree and inter-degree of a subgraph<br />

G ′ . They are defined as follows:<br />

Definition 2 (Inner-degree) Given a subgraph G ′<br />

of the<br />

call graph, inner-degree of G ′<br />

is the total number of the<br />

edges for each vertex in G ′ .<br />

Definition 3 (Inter-degree) Given a subgraph G ′<br />

of the<br />

call graph G, inter-degree of G ′ on G is the total number of<br />

edges adjacent to (connected to) the vertices in G − G ′ .<br />

As discussed in the above phenomenon ”water wave ripple”,<br />

there is an important spreading center to propagate<br />

the ripples of the water wave. Similar to this, there is also<br />

a center to propagate the change ripples during the process<br />

of change impact analysis. On the call graph, we call this<br />

center as core, defined as follows:<br />

Definition 4 (Core) Core is a subgraph G ′ of the call<br />

graph G,, which satisfies that the ratio of their innerdegree<br />

over the inter-degree is greater than the threshold<br />

ε.<br />

The threshold ε indicates the cohesion of the relationship<br />

among the methods within the subgraph G ′ . The bigger<br />

the ε is, the higher the cohesion of the relationship among<br />

these methods is. In our CIA approach, it is used to take the<br />

interference among the changed methods in the change set<br />

into account. The ε is at least bigger than 1, which shows<br />

the relationship among the methods within the subgraph is<br />

stronger than connecting to its outer methods.<br />

In graph theory, breadth-first-search (BFS) is widely<br />

used in graph search algorithm, defined as follows:<br />

Definition 5 (BFS) BFS begins from the origin node and<br />

explores all the neighboring nodes. Then for each of those<br />

nearest nodes, it searches their unexplored neighbor nodes,<br />

and so on, until it finds the goal.<br />

This search algorithm is also used for change impact<br />

analysis for searching the ripples of the changes. In the next<br />

section, our CIA approach is presented based on these definitions.<br />

2.2 Change Impact Analysis<br />

In our approach, change set is proposed to be composed<br />

of a set of changed methods, CIA is then performed relying<br />

on mining the call graph, and generates a set of potentially<br />

impacted methods. It includes two steps. First, we identify<br />

the ”center” of multiple changes ripples, which we call<br />

initial impact set. It is expected that the methods in the initial<br />

impact set are less likely to be false-positives. Then, we<br />

compute the changes effects of this center, and obtain the<br />

final impact set. And this set is expected to cover all the<br />

ripples affected by the changes.<br />

As discussed above, most of current CIA techniques<br />

compute the impact set from the individual entities in the<br />

change set, without considering the relationship existed a-<br />

mong them. In practice, multiple changes are performed in<br />

combination to finish a change proposal, hence there exists<br />

the relationship among the changed entities in the source<br />

code. Such a relationship is called the interference in this<br />

paper. We take the interference among the entities in the<br />

change set into account to estimate the impact set. First<br />

we attempt to identify the center of these changes, which<br />

includes the most probably impacted entities potentially affected<br />

by these multiple changes. These entities are collected<br />

into the initial impact set, which is defined as follows:<br />

Definition 6 (Initial Impact Set (IIS)) Initial impact set<br />

is computed using the BFS algorithm from the methods<br />

8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!