DocumentCode :
2549601
Title :
A friend in need is a friend indeed [software metrics and friend functions]
Author :
English, Michael ; Buckley, Jim ; Cahill, Tony
Author_Institution :
CSIS Dept., Limerick Univ., Ireland
fYear :
2005
fDate :
17-18 Nov. 2005
Abstract :
Previous research has highlighted the extensive use of the C++ friend construct in both library-based and application-based systems. However, existing software metrics do not concentrate on measuring friendship accurately, a surprising omission given the debate friendship has caused in the object-oriented community. In this paper, a number of software metrics, that measure the extent to which friend class relationships are actually used in systems, are defined. These metrics are based on the interactions for which the friend construct is necessary, as well as the direction of this association between classes. Our results, in applying these metrics to the top 100 downloaded systems from sourceforge.net, indicate that up to 66% of friend class relationships in systems are redundant. Elsewhere, friend function declarations would have been more appropriate in many cases. In addition, it has been shown that friendship-based coupling contributes significantly to the high coupling of friend classes for only 25% of the systems studied.
Keywords :
C++ language; object-oriented programming; software libraries; software metrics; C++ friend construct; friend class relationships; friend functions; software metrics; Encapsulation; Fault detection; Object oriented modeling; Predictive models; Programming; Protection; Software measurement; Software metrics; Software systems; Testing;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Empirical Software Engineering, 2005. 2005 International Symposium on
Print_ISBN :
0-7803-9507-7
Type :
conf
DOI :
10.1109/ISESE.2005.1541854
Filename :
1541854
Link To Document :
بازگشت