ModuleMap-Bench / schema /labels.schema.json
alejandrosalastexido's picture
ModuleMap-Bench 1.0.0
e00f999 verified
Raw History Blame Contribute Delete
2.84 kB
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ModuleMap-Bench role label (one line of data/roles/labels.jsonl)",
"type": "object",
"required": ["id", "project", "commit", "module", "path", "url", "qualified_name", "name", "kind", "role", "note", "structure"],
"properties": {
"id": { "type": "string", "description": "<project>/<qualified_name>" },
"project": { "type": "string" },
"commit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
"module": { "type": "string", "description": "The Maven module the type belongs to." },
"path": { "type": "string", "description": "File path from the repository root." },
"url": { "type": "string", "format": "uri", "description": "Permanent link to the file at the commit." },
"qualified_name": { "type": "string" },
"name": { "type": "string" },
"kind": { "enum": ["class", "abstract class", "interface", "enum", "record", "annotation"] },
"role": { "enum": ["entry", "client", "service", "domain", "persistence", "event", "config", "none"], "description": "The label: what the type does (ANNOTATION_GUIDELINES.md)." },
"note": { "type": ["string", "null"], "description": "Why, when the decision was not obvious." },
"structure": {
"type": "object",
"description": "Computed from the code, not labelled.",
"required": ["public", "annotations", "supertypes", "imported_by", "implementations", "used_within_module", "data_class", "framework_implemented", "derived_marks"],
"properties": {
"public": { "type": "boolean" },
"annotations": { "type": "array", "items": { "type": "string" }, "description": "Simple names of the type's own annotations." },
"supertypes": { "type": "array", "items": { "type": "string" }, "description": "Simple names it extends or implements." },
"imported_by": { "type": "array", "items": { "type": "object", "properties": { "module": { "type": "string" }, "count": { "type": "integer", "description": "Files of that module importing it." } } } },
"implementations": { "type": "integer", "description": "Types of the project that directly extend or implement it." },
"used_within_module": { "type": "integer", "description": "Types of its own module holding it in a field or constructor, or importing it." },
"data_class": { "type": "boolean", "description": "A record, or fields and accessors only." },
"framework_implemented": { "type": "boolean", "description": "An interface the project uses and never implements (a framework proxy)." },
"derived_marks": { "type": "array", "items": { "enum": ["api", "ext"] }, "description": "api: public, imported by another module, not in an internal/impl package. ext: interface or abstract class with 2+ implementations." }
}
}
}
}