Anti-AIClone

Log date · Sun

Can Semref recover your software architecture?

Semref refines recovered architectures with semantics and dependencies. A Java example shows why the dependency view needs checking.

Can Semref help recover architecture?

Semref is designed to refine an existing recovered architecture using LLM semantics and dependency analysis, but its output still needs validation against the input and the intended architecture. In our three-class Java example, the full dependency view shows two internal class edges; the API-only view shows none. The scope of analysis itself changes the resulting picture.

The paper’s v1 was submitted to arXiv on 26 July 2026 at 17:51 UTC and is listed as accepted at ICSE 2026. [1] Its authors evaluated outputs from 10 recovery tools on nine projects with published ground-truth architectures. The abstract reports normalized gains of 17.72% to 43.35% across metrics and a 118.57% relative improvement in MoJoFM. Those are the paper’s results, not our measurements.

Questions and findings
QuestionFinding
What does Semref do?Refines an existing recovery using semantics and dependencies.
Full view in our sampleTwo internal edges point to Pricing.
API-only viewNeither of those edges appears.
Does this quantify release exposure?The paper does not answer that directly; inspect your own build.

One sample, two dependency views

We wrote Checkout, Receipt and Pricing: the first two call Pricing.quote in their method bodies, while their public signatures use only integers. We compiled with javac 17.0.19 and examined class dependencies with the same version of jdeps, once with all dependencies and once with API-only dependencies. This JDK illustration is not a Semref or LLM run, nor a replication of the paper; the sample is not a real application and does not test obfuscated or decompiled input.

jdeps accepts class files, directories and JARs. The -filter:none option includes dependencies inside the same archive, while -apionly restricts analysis to dependencies in public and protected API signatures. [2] We retain the JDK dependencies in the excerpt so that filtering is not mistaken for a complete account.

Full view, copied verbatim.
   demo.Checkout                                      -> demo.Pricing                                       build
   demo.Checkout                                      -> java.lang.Object                                   java.base
   demo.Pricing                                       -> java.lang.Object                                   java.base
   demo.Receipt                                       -> demo.Pricing                                       build
   demo.Receipt                                       -> java.lang.Object                                   java.base
API-only view, copied verbatim.
   demo.Checkout                                      -> java.lang.Object                                   java.base
   demo.Pricing                                       -> java.lang.Object                                   java.base
   demo.Receipt                                       -> java.lang.Object                                   java.base

Both calls occur inside method bodies rather than in the public signatures here, so the API-only view omits them. It would be wrong to infer from that view alone that Checkout and Receipt do not depend on Pricing: the view answers a different question. Record analysis options and unresolved dependencies before comparing architecture diagrams.

An edge does not explain responsibility

Both edges point to Pricing, but neither edge says whether Checkout handles an order flow, Receipt displays a receipt, or the two belong in one module. Names provide clues; a developer must compare them with source, execution paths and design documentation. Similar dependency shapes can serve different responsibilities, and names can be stale or misleading.

Semref addresses the problem of combining semantic and structural evidence to refine an existing recovery. [1] Do not treat a single edge as a module boundary or a model-generated label as fact. Keep the original graph, proposed grouping and human edits so that the evidence for a conclusion remains inspectable after the code changes.

The paper concerns projects with source code. In a shipped client, names, logs, resources and debugging information may offer additional context, but exposure must be checked on the actual build. The paper’s metrics cannot be converted directly into a success rate or cost for recovering an obfuscated artifact. Logic that runs in the client is delivered with it, so define the trust boundary accordingly.

Recommendations by case

These are engineering recommendations, not measured effects from our sample. Decide whether the diagram serves maintenance, migration or security before choosing evidence and reviewers.

Recommendations: start with the question
CaseRecommendation
Understanding responsibilitiesCombine a dependency graph, source and maintainer review; record uncertainty.
Assessing client exposureInspect names, resources and debugging information in the actual release.
Restricting sensitive actionsEnforce authorization on a trusted service; do not rely only on client unreadability.
Using model-assisted analysisUse code permitted for processing, retain evidence and have an owner review labels.

A dependency graph and semantic summary can identify areas to review; they do not replace a threat model. Record where each operation runs, who controls its inputs and who makes the final authorization decision. For an offline feature, specify which rules remain enforceable when the user controls the device.

Run the check on your Java build

First reproduce the sample, then run jdeps on a release JAR you are authorized to inspect, replacing the path below. Save both views rather than selecting only convenient edges. If the tool reports missing dependencies, supply the necessary class path and rerun; an absent edge is not proof that no runtime relationship exists.

The first three commands reproduce the sample; replace the path in the last command.
javac -d build sample/demo/*.java
jdeps -verbose:class -filter:none build
jdeps -verbose:class -filter:none -apionly build

# Replace this path with your own release JAR.
jdeps -verbose:class -filter:none path/to/your-release.jar

Compare the output with the design diagram and review cross-boundary dependencies with module owners. Confirm whether each is intended, then check whether build configuration changes the shipped artifact. Save the version, commands, input and review decisions, and repeat after major architecture changes. Associate any mapping file with the exact release and protect it for internal diagnosis.

Your checklist

  • Record the recovery tool’s input and analysis options.
  • Review dependency edges and responsibility labels with module owners.
  • Inspect names and debugging information in the release artifact.
  • Identify where sensitive operations are authorized.
  • Retain build mappings and review records, and repeat after architecture changes.

Primary sources

All sources and reproduction status ↗