get_code_fragment
Extract a named class, method, or constructor body from a Java file using AST-accurate parsing, with fallback to regex or context window.
Instructions
Extract one named class/method/constructor body from a Java file.
Uses AST-accurate parsing when tree-sitter-java is installed, else a regex-based heuristic; falls back to a plain text-context window (match_type="context_window") if the symbol isn't a recognisable Java declaration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| path | Yes | ||
| repo | No | ||
| owner | No | ||
| symbol | Yes |