Table 5: Execution of the case study – Group B (without
refactorings).
Data P6 P7 P8 P9 P10 Average AoE AoN
Time (min) 38 45 60 60 30 46 49 45
Time (hours) 0,63 0,75 1,0 1,0 0,5 0,78 0,69 0,83
Singleton Pattern
CC_As 1,0 1,0 0,0 0,0 1,0
CM_AM 1,0 1,0 0,0 0,0 1,0
CC_PA 0,0 0,0 0,0 0,0 0,0
CC_GSR 0,0 0,0 0,0 0,0 0,0
CS_PC 0,0 0,0 0,0 0,0 1,0
MQ 2,0 2,0 0,0 0,0 3,0 1,4 1,0 1,7
Logging
CC_As 1,0 1,0 0,5 0,0 1,0
CM_AM 1,0 1,0 0,0 0,0 0,5
CC_PA 0,5 1,0 0,0 0,0 0,0
CC_GSR 0,0 0,0 0,0 0,0 0,0
CS_PC 0,0 0,0 0,0 0,0 1,0
MQ 2,5 3,0 0,5 0,0 2,5 1,7 1,3 2,0
Results
AVG(MQ) 2,3 2,5 0,3 0,0 2,8 1,6 1,1 1,8
Pr 3,63 3,33 0,3 0,0 5,6 2,57 3,48 1,97
Figure 7: Average of the Metric Pr.
f) Hypothesis Testing. After outlier analysis, it was
noticed that none outlier was identified and the
hypotheses tests were performed. The verification of
the normality of the distribution sample data was
made using the non-parametric test called Shapiro-
Wilk (Montgomery, 2000).
The aim of the hypothesis test is to verify if the
null hypothesis (H
0Ef
and H
0EPr
) can be rejected, with
some significance degree, in favor of an alternative
hypotheses (H
1Ef
or H
1Pr
) based in the set of data
obtained.
The t-test test was applied to the set of sample
data in two stages, because of the existence of two
dependent variables, Efficacy and Productivity were
observed. In first stage, the sample relative to the
values of the metric Pr was compared. In second
one, the comparison was made using samples
referring to the values of MQ metric. For the
purpose of this study, the minor degree of
significance α was used in both stages to reject the
null hypothesis and the maximum degree of
significance equal to 5% was considered.
First stage. Based in two independent samples
(Pr
WR
and Pr
WOR
) with averages equals to 5.75 and
2.57, respectively in Tables 5 and 6, the null
hypothesis (H
0Pr
) could be rejected with 0.0151% of
significance. In others words, it is possible to assure
with 99.9% of accuracy that the average of the
values of the productivity obtained by the
participants that used the refactorings is different.
Second stage. Based in two independent samples
(MQ
WR
and MQ
WOR
) with averages equals to 4.8 and
1.6, respectively, the null hypothesis (H
0Ef
) could be
rejected with 0.0007% of significance. In others
words, it is possible to assurance with 99.9% of
accuracy that the average of the values of the
efficacy obtained using the refactorings is different
as compared to not using the refactorings.
With the rejection of H
0
, it can be stated that the
observed differences in the average of efficacy and
productivity of the participants who used the
refactorings and participants who have not use them,
have statistical significance. Thus, the change in
efficacy and productivity of the groups was due to
the strategies for software modularization adopted in
the experiment, i.e., with or without refactorings.
As presented in Figures 6 and 7, the average
value of the metric MQ of the participants who used
the refactorings was higher than that of the
participants who have not used (MQ
WR
> MQ
WOR
).
These data show that the use of refactorings for
modularization of crosscutting concerns is generally
more effective than when such refactoring are not
used.
Analogously, with respect to productivity, it was
expected that the systematic description of the steps
of refactorings becomes more agile the execution of
the participants’ tasks. Based on the data and
hypothesis test, there are evidences that the use of
refactorings can increase the productivity of a group.
The analysis of the data was accomplished using
a statistical plug-in to the Excel called Analyse-it
(2013).
g) Threats to the Validity of the Study.
Concluding Validity: the t-test was adopted because
our study was a project with one factor with two
treatments. This is the most suitable test for projects
with this configuration, which the aim is to compare
the obtained averages from two distinct treatments.
The t-test usually requires normally distributed data.
So, the Shapiro-Wilk test was applied and the result
Concern-basedRefactoringsSupportedbyClassModelstoReengineerObject-OrientedSoftwareintoAspect-Oriented
Ones
55