Questions

  • Which types / classes have unwanted dependencies in our code?
  • Which group of types / classes is highly cohesive but lowly coupled?

Idea

Using JDK's jdeps command line utility, we can extract the existing dependencies between Java types:

jdeps -v dropover-classes.jar > jdeps.txt

Data

Read data in with Open Zippy Analysis Platform For Data In Software


In [ ]:
from ozapfdis import jdeps

deps = jdeps.read_jdeps_file(
    "../dataset/jdeps_dropover.txt",
    filter_regex="at.dropover")
deps.head()

Modeling

Extract the information about existing modules based on path naming conventions


In [ ]:
deps = deps[['from', 'to']]
deps['group_from'] = deps['from'].str.split(".").str[2]
deps['group_to'] = deps['to'].str.split(".").str[2]
deps.head()

Visualization

Output results with An Unified Software Integrator


In [ ]:
from ausi import d3

d3.create_d3force(
    deps,
    "jdeps_demo_output/dropover_d3forced",
    group_col_from="group_from",
    group_col_to="group_to")

In [ ]:
d3.create_semantic_substrate(
    deps,
    "jdeps_demo_output/dropover_semantic_substrate")

In [ ]:
d3.create_hierarchical_edge_bundling(
    deps,
    "jdeps_demo_output/dropover_bundling")