27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

[29]. In their study they have presented empirical evaluations<br />

showing that SLOC is a direct measure of complexity, the only<br />

exception being header files which showed a low correlation<br />

with the McCabe’s cyclomatic complexity measures. Research<br />

by Graylin et al. presented evidence that SLOC and cyclomatic<br />

complexity have a stable practically perfect linear relationship<br />

that holds across programmers, languages, code paradig ms<br />

(procedural versus object-oriented), and software processes<br />

[30]. Linear models have been developed relating SLOC and<br />

cyclomatic xomplexity. Buse et al [31], for example, presented<br />

a study where they show a high direct correlation between the<br />

SLOC and the structural complexity of the code. A study by<br />

Gaffney [32] reported that the number of faults in a software<br />

component is directly correlated to source lines of code<br />

(SLOC). Krishnan et al. [33] also reported an empirical study<br />

that showed a direct correlation between SLOC and the number<br />

of defects in software components.<br />

Based on these studies, we decided to compare the one-use<br />

and reusable components in our study based on the size (in<br />

SLOC), effort (man-hours) and productivity (in SLOC/hr).<br />

V. RESULTS AND ANALYSIS<br />

A. Reuse Design Principles<br />

Table II shows the summary of the usage of reuse design<br />

principles by the subjects. The mean number of principl es<br />

used by a subject was 5.4. A well-defined interface (#1) was<br />

the most highly ranked principle and was used for about half<br />

of the reusable components. Link to documentation was<br />

ranked 2 and used in about 42% of the reusable components.<br />

Documentation has always been recommended and widely<br />

used in the programming world. Clarity and understandability<br />

of the code ranked next. This principle allows the users of the<br />

component a better and easier way of comprehending the code<br />

for future use. The next three principles were generality,<br />

separate concepts from contents and commonality and<br />

variability.<br />

B. SLOC, Effort, Productivity and Parameters<br />

The source lines of code for the one-use (N=107) and<br />

reusable components (N=101 ) were measured using the<br />

sloccount tool [http://www.dwheeler.com/sloccount/]. The<br />

notched box plots of the SLOC measured for the one-use and<br />

reusable components are shown in Fig. 2.<br />

SLOC ReuseDiff = (SLOC Reuse – SLOC one-use ) (5)<br />

The effort taken in terms of time (hours) and the number of<br />

parameters are shown in Fig. 3 and 4 respectively. Fig. 5<br />

compares the productivity (in terms of SLOC/ho ur) of the<br />

developers for one-use vs. reuse components. SLOC ReuseDiff is<br />

considered for the productivity of reusable components<br />

because the reusable components studied in this paper were<br />

not built from scratch; instead , they were reengineered by<br />

modifying the one-use components.<br />

SLOC/hr ReuseDiff = (SLOC Reuse – SLOC one-use ) / Effort Reuse (6)<br />

TABLE II. Ranking of reuse design principles used<br />

Rank# Reuse Design Principle Count#<br />

1 well defined interface 56<br />

2 link to documentation 43<br />

3 clear and understandable 42<br />

4 generality 41<br />

5 separate concept from contents 40<br />

6 commonality and variability 31<br />

7 linking of test to code 24<br />

8 encapsulation 23<br />

9 one component use many 21<br />

10 composition 19<br />

11 variability mechanism 13<br />

12 parameterization 12<br />

13 genericity 11<br />

14 optimization 9<br />

15 restrictiveness 7<br />

16 modification 3<br />

17 isolate context and policy 1<br />

18 abstraction 1<br />

19 self-documenting code 1<br />

Understanding and interpreting box plots can be found in<br />

[34]. If the notches of boxpl ots of different groups overlap,<br />

then there is no significant difference between the groups and if<br />

they do not overlap, there is significant difference between the<br />

groups.<br />

The median of SLOC significantly increased for the<br />

reusable components to 92 lines of code as compared to 51 for<br />

the one-use components, an increase of 80%. The aver age<br />

SLOC was 62 and 110 for the one-use components and the<br />

reusable components respectively. The notches of the two box<br />

plots do not overlap and this indicates a statistically significant<br />

difference between the sizes of the tw o components. This<br />

increase is due to inco rporating more functi onality in the<br />

reusable components. The boxplots in Fig. 2 also shows that<br />

there is much more variability in the SLOC measure for the<br />

reusable components. This may be because the reusable<br />

components have more functionalities and those functionalities<br />

vary from subject to subject based on the understanding of the<br />

reuse design principles; while for the one-use components the<br />

subjects may have had a more similar understanding of the<br />

functionality. From Fig. 3, the median of the time taken to<br />

implement the components was 5.0 hours and 8.0 hours<br />

respectively for the one-use and reusable components. Average<br />

time taken was 3.6 and 6.5 hours for one-use components and<br />

reusable components respectively. The notched areas of the<br />

box plots overlap for the two and this indicates no significant<br />

difference. As was the case for SLOC, the variability is higher<br />

for the reusable components. The inter quartile range for the<br />

one-use and reusable components are 3.0 hours and 5.5 hours<br />

respectively while the standard deviations are 3.0 hours and 6.8<br />

hours respectively.<br />

197

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!