20.01.2014 Views

thesis - Faculty of Information and Communication Technologies ...

thesis - Faculty of Information and Communication Technologies ...

thesis - Faculty of Information and Communication Technologies ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Chapter 4. Measuring Evolving S<strong>of</strong>tware<br />

In the context <strong>of</strong> object-oriented s<strong>of</strong>tware a range <strong>of</strong> measures <strong>of</strong> class<br />

complexity have been defined [117]. In general, there are two perspectives<br />

used when measuring the complexity <strong>of</strong> a class. In the first perspective,<br />

the complexity <strong>of</strong> a class can be computed by measuring the<br />

internal structure. A widely used metric to capture this internal structure<br />

is the Weighted Method Count (WMC) metric [46] where cyclomatic<br />

complexity [190] is used as the weight [177]. Th WMC metric reflects<br />

the degree <strong>of</strong> control flow present within a class <strong>and</strong> has been shown<br />

to be an indicator <strong>of</strong> fault-proneness [19].<br />

The second perspective computes complexity <strong>of</strong> a class by measuring<br />

its coupling with other classes in the s<strong>of</strong>tware. Two commonly used<br />

metrics to capture the degree <strong>of</strong> coupling are the In-Degree Count <strong>and</strong><br />

Out-Degree Count [21,54,55,77,117,165,209,223,287,294,299]. The<br />

In-Degree Count metric measures the number <strong>of</strong> classes a particular<br />

class provides services to (that is, a measure <strong>of</strong> its popularity), while<br />

the Out-Degree Count metric measures how many classes that a particular<br />

class depends upon, respectively. These measures capture the<br />

level <strong>of</strong> coupling within a s<strong>of</strong>tware system which serves as an indicator<br />

<strong>of</strong> the difficulty developers potentially face during maintenance <strong>and</strong><br />

evolution [31, 52, 205]. For example, a class X with a high In-Degree<br />

Count (relative to other classes in the system) is considered complex,<br />

since any changes made to X have the potential to significantly impact<br />

other classes that depend on X. Similarly, a class Y that has a very high<br />

Out-Degree Count is also considered complex, since Y makes use <strong>of</strong> a<br />

large number <strong>of</strong> different functional aspects <strong>of</strong> the system in order to<br />

satisfy its responsibilities. As a consequence, developers cannot alter<br />

Y in a meaningful way before they underst<strong>and</strong> classes that Y uses.<br />

In our study, we collect complexity metrics for each class from both perspectives.<br />

Specifically, we measure the internal structural complexity <strong>of</strong><br />

a class as well as the coupling for a class (the specific metrics <strong>and</strong> their<br />

definitions are described in the sections that follow). Furthermore, we<br />

use the term “complexity” to imply structural complexity rather than<br />

volumetric complexity.<br />

65

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

Saved successfully!

Ooh no, something went wrong!