Get AccessAnalysis at SourceForge.net. Fast, secure and Free Open Source software downloads

AccessAnalysis

Measuring the Usage of Access Modifiers in Java

AccessAnalysis

AccessAnalysis is a free Eclipse plug-in that is developed at the University of Hamburg, Germany. It was initiated in a diploma thesis project and enhanced in further research work.

AccessAnalysis determines the Minimal Access Modifiers of types and methods in Java projects. It further computes the software metrics Inappropriate Generosity with Accessibility of Types (IGAT) and Inappropriate Generosity with Accessibility of Methods (IGAM).

The Minimal Access Modifier of a certain Java type or type member is the most restrictive access modifier that allows all existing usages of this type or member from inside a given code base (normally the entire source code of the containing Java project).

The metric Inappropriate Generosity with Accessibility of Types (IGAT) indicates the proportion of those types which actual access modifier is more generous than the minimal one relative to the total number of types in a given source code subset.

Example: A Java class is used only inside its own package. So, its Minimal Access Modifier is default (a.k.a. package-private). If the class' actual access modifier is public, it is more generous than the minimal one.
Assumed that a package contains altogether eight classes and two of them have an actual access modifier that is more generous than the minimal one, then the metric IGAT is calculated by 2/8 = 0.25.

Analog the metric Inappropriate Generosity with Accessibility of Method (IGAM) indicates the proportion of those methods which actual access modifier is more generous than the minimal one relative to the total number of methods in a given source code subset.

The values of IGAT and IGAM range from 0.00 to 1.00, where 0 is the "best" and 1 the "worst" result.

AccessAnalysis is open-source software and licensed under the terms of the Eclipse Public License (EPL).

This project is hosted by Sourceforge. You find more information on the Project Site.

Last update: October 6, 2012