Gson
JavaGoogle's JSON serialization library for Java
Java classes in the same package use each other without import statements. The analyzer records 132 such dependencies, which reveals a 24-class cycle running between Gson's public API and its internal adapters.
Call resolution (19,712 call sites)
- Resolved in the repository
- 3,527
- To libraries or the standard library
- 6,051
- Ambiguous (several possible targets)
- 3,592
- Unresolved (could be repo code)
- 6,542
The rate above is resolved ÷ (resolved + ambiguous + unresolved). Calls to libraries and the standard library cannot reach this repository, so they are shown separately and left out of it. Test code is included in these counts.
What the analysis shows
A class can use another class from its own package with no import statement. The analyzer records 132 dependencies between classes of the same package, 132 of them without any import, found through type references, constructor calls and inheritance. For example, Gson.java uses FormattingStyle and JsonElement.java uses JsonArray with no import; we checked both in the source.
The main cycle has 24 classes and the JSON tree-model cycle 16. The main cycle crosses packages: Gson.java imports the internal adapter classes, and internal/bind/TypeAdapters.java imports Gson back.
143 of the 264 analyzed files are test classes, so tests appear in the graph and can be mapped to the code they exercise. Gson.java is the most imported class (127 importers), 95 of them test classes; counting production importers only, JsonReader.java comes first (39).
19,712 call sites; 18% resolve to a method in the repository: mostly calls on variables and fields of a declared type, then calls within a class, then static calls. A call on a type whose method is overridden in subclasses is shown as ambiguous, with the possible implementations (1,812 calls, for example getAsString on a JsonElement).
Re-analyzed with the current analyzer, the same commit now includes its Java test classes: 264 files and 1,309 module dependencies, against 121 and 540 in October. The cycles do not change (4 groups, the largest with 24 classes). Call sites grow from 3,433 to 19,712; 3,527 resolve inside the repository, against 816 in October. Calls on variables, fields and parameters with a declared type now resolve to that type's method, or to the set of possible implementations when subclasses override it. The analysis took 28.5 s with a peak of 419 MB (October: 11.4 s, 341 MB).
Largest cycle group
- gson/src/main/java/com/google/gson/Gson.java
- gson/src/main/java/com/google/gson/GsonBuilder.java
- gson/src/main/java/com/google/gson/LongSerializationPolicy.java
- gson/src/main/java/com/google/gson/TypeAdapterFactory.java
- gson/src/main/java/com/google/gson/annotations/JsonAdapter.java
- gson/src/main/java/com/google/gson/annotations/Since.java
- gson/src/main/java/com/google/gson/annotations/Until.java
- gson/src/main/java/com/google/gson/internal/Excluder.java
- gson/src/main/java/com/google/gson/internal/bind/ArrayTypeAdapter.java
- gson/src/main/java/com/google/gson/internal/bind/CollectionTypeAdapterFactory.java
- gson/src/main/java/com/google/gson/internal/bind/DefaultDateTypeAdapter.java
- gson/src/main/java/com/google/gson/internal/bind/EnumTypeAdapter.java
- gson/src/main/java/com/google/gson/internal/bind/JsonAdapterAnnotationTypeAdapterFactory.java
- gson/src/main/java/com/google/gson/internal/bind/MapTypeAdapterFactory.java
- gson/src/main/java/com/google/gson/internal/bind/NumberTypeAdapter.java
- gson/src/main/java/com/google/gson/internal/bind/ObjectTypeAdapter.java
- gson/src/main/java/com/google/gson/internal/bind/ReflectiveTypeAdapterFactory.java
- gson/src/main/java/com/google/gson/internal/bind/TreeTypeAdapter.java
- gson/src/main/java/com/google/gson/internal/bind/TypeAdapterRuntimeTypeWrapper.java
- gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java
- gson/src/main/java/com/google/gson/internal/sql/SqlDateTypeAdapter.java
- gson/src/main/java/com/google/gson/internal/sql/SqlTimeTypeAdapter.java
- gson/src/main/java/com/google/gson/internal/sql/SqlTimestampTypeAdapter.java
- gson/src/main/java/com/google/gson/internal/sql/SqlTypesSupport.java
Most widely called symbols (calling files)
- gson/src/main/java/com/google/gson/reflect/TypeToken.java#com.google.gson.reflect.TypeToken.getRawType (25)
- gson/src/main/java/com/google/gson/Gson.java#com.google.gson.Gson.toJson(Object) (21)
- gson/src/main/java/com/google/gson/JsonObject.java#com.google.gson.JsonObject.add (18)
- gson/src/main/java/com/google/gson/JsonElement.java#com.google.gson.JsonElement.getAsJsonObject (17)
- gson/src/main/java/com/google/gson/JsonObject.java#com.google.gson.JsonObject.get (14)
- gson/src/main/java/com/google/gson/JsonElement.java#com.google.gson.JsonElement.isJsonNull (11)
Compared with the October 2026 demo
The same commit, analyzed again with the current analyzer. Both columns use the same definitions; differences come from analyzer changes, explained in the findings above where they matter. The October demo recorded only the resolved-call count, so the other call-resolution rows show the current analyzer only.
| Measure | October 2026 demo | Current analyzer |
|---|---|---|
Files analyzed graph nodes (Go: packages) | 121 | 264 |
Source lines (SLOC) non-blank, non-comment lines of analyzed files | 13,149 | 38,646 |
Module dependencies distinct file-to-file links, test-only and name-match links excluded | 540 | 1,309 |
Relationship records all edge rows of every kind, including links to external symbols | 1,313 | 3,416 |
Cycle groups groups of files that depend on each other | 4 | 4 |
Largest cycle (files) size of the largest cycle group | 24 | 24 |
Most-imported module distinct production importers of the top module | 39 (JsonReader.java) | 127 (Gson.java) |
Call sites resolved in repo calls resolved to a function inside the repository / all call sites | 816 / 3,433 | 3,527 / 19,712 |
Calls to libraries (external) calls into other packages or the language's standard library | n/a | 6,051 |
Ambiguous calls calls with several possible targets inside the repository | n/a | 3,592 |
Unresolved calls calls that could reach repository code but were not pinned to a target | n/a | 6,542 |
Resolved of in-repo calls resolved / (resolved + ambiguous + unresolved): external calls cannot reach the repository | n/a | 26% |
Framework registrations routes, handlers, hooks, entry points with resolution status | 5 | 25 |
Architectural zones package-hierarchy zones | 18 | 38 |
Analysis time (s) wall time of the analysis call | 11.4 | 28.5 |
Peak memory (MB) container memory peak during the analysis | 341 | 419 |
Limitations
- Java edges do not record whether the importing file is a test, so importer counts and the hub ranking include test classes.
- The bundle reports no Java function count in its summary (methods are recorded per class), so this page does not show one.
- 33% of call sites stay unresolved, mostly calls on local variables and chained expressions whose type is not tracked.
- Static analysis records relationships visible in the source. It does not see dynamic loading, reflection, or behaviour at runtime; verify important conclusions in the code.
Download the analysis
A full bundle of a large repository exceeds many models' context windows; the focused slices below answer one question each in a fraction of the size.
Focused slices
Every cycle group with its members and size.
scc-summary
The most depended-on and most dependent files, with the reasons they rank high.
hub-summary
Everything that depends on the main hub, two levels deep.
blast-radius
Test-side callers reachable from the most-called symbol (see limitations).
affected-tests
Detected frameworks and how their registrations were resolved.
framework-summary
Resolved calls to the most-called symbol, with call sites.
call-diagnostics
Ready to run this on your own codebase?
Hosted analyses use the same analyzer as this demo, within your usage limits.