ModuleMap-Bench / README.md
alejandrosalastexido's picture
ModuleMap-Bench 2.0.1: the role suggester's result
464d9cd verified
|
Raw History Blame Contribute Delete
6.72 kB
---
pretty_name: ModuleMap-Bench
license: cc-by-4.0
language:
- en
tags:
- code
- java
- spring
- clean-architecture
- software-engineering
- architecture-recovery
- coding-agents
- benchmark
task_categories:
- text-classification
size_categories:
- 1K<n<10K
configs:
- config_name: types
data_files: data/types.jsonl
default: true
- config_name: families
data_files: data/families.jsonl
- config_name: weak
data_files: data/weak.jsonl
---
# ModuleMap-Bench 2.0.1
**Architectural roles of Java types in 30 open-source projects — Spring-layered and clean, hexagonal or domain-driven — split by project for honest evaluation.**
Each labelled type has one *role* — `entry`, `client`, `service`, `domain`, `persistence`,
`event`, `config` or `none` — usage *marks* (`api`, `ext`) where they were labelled, a one-sentence
rationale citing the line it rests on, and full provenance: repository, commit, licence, file,
annotator, guideline version, and how the label was settled.
## At a glance
| | |
|---|---|
| Labelled types | 2,566 in 30 projects (v1: 620 in 8) |
| Splits, by project | dev 1,487 · test 703 · suggester_holdout 261 · train 115 |
| Roles | none 1,111 · service 338 · entry 302 · domain 268 · persistence 240 · config 149 · client 86 · event 72 |
| Marks labelled | 1,493 rows (api 423 · ext 103) |
| Families | 849, with the majority role of their labelled members |
| Weak corpus | 1,096 types of 11 permissively licensed repositories, role from a vocabulary |
| Licences of the projects | Apache-2.0, MIT, MulanPSL-2.0 (each as found at the repository's root) |
| Content | identifiers, labels, rationales, computed features — **no source code** |
## Splits
Splits are by **project**, never by row, so no project is seen in two of them.
| Split | Projects | What it is for |
|---|---|---|
| `dev` | 19: the eight of v1, apollo, eladmin, jhipster-sample-app, library, litemall, operaton, spring-petclinic, spring-petclinic-microservices, cqrs-eventsourcing-kafka, DDDExample, authentication-microservice-with-domain-driven-design | developing rules and models; numbers from it are optimistic |
| `test` | 7, frozen: kadai, microcks, shopizer (Spring-layered); HexaStock, hexagonal_ddd, java-clean-architecture, ddd-example-ecommerce (clean) | the published role and ranking numbers, run once |
| `suggester_holdout` | 3: digiwf-core, lamp-cloud, microservices-platform | only the role suggester's gate |
| `train` | continew-admin (+ the weak corpus) | what a learned suggester may learn from, beside dev |
## How it was made
- **Sampling.** v1 types were drawn stratified by the last word of the name (`stratum: legacy`).
New projects: a uniform draw within each module, plus a recorded boost of rare roles and marks
(`stratum: random` or `boost:<signal>`); the clean-architecture projects are labelled whole
(`stratum: all`). Report numbers on the random part when comparing with other work.
- **Labelling.** Every label was produced by an LLM (Claude) reading the type's source and, where
the guide asks, its supertypes, subtypes and users in the same repository — never the output of
a tool that assigns roles — under [LABELING.md](LABELING.md) 2.1. New projects were labelled in
**two independent passes** with differently worded prompts and order (Cohen's κ between passes
0.953 and 0.948); where they agreed the label stands, where they did not, pass a was taken.
A second pass over the dev labels agreed with the first at κ 0.936.
- **Review.** The owner approved the new labels in bulk; **no person reviewed them row by row**,
so the label error rate is **not estimated**. `status` says how each label was settled.
## Results of agentkit's Map (for reference)
On `test` (703 types), agentkit's rules at commit `26e2309`: **76.7 %** right roles (Wilson 95 %
lower bound 73.4 %) — Spring-layered 74.6 %, clean architecture 79.2 %; macro recall without
`none` 67.5 %. The same rules before this round of work: 65.0 % (+11.7 points, paired bootstrap
[9.1, 14.4]); on clean architecture 54.6 → 79.2 %. On `dev` the rules reach 92.5 % — they were
written looking at it. Next-change visibility (share of the types a commit modifies that the Map
showed before it): on dev +3.2 points over an alphabetical list [1.9, 4.5]; on test +0.7, interval
containing zero.
Role suggester (proposes a role for families no rule names), trained on `dev` + `train` families
and this release's weak corpus: gradient boosting with conformal abstention, chosen leaving one
project out (Wilson lower bound 0.898 on 224 suggestions). On `suggester_holdout` it showed 43
suggestions right of 48 (89.6 %, lower bound 0.778) — fewer than the 50 the gate requires, so the
gate is not evaluated, and at that share it would not reach 0.90. This was the holdout's **second**
look: a model trained on 1.0's full weak corpus had shown 42 of 45 (93.3 %, lower bound 0.821).
## Limitations
- **LLM labels, not reviewed row by row.** Labels where the two passes disagreed (165 of the 703
test types) are noticeably harder: agentkit scores 63 % on them against 81 % on the agreed ones.
- **Rare roles.** client (86) and event (72) are still small; event in the random part of the new
projects is rarer still.
- **Families** carry the majority role of their labelled members, not a label of their own;
families overlap (a type can be in several).
- **Scope.** Java, Maven, Spring-family or framework-free code; many projects come from the
Chinese open-source ecosystem.
- **Weak corpus** roles come from agentkit's vocabulary, not from people; only repositories with
an MIT or Apache-2.0 licence are included (11 of the 33 the corpus was built from).
## Changes from 2.0.0
- The role suggester's result, from the model trained on this release's permissive weak corpus.
## Changes from 1.0.0
- 30 projects instead of 8; splits by project; marks labelled; provenance per row; families and
the weak corpus as configurations.
- Notes rewritten as one-sentence rationales citing a line; guide 2.1 replaces 1.1.
- Removed: BookStoreApp-Distributed-Application, buckpal, java-ddd-example (no licence), fineract
(Gradle), and agentkit's six reserved projects (evaluated once before this release).
- The history configuration of v1 (next-change visibility at agentkit's commit of 2026-11-10) is
not carried over: the harness that recomputes it is in the ModuleMap-Bench repository.
## Licence and attribution
Data and documentation: CC BY 4.0. Scripts: MIT. Identifiers come from the projects listed in
`data/types.jsonl` and `tools/weak_licences.json`, each under its own licence; no source code is
included.