TY - GEN
T1 - A friend in need is a friend indeed
AU - English, Michael
AU - Buckley, Jim
AU - Cahill, Tony
PY - 2005
Y1 - 2005
N2 - 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.
AB - 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.
UR - http://www.scopus.com/inward/record.url?scp=33749058511&partnerID=8YFLogxK
U2 - 10.1109/ISESE.2005.1541854
DO - 10.1109/ISESE.2005.1541854
M3 - Conference contribution
AN - SCOPUS:33749058511
SN - 0780395085
SN - 9780780395084
T3 - 2005 International Symposium on Empirical Software Engineering, ISESE 2005
SP - 469
EP - 478
BT - 2005 International Symposium on Empirical Software Engineering, ISESE 2005
T2 - 2005 International Symposium on Empirical Software Engineering, ISESE 2005
Y2 - 17 November 2005 through 18 November 2005
ER -