  In this paper, we present a complex network approach to the study of software
engineering. We have found universal network patterns in a large collection of
object-oriented (OO) software systems written in C++ and Java. All the systems
analyzed here display the small-world behavior, that is, the average distance
between any pair of classes is very small even when coupling is low and
cohesion is high. In addition, the structure of OO software is a very
heterogeneous network characterized by a degree distribution following a
power-law with similar exponents. We have investigated the origin of these
universal patterns. Our study suggests that some features of OO programing
languages, like encapsulation, seem to be largely responsible for the
small-world behavior. On the other hand, software heterogeneity is largely
independent of the purpose and objectives of the particular system under study
and appears to be related to a pattern of constrained growth. A number of
software engineering topics may benefit from the present approach, including
empirical software measurement and program comprehension.

Disordered Systems and Neural Networks