Download ANNOTATION_GUIDELINES.md from alejandrosalastexido/ModuleMap-Bench: direct link, hf CLI and curl.
- Browser
- Download file 5.12 kB
-
https://huggingface.co/datasets/alejandrosalastexido/ModuleMap-Bench/resolve/main/ANNOTATION_GUIDELINES.md
- Command line
-
hf download hf://datasets/alejandrosalastexido/ModuleMap-Bench/ANNOTATION_GUIDELINES.md
-
curl -L -o ANNOTATION_GUIDELINES.md https://huggingface.co/datasets/alejandrosalastexido/ModuleMap-Bench/resolve/main/ANNOTATION_GUIDELINES.md
Annotation guidelines
These are the rules the role labels of ModuleMap-Bench follow. A second annotator
uses them unchanged (see annotation/README.md).
1. Unit
One top-level Java type — class, abstract class, interface, enum, record or
annotation — declared in a Maven module’s src/main/java, at the commit given
for its project. Nested types belong to their outer type. Test code is out of
scope.
2. What to decide
Exactly one role: what the type does when the application runs. Choose
from the eight values below. Decide from the source file at the given commit;
you may open other files of the repository (its supertypes, its users, the
pom.xml). Never look at the output of a tool that assigns roles,
agentkit included.
Write a short note whenever the decision is not obvious, and name the runner-up when there is one (“could be read as persistence”).
Who uses a type — another module importing it, two classes implementing it —
is not labelled: it is a structural fact, computed and published beside
the label (structure.imported_by, structure.implementations,
structure.derived_marks).
3. Roles
| Role | The type… | Typical forms | Not this role |
|---|---|---|---|
entry |
is invoked by a framework as the start of a unit of work from outside the application code | @RestController/@Controller with at least one request mapping; message listeners (@KafkaListener, @RabbitListener, @JmsListener, RocketMQ, Redis Stream); scheduled jobs (@Scheduled, Quartz/xxl-job handlers); @EventListener, ApplicationListener; workflow delegates and listeners (JavaDelegate, ExecutionListener, TaskListener, external-task handlers, Camunda 8 job workers); the @SpringBootApplication class |
@ControllerAdvice/@RestControllerAdvice exception handlers; servlet and gateway filters, interceptors; parse-time hooks; a controller with no mapping; LLM tool callbacks |
client |
calls another system over the network | Feign clients, Spring HTTP interfaces (@HttpExchange); a class whose main purpose is calling a remote HTTP API (RestTemplate, WebClient, OkHttpClient); readers/writers of a remote configuration store |
Feign fallbacks and fallback factories; clients of an in-process engine; storage adapters that write to the application’s own database (→ persistence) |
service |
holds business logic | @Service classes; service interfaces and facades (*Service, *Api) implemented by a service; components doing business work; message publishers |
thin framework adapters (→ none); utilities (→ none) |
domain |
is persisted business data | JPA entities, @Embeddable, @MappedSuperclass and base entities; MyBatis-Plus @TableName classes; Mongo @Documents; records stored in a configuration or rule store |
DTOs, VOs, request and response objects, non-persisted aggregates (→ none) |
persistence |
reads or writes the application’s data store | Spring Data repositories, MyBatis mappers, DAOs, classes upserting records | generator *Example criteria classes (→ none); Excel or object “mappers” that are converters (→ none) |
event |
is an event, not a handler | classes extending ApplicationEvent; event payload classes (*Event) that are not persisted |
persisted notifications (→ domain) |
config |
configures the application | @Configuration, @AutoConfiguration, @ConfigurationProperties |
@Components that validate settings or customise error output (→ none); plain value classes named *Config (→ none) |
none |
none of the above | DTOs, enums, constants, utilities, exceptions, annotations, interceptors and filters, framework SPI adapters, test bases shipped in main code |
4. When two roles seem to apply
- What it does at run time wins over what it is called. A
KongAdapterServicethat calls the Kong admin API is aclient; aJobRegistryHelperrunning registry logic on its own thread is aservice. - Being invoked by the framework wins. A
@Serviceor a@Configurationwhose main method is an@EventListeneris anentry. - Persisted data wins over event. A stored notification is
domain. - An abstract base takes the role of what its subclasses are, when all of
them are one thing (an abstract stream listener is an
entry). - An interface takes the role of its implementations when they agree
(a service interface is a
service), and isnonewhen it has no implementation and no other evidence. - Still undecided: pick the closer role and say so in the note.
5. Quality
- Each project’s types were sampled from its files only (stratified by the last word of the type name), so the labels do not depend on any tool.
- Round 1: one pass by an LLM coding assistant following these rules, 2026-11-08, all 620 labels; notes record every non-obvious decision.
- Round 2: an independent annotator labels a blinded sample of 150
(
annotation/round-2/sample.csv); agreement is reported as Cohen’s κ.