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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

the terms Java Interface <strong>and</strong> Java Class where these abstractions are<br />

treated separately in our analysis.<br />

4.5.3 Merge Inner Classes<br />

In Java, the inner class abstraction is provided as a convenience mechanism<br />

to structure the functionality within a class [125]. For example,<br />

inner classes are commonly used to implement event h<strong>and</strong>lers in graphical<br />

user interface applications. More generally, inner classes are used<br />

when an object needs to send another object a block <strong>of</strong> code that can<br />

call the first object’s methods or manipulate its instance variables.<br />

Interestingly, the Java virtual machine specification [180] requires the<br />

compiler to emit a separate class file for each class including the inner<br />

classes defined within a class (<strong>of</strong> Java source code). However, semantically<br />

developers consider inner-classes to be a part <strong>of</strong> the parent class<br />

within the solution design. Especially since instances <strong>of</strong> an inner class<br />

cannot be instantiated without being bound to an enclosing class.<br />

In the Metric Extraction step, inner classes are processed as separate<br />

entities since we use compiled class files as input. However, for the<br />

purposes <strong>of</strong> our study, we treat inner classes as part <strong>of</strong> the parent class<br />

<strong>and</strong> hence merge all metrics collected from inner classes into the parent<br />

class. The key benefit gained by merging is that is allows us to focus<br />

on the core abstractions within the solution rather than the specific<br />

internal representation <strong>of</strong> a class. However, the trade-<strong>of</strong>f is that we<br />

are unable to directly observe the evolution dynamics <strong>of</strong> inner classes<br />

independent <strong>of</strong> their parent classes.<br />

4.5.4 Class Dependency Graph Construction<br />

In order to measure the structural complexity <strong>of</strong> a s<strong>of</strong>tware system we<br />

construct a complete class dependency graph, G T <strong>and</strong> measure certain<br />

properties <strong>of</strong> this graph. When a class uses either data or functionality<br />

from another class, there is a dependency between these classes. In<br />

the context <strong>of</strong> Java s<strong>of</strong>tware, a dependency is created if a class inher-<br />

82

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

Saved successfully!

Ooh no, something went wrong!