Software Component Metrics

Prof. Yoshiaki Fukazawa
Hironori Washizaki
Hirokazu Yamamoto

Japanese | English


In our research, JavaBeans is the targeted component system. A JavaBeans component is composed of one or more Java classes, and, opens one Facade class to the public based on Facade design pattern. The important factors of JavaBeans are attributes, readable/writable properties, read/write methods and business method. Information about these factors are available without source codes of target components.

Attributes are member fields of the componentfs Facade class. Readable properties are attributes whose value can be observed from the outside of components using read methods. Writable properties are attributes whose value can be updated from the outside of components using write methods. Business methods are executable operations from the outside of components.

Target Components

For example, the right figure shows a UML class diagram of one JavaBeans component. This component has three methods as its interface. Using the naming conventions, the attribute (gfooh) can be recognized as the readable and writable property because there are a read method (ggetFooh) and a write method (gsetFooh). This component also has one business method (gdosomeh). And, by preparing BeanInfo classes that present meta-information of components, component developers can specify the read/write methods and properties without the naming conventions.

If the reliability of an individual component were low, the entire systemfs reliability would become also low. Therefore, when we develop software systems according to CBD, it is important to measure the quality of components that we want to reuse.

We propose five metrics for JavaBeans black-box components using available information from the outside of components. Our metrics are defined according to a reusability model for the component.

We calculated effective intervals of our four metrics. If the value of our metric, for example, RCO, is in the effective interval, understandability, testability and usability are assumed to be high.

At a website JARS.COM, all submitted JavaBeans components are ranked in eight levels based on judged overall quality of components by a rating committee. The evaluation value for the component C is described as J(C).

We assumed that reusability of components which satisfy J(C) is equal or greater than 0.875 are high. And we calculated effective intervals using 125 JavaBeans components provided at JARS.COM, including such high reusable components, based on a statistical analysis.

As a result of the statistical analysis, we found that:

  1. If the value of EMI is 1, users of components can easily understand componentsf usage. Therefore, the value of EMI should be 1.
  2. In order to guarantee high understandability, testability and usability, a half or one third of componentfs attributes should be readable properties.
  3. In order to guarantee high usability of component, one-third of componentfs attributes should be writable properties.
  4. In order to guarantee high portability of the component, three-quarter of componentfs business methods should be without return value.
  5. The presence or absence of method parameters is not strongly related to the componentfs quality.


Related Link

Copyright(c) 2002, CBSE Group, Fukazawa Laboratory

Componeng-Based Software Engineering Group