File size: 8,365 Bytes
e00f999 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | ---
pretty_name: ModuleMap-Bench
license: cc-by-4.0
language:
- en
tags:
- code
- java
- spring
- software-engineering
- architecture-recovery
- coding-agents
- benchmark
task_categories:
- text-classification
size_categories:
- n<1K
configs:
- config_name: roles
data_files: data/roles/labels.jsonl
default: true
- config_name: history
data_files: data/history/commits.jsonl
- config_name: features
data_files: data/features/features.jsonl
- config_name: families
data_files: data/features/families.jsonl
---
# ModuleMap-Bench
**Architectural roles of Java classes, and next-change visibility, in eight open-source Spring and Camunda projects.**
ModuleMap-Bench answers two questions a coding agent faces before it changes anything
in a large Java repository:
1. **What does each class do?** 620 top-level Java types, each labelled with its
architectural *role* — `entry`, `client`, `service`, `domain`, `persistence`, `event`,
`config` or `none` — with a note where the decision was not obvious, a permanent link
to the file, and structural facts computed from the code.
2. **Does a short overview of a module show what will be changed next?** 304 real
commits from seven of the projects, each with the classes it modified and which of
them two 2 KB module overviews showed *before* the commit.
It was built by RSA Global Tech while developing agentkit’s module Map
and is published so others can measure role classifiers, LLM prompts and context
generators on the same ground.
## At a glance
| | |
|---|---|
| Projects | 8 (Spring Boot, Spring Cloud, MyBatis(-Plus), JPA, OpenFeign, Camunda 7 / Operaton, BPMN), 1–63 Maven modules |
| Labelled types | 620 — entry 86 · client 14 · service 99 · domain 53 · persistence 60 · event 6 · config 24 · none 278 |
| History | 304 commits, 3,713 modified types, 7 projects |
| Content | identifiers, labels, notes, computed facts — **no source code, no personal data** |
| Licence | data CC BY 4.0, scripts MIT; source projects under Apache-2.0, MIT, Mulan PSL v2 |
## Files
```
data/
projects.csv one row per project: repository, commit, licence, size
roles/labels.jsonl the 620 labels with structure (config "roles")
roles/labels.csv the same, flat, without structure
history/commits.jsonl the 304 commits (config "history")
features/features.jsonl agentkit's features per labelled type
features/families.jsonl the same per family of similar types
results/ agentkit's predictions and both baselines
annotation/round-2/ blinded sample of 150 for a second annotator
schema/ JSON Schemas of labels and commits
scripts/ validate, evaluate, kappa — Python 3, standard library
build/ how every file was generated
ANNOTATION_GUIDELINES.md the labelling rules
DATASHEET.md motivation, collection, limits, maintenance
```
### A label
```json
{
"id": "mall-swarm/com.macro.mall.mapper.PmsBrandMapper",
"project": "mall-swarm", "module": "mall-mbg", "kind": "interface",
"qualified_name": "com.macro.mall.mapper.PmsBrandMapper",
"path": "mall-mbg/src/main/java/com/macro/mall/mapper/PmsBrandMapper.java",
"url": "https://github.com/macrozheng/mall-swarm/blob/04c442fe3183…/mall-mbg/src/main/java/com/macro/mall/mapper/PmsBrandMapper.java",
"commit": "04c442fe318356bae4445a109dde7af297ce1e84",
"role": "persistence",
"note": "MyBatis mapper; mall-admin, mall-portal and mall-demo import it.",
"structure": {
"public": true, "annotations": [], "supertypes": [],
"imported_by": [{"module": "mall-admin", "count": 1}, {"module": "mall-demo", "count": 1}, {"module": "mall-portal", "count": 1}],
"implementations": 0, "used_within_module": 0,
"data_class": false, "framework_implemented": true,
"derived_marks": ["api"]
}
}
```
`role` and `note` are the annotation (see *How it was made*). Everything under `structure` is computed:
who imports the type from other modules, how many types implement it, whether it is a
data class or an interface only the framework implements, and the usage marks derived
from those (`api`: public and imported by another module; `ext`: an interface or
abstract class with two or more implementations).
### A commit
```json
{
"project": "kiwi",
"commit": "c38c8cb117af7333185c706b7e9c17e9f2469c32",
"parent": "12af08b8a47c576954cfbb0b4e08c9b6038536db",
"committed": "2026-09-16",
"modified": [
{"qualified_name": "com.kiwi.project.bpm.ctl.BpmProjectCtl", "module": "backend", "agentkit_role": "entry", "path": "kiwi-admin/backend/…/BpmProjectCtl.java"},
{"qualified_name": "com.kiwi.project.bpm.service.BpmProjectEnvService", "module": "backend", "agentkit_role": "service", "path": "kiwi-admin/backend/…/BpmProjectEnvService.java"}
],
"shown_before": {"agentkit": ["com.kiwi.project.bpm.ctl.BpmProjectCtl"], "alphabetical": []}
}
```
`modified` are the top-level types of the main-Java files the commit modifies, as they
were at the parent; `shown_before` lists those a 2 KB overview of their module, drawn
from the parent, displayed.
## Tasks and baselines
**Role classification.** Predict `role` for each `id`; score with
`python3 scripts/evaluate_roles.py predictions.jsonl`. Precision: of the types given a
role, the share that is right; recall: of the types labelled with a role, the share
found. A predicted `none` is no prediction.
| Role | agentkit precision | agentkit recall |
|---|---|---|
| entry | 100.0 % | 95.3 % |
| client | 90.9 % | 71.4 % |
| service | 95.5 % | 84.8 % |
| domain | 93.9 % | 86.8 % |
| persistence | 100.0 % | 91.7 % |
| event | 100.0 % | 50.0 % |
| config | 100.0 % | 100.0 % |
| **all, accuracy** | | **92.7 %** |
agentkit reads the code as text with a vocabulary of framework signals, without a
build or a language model (`results/agentkit-roles.predictions.jsonl`). Learned models
should be evaluated leaving whole projects out.
**Next-change visibility.** For each commit, choose — from the parent alone — which
classes to show; score the share of the modified classes shown with
`python3 scripts/evaluate_history.py yours.jsonl`.
| Overview (≤ 2 KB per module) | micro | macro (per project) |
|---|---|---|
| alphabetical | 17.9 % | 28.9 % |
| agentkit Map | **22.3 %** | **32.8 %** |
Compare at the same budget: the baselines show about 25 rows per module.
## How it was made
Types were sampled per project from the source files only, stratified by the last word
of the type name, and labelled by an LLM coding assistant (Claude) reading each type’s
code at a fixed commit, following [ANNOTATION_GUIDELINES.md](ANNOTATION_GUIDELINES.md),
with a note for every non-obvious decision. A human second round is prepared; details in
[DATASHEET.md](DATASHEET.md). `build/build.js`
regenerates every file from the repositories at the listed commits.
## Limitations
- **One annotation pass so far, by an LLM assistant.** The labels were produced by an
LLM coding assistant reading the code under the guidelines, not yet verified by an
independent person; a human second round on 150 types is prepared (`annotation/`) and
will be published with Cohen’s κ.
- **Rare roles.** client (14) and event (6) are too few for firm per-role figures.
- **Scope.** Java, Maven, Spring-family projects; most come from the Chinese
open-source ecosystem, so naming conventions (`*DO`, `*Ctl`, `*VO`) lean that way.
- **History.** “Modified” is per file, formatting-only changes included; one project’s
history was too short and is left out.
## Licence and attribution
Data and documentation: [CC BY 4.0](LICENSE-DATA.txt). Scripts: MIT ([LICENSE](LICENSE)).
The identifiers come from the projects listed in [ATTRIBUTION.md](ATTRIBUTION.md), each
under its own licence; no source code is included.
## Citation
```bibtex
@dataset{modulemap_bench_2026,
author = {{RSA Global Tech}},
title = {ModuleMap-Bench: architectural roles of Java classes and next-change visibility in Spring and Camunda projects},
year = {2026},
version = {1.0.0},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/alejandrosalastexido/ModuleMap-Bench}
}
```
|