Source Write-back¶
The -apply-tags modifier instructs MethodAtlas to insert AI-generated
@DisplayName and @Tag annotations directly into the scanned .java source
files, instead of writing a CSV report.
It can be combined with API AI enrichment or with the Manual AI workflow consume phase.
With API AI enrichment¶
With Manual AI workflow¶
What gets written¶
Only test methods classified as security-relevant receive new annotations. For each such method MethodAtlas inserts:
@DisplayName("...")with the AI-suggested display name as the value.- One or more
@Tag("...")annotations for each taxonomy tag returned by the AI.
Annotations are inserted using JavaParser's lexical-preserving printer, which preserves the original formatting of all surrounding code, including whitespace, comments, and import ordering. Existing annotations on the same method are not modified or removed.
Summary output¶
After the run, a summary line is printed to standard output:
No CSV is produced.
Modifies source files in place
-apply-tags edits .java files directly. There is no dry-run mode.
Commit or back up your work before running.
Reviewing changes¶
After write-back, inspect the diff before committing:
AI-generated annotations are a starting point. Review the suggested @DisplayName
values and @Tag assignments for accuracy before merging them into the main
branch.
See AI Enrichment — apply-tags workflow for annotation placement guarantees and formatting details.