Software is the heartbeat of modern day technology. In order to keep up with the pace of modern day expansion, change in any
software is inevitable. Defects and enhancements are the two main reasons for a software change. The aim of this paper is to study the
relationship between object oriented metrics and change proneness. Software prediction models based on these results can help us
identify change prone classes of software which would lead to more rigorous testing and better results. In the previous research, the
use of machine learning methods for predicting faulty classes was found. However till date no study determines the effectiveness of
machine learning methods for predicting change prone classes. Statistical and machine learning methods are two different techniques
for software quality prediction. We evaluate and compare the performance of these machine learning methods with statistical method
(logistic regression). The results are based on three chosen open source software, written in java language. The performance of the
predicted models was evaluated using receiver operating characteristic analysis. The study shows that machine learning methods are
comparable to regression techniques. Testing based on change proneness of software leads to better quality by targeting the most
change prone classes. Thus, the developed models can be used to reduce the probability of defect occurrence and we commit ourselves
to better maintenance.
Index Terms— Change proneness, Empirical validation, Object-oriented metric, Receiver operating characteristics Analysis,
Software quality.
change. JFreeChart, a multiversion medium sized open source
I. INTRODUCTION project was used for evaluation of the results. The results
In software industry, resources like time, cost and effort are indicated BDM as an effective indicator for change proneness
always limited while developing and maintaining software. prediction.
Extensive research has been conducted over the years to study
the relationship between object oriented metrics. These studies Ambros et al. [2] used correlation and regression analysis in
help in efficient and effective utilization of resources. order to study the relationship between change coupling and
Maintenance is a very important phase of a software life cycle software defects. Change coupling refers to interdependence
and is one of the most expensive phases as 40–70 % of the of various artifacts of software on each other because they
entire cost of software is spent on maintenance. Change evolve together.
proneness i.e. the probability that a particular part of the
software would change is also very important and needs to be Sharafat et al. [3] proposed a probabilistic model to predict
evaluated. Prediction of change prone classes can help in the probability of a change in each class. The probabilistic
maintenance and testing. A change prone class needs to be approach to determine whether a particular class will change,
tested rigorously, and proper tracking should be done for the in the next generation of the software is based upon its change
particular class while changing and maintaining the software. history as well as the source code. Source code, ranging over
In this work, we establish a relationship between various various software releases was analyzed using reverse
object oriented metrics and change proneness. engineering techniques, to collect code metrics. The
probability of internal change of a class,
This paper is organized as follows. Section 2 summarizes i.e. the possibility that a class will be reformed, due to
related work. Section 3 summarizes the metrics studied and changes originating from the class itself is obtained from code
the dependent variable. Section 4 describes the Empirical data metrics.
collection method. Section 5 states the research methodology.
The results of the study are presented in Sect. 6 and Sect. 7 Chaumum et al. [4] defined a change impact model to study
presents the conclusion of the work. the consequences of changes made to classes of the system. A
change impact model was defined and mapped in C??
II. RELATED WORK language. According to their model, the impact of change
depends on two main factors (a) its type, which can lead to
Software always keeps evolving and undergoes a number of
different sets of impacted classes and (b) the type of link
changes, in order to enhance its functionality or to correct
(association, aggregation, inheritance or invocation) between
defects.
classes. A study to analyze the impact of one
change was carried out on the telecommunication system.
Han et al. [1] worked on improving the quality of design by
They concluded that design of a system plays an essential role
predicting change proneness in UML 2.0 models. This was
in ascertaining the system’s reaction to incoming changes, and
done using behavioral dependency measurement (BDM), a
well-chosen OO design metrics can function as an indicator of
method used for rating classes according to probability of
2
Nu D. Descriptive statistics
Datas- Prog. No.of 0f. Comm.
V1 V2 %
et Lang. ch. cl. unch. cl. Here we will describe statistics results of each software.
classes
Table 3, 4, 5, 6 and 7 shown below are the descriptive results
Abra Java 0.9.8 0.9.9 33 147 180 18.3 that contains mean, median, mode, standard deviation,
Abbot Java 1.0.0rc1 1.0.0rc3 86 241 327 26.3 variance, minimum, maximum and percentiles for each
Apoll-
o
Java 0.1 0.2 69 183 252 27.4 metrics of all software used. From table 3, 4, 5, 6 and 7, we
Avisy- can see that the mean value of number of children (NOC) for
Java 1.1 1.2 27 46 73 36.9
nc software (ABRA-0.73, ABBOT-0.73, APOLLO-0.69,
Jmete-
Java 2.8 2.9 537 363 900 59.7 AVISYNC-0.56, JMETER-0.52) which is very low for each
r
software, so we can conclude that number of children are very
Table 2: description of each software less i.e. inheritance is not much used in all five systems.
C. Data Collection Method LCOM metric which is defined as the total count of classes
In this section we will explain how to collect data points for having no attribute or variable in common has greater value in
all five software. Since we have to examine all the changes in all the systems (approximately 100). Similar results have been
every class files of both versions (previous and current shown by other researchers [11, 13, 14].
version) and values for all the metrics we have used in our
study and then merge both the files (change report and metric Table 3: descriptive statistics result for ABRA dataset
Me M Std. Percentil
file). To obtain complete dataset we follow some steps and Me Vari Mini Maxi es
dia od Devi
these steps are: an
n e ation
ance mum mum
25 75
Step 1: Metric generation process:
CB 3.2 18.36 1.0 4.0
As we know metric is the basic unit to examine the 2.00 0 4.286 0 24
O 7 7 0 0
characteristics of software. In this process we downloaded NO
.73 0.00 0 2.234 4.990 0 13
0.0 0.0
source code of two different version of five open source C 0 0
Cl. 0.0 1.0
software (one previous and one current) as shown in Table 2 me.
.90 0.00 0 1.658 2.750 0 7
0 0
from sourceforge.net. We generated metrics for the first Cl. 1.0 0.0 1.0
0.00 0 2.574 6.625 0 23
version of all five software (ABRA-0.9.8, ABBOT- 1.0.0rc1, var. 3 0 0
APOLLO-0.1, AVISYNC-1.1, JMETER-2.8) with the help of NI 7.9 11.16 124.5 2.0 9.0
5.00 0 0 67
M 9 1 59 0 0
understand tool for java. The metric file obtained in this NI 3.0 25.65 0.0 4.0
2.00 0 5.065 0 36
contains metric for all classes (because in this study we are V 4 8 0 0
analysing changes in the classes of both version of software), Loc
8.8 10.74 115.4 3.0 9.0
. 6.00 3 0 67
methods and unknown classes which we discard while we me.
9 5 51 0 0
make dataset. At the end of this stage we now have metric file RF 18. 10.0 23.46 550.4 6.0 17.
6 0 95
for all software we have used above. C 71 0 1 30 0 00
Step 2: Preprocessing step: Lo.
Pri. 0.0 0.0
Since we have to find only common classes so in this step, Met
.60 0.00 0 2.315 5.359 0 14
0 0
we perform data filter to extract common classes which are .
common in both the versions of each software (current and Lo.
Pro 2.1 43.90 0.0 1.0
previous version). A similar procedure was followed by Zhou . 9
0.00 0 6.626
1
0 51
0 0
et al. [9]. Me.
Step 3: change report generation: Loc
. 5.8 41.87 3.0 7.0
To generate change report we used CMS tool for java. CMS 4.00 4 6.471 0 64
pu. 2 1 0 0
tool works as follows: first we open CMS tool, then we click me.
run button, it will display a popup window which demands LO 81. 35.5
16
158.8 2522
2 932
18. 63.
both the versions of software. Then we click on compare C 44 0 11 0.941 00 75
DI 1.8 1.0 2.0
button and finally it will generate change report of CSV T 1
2.00 1 .908 .824 1 4
0 0
extension. We repeat this process for other four software and LC 49. 60.0 35.42 1254. 0.0 80.
0 0 100
we get change report of all five software. OM 32 0 1 644 0 00
Step 4: Merging files: W 17. 31.91 1018. 5.0 14.
8.00 5 0 165
MC 77 7 694 0 75
In this step, we combine metric file obtained in step 1 and
change report file obtained in step 3 to yield complete dataset.
Table 4: descriptive statistics result for ABBOT Dataset
Here we search common java classes in both the files and then
Percentil
merge them. At the end of this step we have complete dataset Me M Std. es
of all five software. Me dia od Devi Vari Mini Maxi
an n e ation ance mum mum 25 75
CB 23. 11 40.38 1630. 2.0 13.
5.00 0 113
O 06 3 4 893 0 00
4
APOLLO AUC CUTOFF SENSITIVITY SPECIFICITY Figure 1: ROC curve for best models of each software
POINT
NAÏVE 0.672 0.118 0.638 0.628
VI. CONCLUSION AND FUTURE WORK
MLP 0.660 0.215 0.638 0.639
KSTAR 0.779 0.112 0.725 0.723
The goal of our research was to investigate the relationship
Bagging 0.769 0.253 0.696 0.694 between OO metrics and change proneness of a class. We also
RANDOM 0.764 0.209 0.725 0.727 empirically analyze and compare and evaluate the
FOREST performance of logistic regression and machine learning
PART 0.721 0.299 0.638 0.656
methods for predicting change prone classes. Based on studies
LR 0.694 0.245 0.623 0.623 of data sets obtained from five open source software ABRA,
ABBOT , APOLLO , AVISYNC and JMETER we analyzed
Table 16: model evaluation result of AVISYNC dataset the performance of predicted models using ROC analysis.
AVISYNC AUC CUTOFF SENSITIVITY SPECIFICITY
Thus, the main contributions of this paper are summarized as
POINT
NAÏVE 0.766 0.111 0.704 0.796 follows: First, we performed the analysis on five freely
available java software, i.e. we applied the study on five
MLP 0.783 0.378 0.667 0.609 different data sets and the results are generalized and
KSTAR 0.771 0.414 0.704 0.713 conclusive. Second, we took the changes in classes into
account while predicting the change proneness of classes.
Bagging 0.760 0.689 0.630 0.630 Third, besides the common statistical methods, we applied
RANDOM 0.742 0.281 0.778 0.609 machine learning methods to predict the effect of OO metrics
FOREST on change proneness and evaluated these methods based on
PART 0.721 0.375 0.630 0.630 their performance.
LR 0.717 0.326 0.741 0.609 The results established in our paper are valid for object
Table 17: model evaluation result of JMETER dataset
oriented, medium and large sized systems. We plan to
JMETER AUC CUTOFF SENSITIVITY SPECIFICITY replicate our study to predict models based on machine
POINT learning algorithms such as genetic algorithms. In our future
NAÏVE 0.722 0.108 0.672 0.672 studies, we would like to emphasize on the economic benefit
MLP 0.762 0.610 0.732 0.722 of a change proneness model.
KSTAR 0.797 0.629 0.758 0.755
REFERENCES
Bagging 0.827 0.632 0.762 0.758
[1] Han AR, Jeon S, Bae D, Hong J (2008) Behavioral dependency
RANDOM 0.831 0.568 0.795 0.741 measurement for change proneness prediction in UML 2.0 design
FOREST models, in computer software and applications 32nd annual IEEE
PART 0.790 0.654 0.708 0.736 international
[2] D’Ambros M, Lanza M, Robbes R (2009) On the relationship between
LR 0.771 0.567 0.719 0.713 change coupling and software defects in 16th working conference on
reverse engineering, pp 135–144
[3] Sharafat AR, Tavildari L (2007) Change prediction in object oriented
software systems: a probabilistic approach in 11th European conference
on software maintenance and reengineering
[4] Chaumum MA, Kabaili H, Keller RK, Lustman F (1999) A change
impact model for changeability assessment in object oriented software
systems in third european conference on software maintenance and
reengineering, pp 130
8