Code Dependencies

We have seen that code churn and complexity are good predictors of failures. This led us to look at tying together these two pieces of information to effectively quantify the relationship between different pieces of code. In general, in any large-scale software development effort, a good software architecture enables teams to work independently on different components in the architecture. A software dependency is a relationship between two pieces of code, such as a data dependency (component A uses a variable defined by component B) or call dependency (component A calls a function defined by component B). Suppose that component A has many dependencies on component B. If the code of component B changes (churns) a lot between versions, we may expect that component A will need to undergo a certain amount of churn in order to keep it in sync with component B. That is, churn often will propagate across dependencies. Together, a high degree of dependence plus churn can cause errors that will propagate through a system, reducing its reliability.

In order to study the effectiveness of dependencies to predict failures, we studied the dependencies between binaries in Windows Vista. The dependencies are computed at the function level, including caller-callee dependencies, imports, exports, RPC, COM, Registry access, etc. The system-wide dependency graph can be viewed as the low-level architecture of Windows Vista. Dependencies are classified into incoming and outgoing dependencies ...

Get Making Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.