We measured Java package dependencies across ten years of ThingsBoard, from December 2016 to November 2026. Its measured production code grew from about 15,000 to 380,000 lines. The question was simple: how did the structure of its dependencies change?
ply-deps gives that structure a score, D, from 1 to 10. Higher means lower dependency reach: less code sits in a package or depends on it, directly or transitively. The scale is experimental and uncalibrated. The change in D matters, together with the source evidence, more than the number alone.
The curve starts at 8.085, falls to 7.336 in June 2017, then climbs after two DAO reorganisations. It peaks at 9.291 in July 2020. From 2022, a gradual decline leads to a sharper fall in autumn 2026; November ends at 7.558. Three turning points explain much of that story.
August 2019: extract the API
The largest monthly improvement is roughly +1.2 D, from 7.774 to 8.939. Service interfaces move into common/dao-api, separating their module-based package nodes from the implementations. A DAO cycle containing 19 nodes and 11,065 lines disappears from the model.
This is more specific than “smaller packages are better.” One package keeps the same 2,391 lines while its reach falls from 77.65% to 47.99%. The extraction changes who depends on whom. Other cycles remain, including an application component that grows slightly.
July 2017: split the DAO
Refactoring for PostgreSQL separates SQL and NoSQL models and changes DAO interfaces to use shared data types instead of storage entities. D rises from 7.336 to 8.007.
The original model package shrinks dramatically, but much of its code moves into new packages. Those packages must be counted too. New SQL code also changes the total code volume. The gain combines changed dependencies, a smaller DAO cycle and a different distribution of code; it cannot be explained by one shrinking directory.
October 2026: ThingsBoard 4.4
The 4.4 expansion takes measured code from about 251,000 to 378,000 lines. D falls from 8.122 to 7.579. The largest application cycle grows from 111 to 170 package nodes, while a DAO cycle reaches 78 nodes.
New features add dependencies, and some existing packages become reachable from much more code. This is a substantial change in the codebase being compared. The score describes source structure, not the value of the release or its runtime behaviour.
Follow the dependency back to code
For a Java developer, the useful next step is to inspect the classes and imports holding a cycle together. Identify a responsibility to move or a dependency to invert, then measure the result. One cut may achieve little if another path remains.
Keep the scope and tool version consistent. Check coverage before celebrating an improvement: moving a dependency into a form the tool cannot measure is not reduced coupling. Use D to follow the change, and the code to explain it.