Skip to main content
Change coupling (temporal coupling) is the tendency of files to change together — a dependency signal that no static analysis can see, because it captures logical coupling through copy-paste, shared conventions, or protocol mirroring, not just imports. Sum of Coupling (SoC) collapses the pairwise idea to a single number per file: how much company a file keeps when it changes. Files with a high SoC sit at the architectural center of gravity — change them and something else usually has to move too.

What mehen emits

Semantics

  • Commits touching more than 30 files don’t contribute (code-maat’s changeset-noise threshold): bulk reformats and license-header sweeps would otherwise dominate every file’s score.
  • Merge commits don’t contribute (their changesets replay the merged commits).
  • Renames keep accumulating onto the surviving file’s identity.
mehen ships the per-file SoC aggregate rather than pairwise coupling percentages — SoC fits the per-file metric model, and the research recommends it as the pragmatic first step before full pairwise analysis.

How to read it

References

See also