metrikaplugin documentation 9 ikkk metrics group dr. porkoláb zoltán (supervisor), pataki norbert, sipos ádám 2005. november 30.

MetrikaPlugin Documentation 9
IKKK metrics group
Dr. Porkoláb Zoltán (supervisor), Pataki Norbert, Sipos Ádám
2005. november 30.
Measuring the complexity of Java programmes under the „Eclipse”
environment

Supported by: GVOP-3.2.2.-2004-07-0005/3.0
==========================================
Introduction
============
The goal of our project was the creation of a program that works under
the Eclipse IDE as a plug-in, and measures the complexity of Java
programmes according to several metrics.
The Eclipse IDE
===============
Eclipse (http://eclipse.org) is the leading developer environment of
the open-source community, supported by IBM. As of now it helps the
development and editing of Java, C# programmes, and XML documents. At
the same time, thanks to its modular architecture, a module supporting
any other language can be created.
Eclipse itself is written in Java, and consists of the system kernel,
and many different modules. Thus it has been ported to many platforms,
among them Windows and Linux. Further advantage of Eclipse is its
speed – the windowing system's implementation uses direct calls to the
operating system’s routines. (The name of the interface module is SWT,
Standard Widget Toolkit)
Anybody with Java programming and Eclipse API programming knowledge
can add new modules to the IDE.
Eclipse is remarkably complex, thus the creation of a module matching
the conventions requires great attention. In return we get a
comfortable, uniform user interface.
Further advantage is that the development of new modules is convenient
with the aid of Eclipse.

User documentation
Environment
===========
The module has been developed for and tested heavily under Eclipse
3.1.
Eclipse can be acquired from http://www.eclipse.org and from numerous
mirror sites. The last accessible version is 3.11. The size is around
100MBs.
The file needed for the install is : eclipse-SDK-3.1-xxx.zip, where
xxx stands for the operating system. For example under a Microsoft
Windows system it is eclipse-SDK-3.1-win32.zip.
We tested the software only under Windows. This means we do not
suggest to use it on Linux.
Install
=======
To install the plugin follow this step-by-step instructions:
1.
Copy the eclipse directory from the CD to your hard drive. This
version includes our plugin, so you needn't copy anything else.
Make sure file weights.cfg is writable.
2.
If Eclipse does not recognize the plugin, try running the IDE this
way:
eclipse –clear
3.
If the plugin still does not work, please send us a mail ([email protected],
[email protected])
The plugin in the environment
=============================
After the install the user interface has a new „Metrika” menu added.
It has two items:
1.
Súlyok beállítása (setting the weight values)
2.
Mérés (measure)

Mérés: Input the path of the program to be measured into the first
inputbox. It can be a directory, or a .java file. Then you can check
if you have have entered it right, and also set other options for the
measuring. Pushing the Mérés button will bring up a new window. Here
you can decide where to put the output files. Then the measuring
begins. After the computing you can find 2 output files: a csv and a
html. This files show the different complexity values apply to the
different metrics. If the checkbox on the window was on, you would get
AV-graphs in dot format.We provide a converter program to convert this
files to other formats (for example, jpg, ps etc.). The csv file can
be viewed with Microsoft Excel, the html file can be viewed with
Internet browsers (for instance, Microsoft Internet Explorer, Mozilla
Firefox, Opera, etc.).


Súlyok beállítása: Here you can set the weights for the Java language
elements. You can see all the elements (see also the Appendix) and
their values. The new values can be saved by clicking on the Mentés
button at the bottom of the window.


Developer Documentation
Development of the module was carried out in concordance with the
guidelines of Eclipse:
*
Certain parts of the user interface are inherited from the Eclipse
base class.
*
Resources for the module are saved in plugin.xml
The program consists of 3 main packages:
*
package „antlr”
*
package „measure”
*
package „metrikaPlugin”
package antlr: This package contains the syntactic parser generator.
It is not directly used in the plugin, but we included it because of
the safety.
package measure: This package implements the parsing and measuring.
package metrikaPlugin: Consists of classes required by the plugin.
Package measure
ComplexityData, class: Collects complexity values for classes, files,
etc.
DataNode, class: Responsible for the representation of data nodes.
Inherited from class Node.
Debug, class: Used for debugging.
DistanceComparer, class: Compares the distance of Node objects. This
class is used by the sort.
Edge, class: Represents a graph's edge.
EdgeTypes, class: Summarizes the different types of the edges.
FlowGraph, class: Represents an entire AV graph.
FlowGraphBuilder, class: The mapping between the syntax tree and the
controlling graph.
InstructionNode, class: Represents an instruction node. Inherited from
the class Node.
JavaLexer, class: The Java lexical analyzer class. This class is
generated by the antlr, avoid modification.
JavaMetric, class: This class computes the complexity.
JavaMetricOptions, class: Different language constructions measuring
class.
JavaRecognizer, class: The Java syntactical analyzer class. It is
generated by the antlr, so avoid modification.
JavaTokenNames, class: This class contains the Java lexical elements
by ordinal numbers. This class is generated by the antlr, avoid
modification.
Main, class: This class provides the measure starting.
Node, class: This class represents nodes in the graph.
Queue, class: A general queue datastructure class.
StartNode, class: It is a class for starting nodes in the graph.
Inherited from the class Node.
TerminatingNode osztály: It is a class for terminating nodes in the
graph. Inherited from the class Node.
Package metrikaPlugin
This package uses the Eclipse API extensively, so we do not describe
the specific pieces of inheritance information
metrikaPluginPlugin, class: A singleton class containing the plugin.
Its subpackage: metrikaPlugin.actions: This package is responsible for
the plugin’s behaviour and visual appearance.
MetrikaAction, class: This class handles and attains the Measuring
menu (Mérés menüpont).
MetrikaWeights, class: This class handles and attains the Setting
Weight Values menu (Súlyok beállítása menüpont).
MyJFace, class: This class provides the visual appearance for the
windows in Measuring menu (Mérés menüpont).
WeightsFace, class: This class handles the visible window to the
setting weight values (Súlyok beállítása).
2 Validator classes: 2 utility classes for the input handling.
Appendix
The weights of The AV-metric.
-----------------------------
Identifier
Short description
ASSIGN
= operator
PLUS_ASSIGN
+= operator
MINUS_ASSIGN
-= operator
STAR_ASSIGN
*= operator
DIV_ASSIGN
/= operator
MOD_ASSIGN
%= operator
SR_ASSIGN
>>= operator
BSR_ASSIGN
>>>= operator
SL_ASSIGN
<<= operator
BAND_ASSIGN
&= operator
BXOR_ASSIGN
^= operator
BOR_ASSIGN
|= operator
QUESTION
? A ? : operator
COLON
: A ? : operator
COMMA
, operator
DOT
. operator
LOR
|| operator
LAND
&& operator
BOR
| operator
BXOR
^ operator
BAND
& operator
NOT_EQUAL
!= operator
EQUAL
== operator
LT
< operator
GT
> operator
LE
<= operator
GE
>= operator
SL
<< operator
SR
>> operator
BSR
>>> operator
PLUS
+ operator
MINUS
- operator
DIV
/ operator
MOD
% operator
INC
++ operator
DEC
-- operator
BNOT
~ operator
LNOT
! operator
STAR
* operator
UNARY_MINUS
- operator
UNARY_PLUS
+ operator
POST_INC
++ operator
POST_DEC
-- operator
LITERAL_new
new operator
METHOD_CALL
method call
CTOR_CALL
constructor call
SUPER_CTOR_CALL
base constructor call
IDENT
identifiers
LITERAL_this
keyword this
LITERAL_super
keyword super
LITERAL_null
keyword null
LITERAL_true
true value
LITERAL_false
false value
NUM_INT
integer constant
CHAR_LITERAL
character constant
STRING_LITERAL
string constant
NUM_FLOAT
float constant
NUM_LONG
long integer constant
NUM_DOUBLE
double float constant

  • 7 KLASS MINAPILDI KIRJELDAV JA HINNANGULINE KOMPONENT TÖÖ KÄSK
  • REGIONAL RECRUITMENT NETWORK LGEM 24 MARCH 2010 IN ATTENDANCE
  • MOKYKLŲ VEIKLOS ĮSIVERTINIMO KONSULTANTŲ SĄRAŠAS 2010 – 12
  • VISIONS DU SUDEST DU CAMEROUN CETTE EXPOSITION EST LE
  • NAFARROAKO GOBERNUAK ETA IKUSENTZUNEZKO KONTSEILUAK “FAMILIA TELEVISIÓN Y OTRAS
  • MEMORIA ECONÓMICA 2014 FUNDACIÓN BANCO DE ALIMENTOS DE ASTURIAS
  • 8 (8) PORVOOLOVIISA ANSÖKAN OM GODKÄNNANDE SOM PRODUCENT AV
  • WYKAZ PODRĘCZNIKÓW DO PRZEDMIOTÓW ZAWODOWYCH DLA KLASY 3 TECHNIKUM
  • QFW FOR FY 2020 石橋財団・国際交流基金 日本美術リサーチフェローシップ 申請要領 ISHIBASHI FOUNDATIONTHE
  • SÜDDEUTSCHE ZEITUNG O KADAR ÇOK ÇÜRÜK VAR Kİ BERLİN
  • NAPOVED REZERVACIJE ZA ODSOTNOST OTROKA V VRTCU V ČASU
  • NA PODLAGI PRVEGA ODSTAVKA 20 ČLENA ZAKONA O SPODBUJANJU
  • ZGŁOSZENIE KANDYDATÓW NA CZŁONKÓW OBWODOWYCH KOMISJI WYBORCZYCH DS PRZEPROWADZENIA
  • RESUM ORDE CONVOCATÒRIA PLA 20132016 AJUDES A LA REHABILITACIÓ
  • NOMBRE LEGAL DEL ESTUDIANTE FECHA DE NACIMIENTO IDENTIFICACIÓN LOCAL
  • WHAT ARE ‘TEXTS’ (TEXT TYPES)? IN THE WRITTEN EXAMINATION
  • ITAAB ADVISORY NOTE TRAC ISDN TYPE APPROVAL ADVISORY BOARD
  • HANDLEIDING DUPLO HEADLIGHTS (2) (OOK WEL DIMLIGHTS GENOEMD) (MET
  • DALLA GAZZETTA UFFICIALE DELLA REPUBBLICA ITALIANA DEL 30
  • HMED1101 271103 LITT DIVERSE OM SCREENING AV RONA IM
  • USEFUL CORRESPONDENCE PHRASES FOR LETTERS AND EMAILS FROM WWWTHEENGLISHWEBCOM
  • ANKARA MİKRO ÖLÇEĞİNDE İNTERNET KAFELER KULLANIM BİÇİMLERİ MUTLU BINARK
  • MODEL B – DOKTERSATTEST KB 24011969 NAAM VOORNAAM HOEDANIGHEID
  • RULES ON INVESTIGATIONS AND DETERMINATIONS OF INDUSTRY INJURY FOR
  • 111821 304 PM RESPONSE TO COMMENTS RECEIVED BY MARCH
  • P6TA(2008)0064 SITUACIÓN EN GAZA PE 401062 RESOLUCIÓN DEL PARLAMENTO
  • ANEXO 1 FORMATO PARA EL PERFIL DEL DOCENTE (PROFESIOGRAMA)
  • NEUROLEPTIC DRUGS AND VIOLENCE CATHERINE CLARKE SRN SCM MSSCH
  • RECHAZO DE LA DEMANDA – AL NO SUBSANARSE ACREDITANDO
  • ANNOTATED BIBLIOGRAPHY – LIGAND GATED ION CHANNELS SAAD ABBASI