ModuleMap-Bench / DATASHEET.md
alejandrosalastexido's picture
ModuleMap-Bench 1.0.0
e00f999 verified
|
Raw History Blame Contribute Delete
6.3 kB
# Datasheet for ModuleMap-Bench
Following *Datasheets for Datasets* (Gebru et al., 2021).
## Motivation
**Why was the dataset created?** To measure how well a tool can tell, from source
code alone, what each class of a Java/Spring project does — its architectural
role — and how well a short, generated overview of a module anticipates what a
developer changes next. Both questions arise when giving coding agents (LLM
assistants) the orientation they otherwise spend tokens searching for.
**Who created it and on whose behalf?** RSA Global Tech, while building
agentkit’s module Map. **Funding:** RSA Global Tech; no grant.
## Composition
**What do the instances represent?**
- *Role labels* (`data/roles/labels.jsonl`): one top-level Java type of an
open-source project at a fixed commit, with the role assigned to it in round 1
(eight values, see `ANNOTATION_GUIDELINES.md`), an optional note explaining the
decision, and structural facts computed from the code.
- *History* (`data/history/commits.jsonl`): one commit of a project’s history
that modifies main Java code, with the top-level types it modified and which
of them two baseline overviews showed before the commit.
- *Features* (`data/features/`): the numeric features of each labelled type and
of each group (“family”) of similar types, as agentkit’s role suggester uses them.
**How many instances?** 620 labelled types from 8 projects; see `README.md` for
the history size. Per role: entry 86, client 14, service 99, domain 53,
persistence 60, event 6, config 24, none 278.
**Is it a sample?** Yes. In each project, top-level types of the modules’
`src/main/java` were sampled, stratified by the last word of the type name
(`Controller`, `Mapper`, `DTO`…) with proportional allocation and a fixed hash
order — 70 types per project, 100 for the two largest. The sample was drawn from
the files only, never from a tool’s output. The history covers the last 50
non-merge, first-parent commits of each project that modify main Java code
(fewer where the history is shorter); commits that only add or delete files are
not counted.
**Labels / targets.** `role` is the target. `structure.*` and the history
baselines are computed, not judged.
**Missing information.** Notes are given only where the decision was not
obvious. Commit authors are deliberately not included.
**Relationships.** `id` = `<project>/<qualified name>` links labels, features
and agentkit’s predictions. `projects.csv` gives each project’s repository and
commit; every label carries a permanent link to its file.
**Recommended splits.** None for the labels: they are an evaluation set. For a
learned model, leave whole projects out (agentkit holds out `kiwi` and
`mall-swarm`, column `suggester_held_out`).
**Errors, noise, redundancy.** Round 1 is a single annotation pass, not yet checked
by a second annotator (see Collection);
some roles are rare (client 14, event 6), so per-role figures for them are
uncertain. The history counts a type as “modified” when its file is modified,
including formatting-only changes.
**Is it self-contained?** The labels and history are; to read the code, follow
the links to the original repositories at the given commits.
**Confidential or sensitive data?** No. Only identifiers (package, type and file
names), commit hashes and dates of public repositories. No source code, no
personal data; commit authors are omitted.
## Collection process
**How was the data acquired?** The eight repositories were cloned from GitHub
(their licences in `ATTRIBUTION.md`). Types were parsed as text, without
compiling. Labels were assigned by reading each type’s file at the commit, and
related files where needed, following `ANNOTATION_GUIDELINES.md`.
**Who was involved?** Round 1 was produced with an LLM coding assistant (Claude)
reading each type’s source files under these guidelines, for RSA Global Tech. It has
not yet been verified by an independent human annotator: a second round by a person,
on a blinded sample of 150 types, is prepared in `annotation/round-2/`, and its
agreement with round 1 (Cohen’s κ) will be published in the next version. Until then,
treat the labels as a carefully reasoned single pass, with notes for every non-obvious
decision.
**Time frame.** Labelled 2026-11-08; revised for the two-axis model and released
2026-11-10. Project commits date from 2025-01 to 2026-11.
**Ethical review.** Not applicable: public code, no human subjects.
## Preprocessing
The first labelling used one axis in which “used by other modules” (`api`) and
“has two or more implementations” (`ext`) were roles. For this release those 81
labels were reviewed again for the role the type actually plays, and usage
became computed facts (`structure.derived_marks`); 21 notes were rewritten
accordingly (`build/notes-revised.json`). A ninth project,
BookStoreApp-Distributed-Application, was labelled but is left out because its
repository has no licence.
The raw sources are the original repositories at the commits in `projects.csv`;
`build/build.js` regenerates every file from them and from agentkit.
## Uses
**Already used for:** evaluating and improving agentkit’s module Map (role
accuracy 77 % → 93 % on the same labels including the ninth project; next-change
visibility; the gate of its role suggester).
**Other uses:** benchmarking role or stereotype classifiers for Java, LLM-based
code-understanding prompts, architecture recovery, and context selection for
coding agents.
**Not suitable for:** conclusions about languages, build tools or architectures
other than Java/Maven/Spring; per-role claims for client and event without
more labels.
## Distribution
Published on Hugging Face Datasets (https://huggingface.co/datasets/alejandrosalastexido/ModuleMap-Bench); a Zenodo DOI and a Kaggle
mirror may follow. Data and documentation: **CC BY 4.0**; scripts: **MIT**. The
identifiers come from projects under Apache-2.0, MIT and Mulan PSL v2 — see
`ATTRIBUTION.md`.
## Maintenance
Maintained by RSA Global Tech. Errors and proposals in the Community tab of the
Hugging Face page.
New versions keep earlier ones on Zenodo; `CHANGELOG.md` lists the changes. The
next planned version adds the second annotator’s labels and agreement.