Application of Metrics for Software Reuse in FOSS
This document sums up the "Application of Metrics for Software Reuse in FOSS" article and shows the most important results.
Introduction
Measurement
of software reuse is made easier for Free software than for
proprietary software since the code can be directly inspected to
measure reuse.
Hence, in order to show the impact of FOSS on
software reuse, we selected some reuse metrics which could be applied
to free and open source projects: we selected metrics on the
technical level, that concerned the reuse of components, of
frameworks and of code.
We then applied these metrics to randomly
selected Java and C/C++ Free and Open Source projects in order to
create statistics on software reuse in FOSS.
The results show the
impact of FOSS on software reuse.
The selection of the metrics, their application and the statistics are presented in this article , that is summed up in this document.
Different Kinds of Software Reuse
Reuse of components is perhaps the most common form of reuse in FOSS: in consists of using a component or an external library in the application, either directly or indirectly by reusing another component itself reusing different components. Measuring this kind of reuse requires to define the limit between libraries that can be called external components and libraries that are part of the system or the programming language.
Framework reuse is similar to components reuse, considering frameworks as a set of coherent components.
Direct
code reuse (by copy/pasting code, or including classes and using
inheritance) is considered insignificant
compared to components and frameworks reuse and is thus not
considered.
Different Kinds of Metrics
We considered the following metrics:
- "Reuse Level" metric: measures the ratio of external items to total items used in the program
- "Reuse Frequency" metric: measures the ratio of references to external items to total references used in the program
- "Reuse Density" metric: measures the number of reused item related to the total number of instructions.
Test Cases
The metrics were applied on two set of programs:
- Java Programs: a first test was made on randomly selected projects taken from http://sourceforge.net, and a second on well know projects taken on the list from http://java-source.net
- C/C++ Programs: we considered RPM packages of C/C++ programs that were distributed with a Linux distribution (SuSE 9.2).
Results
This table summarizes the results of the different metrics applied in this study:
|
Programming Language |
Granularity for Metric |
Origin of projects |
Number of projects |
Average External Reuse Level |
|---|---|---|---|---|
|
Java |
packages |
randomly selected on http://sourceforge.net |
54 |
0.45 |
|
Java |
packages |
projects from http://java-source.net |
58 |
0.52 |
|
C/C++ |
shared libraries |
SuSE 9.2 packages |
396 |
0.48 |
Conclusion
Even if this study didn't allow us to compare software reuse in FOSS with software reuse in proprietary software, it already showed that the average of measures of the components reuse were at approximately 50%, tending to show that FOSS seems to improve software reuse in quite efficient ways, without all the additional efforts made by companies that have a complete internal reuse policy, with sometimes employees spending time to create reusable components.
Since one of the main goals of FOSS is to promote the reuse of products, we can conclude that this goal is indeed achieved, and that this main concept in the Free and Open Source ideas is well respected and implemented in a majority of FOSS products.
To have more information on this study, please read the complete article.