ModuleMap-Bench / README.md
alejandrosalastexido's picture
ModuleMap-Bench 1.0.0
e00f999 verified
|
Raw History Blame Contribute Delete
8.37 kB
metadata
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

{
  "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

{
  "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, with a note for every non-obvious decision. A human second round is prepared; details in 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. Scripts: MIT (LICENSE). The identifiers come from the projects listed in ATTRIBUTION.md, each under its own licence; no source code is included.

Citation

@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}
}