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 />

General<br />

Inner Class*<br />

Field*<br />

Method*<br />

Fully Qualified Class Name<br />

Super Class Name, Interfaces Implemented<br />

Modifiers<br />

Constant Pool: Numeric, String <strong>and</strong> Type Constants<br />

Source File Name (optional)<br />

Enclosing Class References<br />

Annotation*<br />

Attribute*<br />

Name*<br />

Modifiers, Name, Type<br />

Annotation*<br />

Attribute*<br />

Modifiers, Name, Return Type, Parameter Types<br />

Annotation*<br />

Attribute*<br />

Compiled Code (Java bytecode instructions)<br />

Table 4.1: Structure <strong>of</strong> a compiled Java Class. Items that end with an<br />

* indicate a cardinality <strong>of</strong> zero or more [180].<br />

Java compiler <strong>and</strong> class file structure<br />

The Java compiler reads class <strong>and</strong> interface definitions, written in the<br />

Java programming language [108], <strong>and</strong> compiles them into class files<br />

[131] that can be executed by the Java Virtual Machine (JVM) [180].<br />

A compiled Java class, in contrast to natively compiled programs (for<br />

example, a C/C++ application), retains all <strong>of</strong> the structural information<br />

from the program code <strong>and</strong> almost all <strong>of</strong> the symbols from the<br />

source code [184, 268]. More specifically, the compiled class contains<br />

all information about the fields (including their types), method bodies<br />

represented as a sequence <strong>of</strong> Java bytecode instructions, <strong>and</strong> general<br />

information about the class (see Table 4.1 for an overview). Although,<br />

a range <strong>of</strong> different Java compilers are available, the class files that<br />

are generated by these compilers must adhere to the JVM specification<br />

[180] <strong>and</strong> hence all <strong>of</strong> the data that we process to extract the metrics<br />

matches a common specification.<br />

The Java bytecode instructions that are generated by the compiler consists<br />

<strong>of</strong> an opcode specifying the operation to be performed, followed<br />

75

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

Saved successfully!

Ooh no, something went wrong!