27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

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.

model and the analysis results. The integration is based on the<br />

traceability information recorded during analysis process.<br />

The traceability information from the analysis object<br />

selected in the UML model, the artifact set, the analysis inputs<br />

and analysis results is kept by the integration framework during<br />

input adaptation and runtime execution stage. Relationship<br />

between UML model and the input is decided by the platformspecific<br />

rules and the required input format of the analysis<br />

method. During analyzer executeion, relationship is recorded<br />

into an XML file. After these two st eps, the relationship<br />

between UML model and analyzer output can be deduced. The<br />

traceability recording process is shown in Fig. 2.<br />

Artifacts<br />

Artifact set<br />

(for analysis)<br />

Analysis input<br />

Analysis input<br />

Analysis input<br />

Analysis Result<br />

Analysis Results<br />

Analysis Results<br />

Figure 2. Traceability recording<br />

Model<br />

Model Element<br />

Model Element<br />

Model Element<br />

Model Element<br />

Model Element<br />

Model Element<br />

Properties of<br />

Properties of<br />

Model Properties Elementof<br />

Model Element<br />

Model Element<br />

With the traceability information recorded, the UML model<br />

will be e xtended with the analysis results as attributes of the<br />

analysis objects. To display the integrated analysis results, we<br />

provide a friendly user interface to show relationship between<br />

UML models and analysis results. In the UM L diagrams, the<br />

extended properties will be linked to the analysis results.<br />

IV. CASE STUDIES<br />

We implement the supporting tool of our framework as an<br />

Eclipse plug-in. Using the tool, we have already integrated 13<br />

analysis methods. We first in troduce the integrated analysis<br />

methods, and then use an analysis method JDepend[9] as an<br />

example to introduce how to integrate an analysis method and<br />

how to use an integrated analysis method in our framework.<br />

A. The Integrated Analysis Methods<br />

We have already integrated 13 analysis methods in our<br />

framework. The in tegrated analysis methods are shown in<br />

Table 2. We assume that the analysis method integrators are<br />

analysis method developers who can provide detail information<br />

about the a nalysis methods. As a resul t, we choose analysis<br />

methods with open source analyzers, so as to provide de tail<br />

integration information.<br />

In the table, we can see th at an ana lyzer may implement<br />

one or more analysis methods. An an alysis method is a<br />

relatively standalone functional unit providing analysis service<br />

in the analyzer. There may be several analysis methods in its<br />

inner structure. An analysis method has its specific input<br />

format requirement. However, in the table, we co mbined the<br />

analysis methods with the same invocation interface but<br />

different input requirements as one analysis method for space<br />

limit.<br />

TABLE II. INTEGRATED ANALYSIS METHODS<br />

Analysis<br />

method<br />

Analyzer Input Format Analyzer<br />

implementation<br />

JDepend JDepend [9] IPackageFragmentRoot/ Eclipse plug-in/<br />

IPackageFragment Command line<br />

Classycle Classycle IJavaProject Eclipse plug-in/<br />

[13]<br />

Command line<br />

Code<br />

Analysis<br />

CodePro<br />

Analytix<br />

[14]<br />

IPackageFragmentRoot/<br />

IPackageFragment/<br />

ICompilationUnit<br />

Eclipse plug-in<br />

Similar<br />

Code<br />

Analysis<br />

Metrics<br />

Code<br />

Coverage<br />

Dependenc<br />

y Analysis<br />

Findbugs<br />

Checkstyle<br />

CodePro<br />

Analytix<br />

CodePro<br />

Analytix<br />

CodePro<br />

Analytix<br />

CodePro<br />

Analytix<br />

Findbugs<br />

[15]<br />

Checkstyle<br />

[16]<br />

IPackageFragmentRoot/<br />

IPackageFragment/<br />

ICompilationUnit<br />

IPackageFragmentRoot/<br />

IPackageFragment/<br />

ICompilationUnit<br />

IPackageFragmentRoot/<br />

IPackageFragment/<br />

ICompilationUnit<br />

IPackageFragmentRoot/<br />

IPackageFragment/<br />

ICompilationUnit<br />

IJavaProject/<br />

IPackageFragmentRoot/<br />

IPackageFragment/<br />

ICompilationUnit<br />

IJavaProject/<br />

IPackageFragmentRoot/<br />

IPackageFragment/<br />

ICompilationUnit<br />

PMD PMD[17] IPackageFragmentRoot/<br />

ICompilationUnit<br />

Yasca Yasca [18] IPackageFragmentRoot/<br />

ICompilationUnit<br />

JLint JLint [19] IPackageFragmentRoot/<br />

ICompilationUnit<br />

JavaNCSS JavaNCSS IPackageFragmentRoot/<br />

[20]<br />

ICompilationUnit<br />

Eclipse plug-in<br />

Eclipse plug-in<br />

Eclipse plug-in<br />

Eclipse plug-in<br />

Eclipse plug-in<br />

Eclipse plug-in<br />

/Command line<br />

Command line<br />

Command line<br />

Command line<br />

Command line<br />

B. Integrating the JDepend Analysis Method<br />

JDepend[9] is an open source analysis tool for Jav a<br />

application. Its analysis result is design qu ality metrics. The<br />

metrics include number of classes and interfaces, afferent<br />

couplings, efferent couplings, abstractness, etc. I t has two<br />

versions of implementations and could be run as Eclipse plugin<br />

or from command line interface. In this section, we use<br />

JDepend as an example to introduce how to integrate analysis<br />

method and use integrated analysis method in our framework.<br />

(1) Integrating an analysis method<br />

The JDepend integrator provides the integration definition.<br />

The elements of integration definition are shown in Tab le 3.<br />

The elements analysis method plug-in identifier, type of<br />

extension point, and plug-in action class are used for<br />

integrating analyzer implemented as Ec lipse plug-in. The<br />

element command structure is used for integrating analyzer<br />

with command line interface. It should be noted that the<br />

elements for inte grating analyzers are optional. An analysis<br />

method can be integrated with any kind o f analyzer<br />

implementations.<br />

TABLE III.<br />

Element Name<br />

Analysis Method Name<br />

Required input of<br />

analyzer<br />

THE INTEGRATION DEFINITION<br />

Description<br />

The name of analysis method being integrated<br />

The input format accepted by the analyzer. A<br />

list of supported formats are provided.<br />

214

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

Saved successfully!

Ooh no, something went wrong!