analyze_data_flow
Analyze data flow within Java methods to identify variable usage patterns, side effects, and dependencies for method extraction and refactoring.
Instructions
Analyze data flow within a method.
USAGE: analyze_data_flow(filePath="path/to/File.java", line=10, column=5) OUTPUT: Variables with read/write/declaration info
Reports for each variable:
name and type
whether it is declared, read, written
whether it is a parameter, local variable, or field
return statement count and types
Useful for understanding side effects before extracting methods.
Requires load_project to be called first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | File containing the method | |
| line | Yes | Zero-based line number within the method | |
| column | Yes | Zero-based column number |