Skip to content

Commit 4713a31

Browse files
committed
Add anomaly and archetype treemaps
1 parent e0ffb07 commit 4713a31

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The process involves three steps:
3838
- [Java Types that are surprisingly central or popular](#java-types-that-are-surprisingly-central-or-popular)
3939
- [Largest Java Type Clusters](#largest-java-type-clusters)
4040
- [Java Type Anomalies](#java-type-anomalies)
41+
- [Java Archetypes Treemap](#java-archetypes-treemap)
4142
- [Java Type Top 1 Authority](#java-type-top-1-authority)
4243
- [Java Type Top 1 Bottleneck](#java-type-top-1-bottleneck)
4344
- [Java Type Top 1 Bridge](#java-type-top-1-bridge)
@@ -173,36 +174,46 @@ The scatter plot below compares the importance of Java types to the density of t
173174

174175
Based on a fully fledged anomaly detection model combining multiple graph-based features (centrality, clustering, node embeddings), the following visualization highlights various types of anomalous Java types in the codebase in contrast to some "very normal" types.
175176

176-
<img src="./analysis-results/AxonFramework/AxonFramework-4.12.1/anomaly-detection/Java_Type/Anomalies.svg" width="600" alt="Java Type Anomalies">
177+
<img src="./analysis-results/AxonFramework/latest/anomaly-detection/Java_Type/Anomalies.svg" width="600" alt="Java Type Anomalies">
178+
179+
The following treemap shows the distribution of different anomaly types across the codebase:
180+
181+
<img src="./analysis-results/AxonFramework/latest/anomaly-detection/JavaTreemap1AverageAnomalyScorePerDirectory.svg" width="600" alt="Java Type Anomalies Treemap">
177182

178183
The full Markdown report describing all detected anomalies readable for humans and large language models can be found here: [Anomaly Detection Report](./analysis-results/AxonFramework/AxonFramework-4.12.1/anomaly-detection/anomaly_detection_report.md).
179184

185+
### Java Archetypes Treemap
186+
187+
The following treemap visualizes the distribution of Java archetypes (Authority, Bottleneck, Bridge, Hub, Outlier) across different directories in the codebase. Each rectangle represents a directory. The color coding indicates the type and the strength of archetype, allowing for quick identification of architectural patterns and potential areas of concern within the project's structure.
188+
189+
<img src="./analysis-results/AxonFramework/latest/anomaly-detection/JavaTreemap2ArchetypesOverviewPerDirectory.svg" width="600" alt="Java Archetypes Treemap">
190+
180191
### Java Type Top 1 Authority
181192

182193
An "Authority" is a code unit many important parts depend on: it has high global importance (PageRank) but low local support (ArticleRank). A large PageRank − ArticleRank gap flags widely used utilities or entry points that are central but not well supported locally.
183194

184-
<img src="./analysis-results/AxonFramework/AxonFramework-4.12.1/anomaly-detection/Java_Type/GraphVisualizations/TopAuthority1.svg" width="600" alt="Top 1 Java Type Authority Graph Visualization">
195+
<img src="./analysis-results/AxonFramework/latest/anomaly-detection/Java_Type/GraphVisualizations/TopAuthority1.svg" width="600" alt="Top 1 Java Type Authority Graph Visualization">
185196

186197
### Java Type Top 1 Bottleneck
187198

188199
A "Bottleneck" is a code unit with exceptionally high Betweenness centrality — it lies on many shortest paths between other nodes, so it mediates a large fraction of dependency flows and is a potential single point of failure or architectural hotspot. Potentially an unintended dependency concentration: if removed, communication between modules breaks.
189200

190-
<img src="./analysis-results/AxonFramework/AxonFramework-4.12.1/anomaly-detection/Java_Type/GraphVisualizations/TopBottleneck1.svg" width="600" alt="Top 1 Java Type Bottleneck Graph Visualization">
201+
<img src="./analysis-results/AxonFramework/latest/anomaly-detection/Java_Type/GraphVisualizations/TopBottleneck1.svg" width="600" alt="Top 1 Java Type Bottleneck Graph Visualization">
191202

192203
### Java Type Top 1 Bridge
193204

194205
A "Bridge" is a code unit that connects different parts of the codebase. It is detected as an anomaly with a high contribution of node embedding features, which encode the structural position in the graph. It shows code that might integrate various layers or boundaries (e.g., API facades) or violates architecture (tangled dependencies).
195206

196-
<img src="./analysis-results/AxonFramework/AxonFramework-4.12.1/anomaly-detection/Java_Type/GraphVisualizations/TopBridge1.svg" width="600" alt="Top 1 Java Type Bridge Graph Visualization">
207+
<img src="./analysis-results/AxonFramework/latest/anomaly-detection/Java_Type/GraphVisualizations/TopBridge1.svg" width="600" alt="Top 1 Java Type Bridge Graph Visualization">
197208

198209
### Java Type Top 1 Hub
199210

200211
A "Hub" is a code unit with a high out-degree (many dependencies) but low clustering coefficient (its neighbors are not well connected). Hubs are central dependencies that many other parts rely on, making them potential fragile hotspots in the architecture. The low clustering coefficient indicates that these hubs may not be well integrated into the surrounding code, increasing the risk of failure if the hub encounters issues.
201212

202-
<img src="./analysis-results/AxonFramework/AxonFramework-4.12.1/anomaly-detection/Java_Type/GraphVisualizations/TopHub1.svg" width="600" alt="Top 1 Java Type Hub Graph Visualization">
213+
<img src="./analysis-results/AxonFramework/latest/anomaly-detection/Java_Type/GraphVisualizations/TopHub1.svg" width="600" alt="Top 1 Java Type Hub Graph Visualization">
203214

204215
### Java Type Top 1 Outlier
205216

206217
A "Outlier" is a code unit that significantly deviates from typical patterns in the codebase. It has a low clustering probability and a high distance to the nearest cluster centroid in the node embedding space. This indicates that the outlier has a unique structural position in the dependency graph, potentially representing specialized functionality or an architectural anomaly.
207218

208-
<img src="./analysis-results/AxonFramework/AxonFramework-4.12.1/anomaly-detection/Java_Type/GraphVisualizations/TopOutlier1.svg" width="600" alt="Top 1 Java Type Outlier Graph Visualization">
219+
<img src="./analysis-results/AxonFramework/latest/anomaly-detection/Java_Type/GraphVisualizations/TopOutlier1.svg" width="600" alt="Top 1 Java Type Outlier Graph Visualization">

0 commit comments

Comments
 (0)