quasarresearchgroup / m2dm

Metamodel Driven Measurement (M2DM) Tool for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metamodel Driven Measurement (M2DM) Tool for Java

(Eclipse plugin for Java metrics formalization and collection)

This project was developed within the Software Systems Engineering group at the ISTAR Research Center at the ISCTE-IUL university in Lisbon, Portugal.

Introduction

Metamodel Driven Measurement (M2DM) is a paradigm-independent approach to formalize and automatically collect software metrics. The latter are defined as OCL queries over a metamodel representing the target domain. M2DM was proposed in 2001 by Fernando Brito e Abreu [5], using the metamodel of the GOODLY language [4]. Then, M2DM was applied in the context of the UML metamodel and the FLAME (Formal Libray for Aiding Metrics Extraction) was produced [6-8]. The latter includes the definition of Brito e Abreu’s MOOD (Metrics for Object-Oriented Design) and Chidamber and Kemerer metrics suites. The initial version of the MOOD metrics set was publihed in [1]. Bindings of a revised metrics set, dubbed MOOD2, were published for C++ [2] and Eiffel [3]. M2DM has been used since then within the QUASAR research group in diverse contexts such as component based development, aspect-oriented development, object-relational databases, IT service management or business process modeling, as can be seen in QUASAR’s publications and dissertation pages. A fundamental component of our toolset has been the OCL evaluator embedded in the USE (UML Specification Environment) tool. To facilitate the integration with our research tools in those contexts, as well as in others such as model checking and code generation for several platforms, we have defined a Java façade API that we named J-USE.

Due to the emergence of sanitized open source repositories, namely in Java, one of the most popular programming languages, the quest for mining them for research purposes has increased lately. Research endeavors of this kind require empirical validation and the latter implies defining explanatory and outcome variables. Those variables are expressed in this context by the so-called software metrics. Despite the fact that several object-oriented metrics suites have been proposed in the past (e.g. C&K or MOOD suites), no M2DM open-source tool for Java was available and we kept receiving requests worldwide for such a tool. Therefore, we decided to build one on top of Eclipse, the most popular open-source IDE currently used. Since M2DM requires a metamodel of the target domain, we proposed the EJMM (Eclipse Java Metamodel)[9,10], based upon and instantiated through Eclipse's Java Development Tools.

The provided M2DM plugin allows users to easily define new software metrics in OCL upon the EJMM. We have also ported the aforementioned FLAME library to the EJMM. For more information on the internal details of the M2DM tool please read [9,10].

Notes (version 0.8.5)

Installation

Put the EJM2Metrics_0.8.5.jar file in your eclipse/dropins/plugins folder.

Run Eclipse. If the plug-in doesn't show, run Eclipse with the -clean command.

If you are still having trouble installing the plug-in, try putting the EJM2Metrics_0.8.5.jar file in the eclipse/dropins folder or the eclipse/plugins folder.

If you're having trouble instantiating large Java projects, you might want to try increasing the JVM heap space.

Requirements

Make sure you have the EJMM USE specification file (.use) in place.

How to use

Instantiation

Activate the Interactive view in Eclipse through Window > Show View > Other... (Note: the Interactive view is under the M2DM category)

Before instantiating the EJMM, you must first select your USE installation folder, using the "Select USE directory" button.

You must also select the location of your EJMM .use file using the "Select EJMM path" button.

Select the Java project to instantiate using the drop-down menu to the left. Only projects without errors can be instantiated, so make sure the project you want to analyze has no errors.

Press the "Instantiate EJMM" button to instantiate the EJMM with the selected Java project. Depending on the Java project size and its amount of code, the process may take several seconds.

OCL querying

First, you must instantiate the EJMM by following the steps mentioned above.

The text box under "Insert OCL queries here:" will activate once the EJMM has been successfully instantiated.

You may input any OCL query on this text box and press the return key (Enter) to process the query. It functions exactly like the OCL expression evaluator in USE.

Results are shown in the large text area in the bottom of the view.

Bibliography

About

Metamodel Driven Measurement (M2DM) Tool for Java

License:Eclipse Public License 1.0


Languages

Language:Java 100.0%