How cuboulder-se-research/move-method-assist works
MM-Assist is an IntelliJ plugin that uses language models to identify misplaced Java methods and IntelliJ refactoring machinery to apply moves. Its primary workflow starts with an IDE context action, presents ranked suggestions, and lets the developer execute selected refactorings; the README documents that user path. The repository also contains Python tooling for processing refactoring data and evaluating accuracy. Some runtime connections are not visible in the sampled excerpts, so those links are omitted rather than inferred.
Main entry points: ApplyMoveMethodInteractiveIntention.kt Move-method action · RefactoringSuggestionsPanel.kt Suggestion panel · RefAgentSettingsManager.kt Model settings · MoveMethodRefactoringPrompt.kt Move-method prompts
Components 22
IDE plugin
- Move-method action
src/main/kotlin/com/intellij/ml/llm/template/intentions/ApplyMoveMethodInteractiveIntention.kt - Other refactoring actions
src/main/kotlin/com/intellij/ml/llm/template/intentions - Suggestion panel
src/main/kotlin/com/intellij/ml/llm/template/ui/RefactoringSuggestionsPanel.kt - Model settings
src/main/kotlin/com/intellij/ml/llm/template/settings/RefAgentSettingsManager.kt
LLM suggestions
- Move-method prompts
src/main/kotlin/com/intellij/ml/llm/template/prompts/MoveMethodRefactoringPrompt.kt - Refactoring prompts
src/main/kotlin/com/intellij/ml/llm/template/prompts/SuggestRefactoringPrompt.kt - LLM request provider
src/main/kotlin/com/intellij/ml/llm/template/models/LLMRequestProvider.kt - OpenAI requests
src/main/kotlin/com/intellij/ml/llm/template/models/openai/OpenAIRequests.kt - Model services
src/main/kotlin/com/intellij/ml/llm/template/models
Refactoring engine
- Refactoring factories
src/main/kotlin/com/intellij/ml/llm/template/refactoringobjects/MyRefactoringFactory.kt - Move-method factory
src/main/kotlin/com/intellij/ml/llm/template/refactoringobjects/movemethod/MoveMethodFactory.kt - Move-method handler
src/main/kotlin/com/intellij/ml/llm/template/refactoringobjects/movemethod/MoveInstanceMethodHandlerForPlugin.kt - Refactoring candidates
src/main/kotlin/com/intellij/ml/llm/template/refactoringobjects/AbstractRefactoring.kt - Code transformation
src/main/kotlin/com/intellij/ml/llm/template/utils/CodeTransformer.kt - Java PSI utilities
src/main/kotlin/com/intellij/ml/llm/template/utils/PsiUtils.kt
Telemetry and logs
- Telemetry data
src/main/kotlin/com/intellij/ml/llm/template/telemetry/TelemetryDataObserver.kt - Assistant logs
src/main/kotlin/com/intellij/ml/llm/template/toolwindow/AgentLogsWindow.kt
Data analysis
- Refactoring analysis
src/main/python/mm_analyser - Move-data validation
src/main/python/mm_analyser/refactoring_miner_processing/filter/ExtractMoveMethodValidator.py - Accuracy evaluation
src/main/python/mm_analyser/refactoring_miner_processing/compute_accuracy.py
Other components
- Developer
- Local telemetry files
Connections 19
- Developer → Move-method action: triggers
README.md - Move-method action → Suggestion panel: shows suggestions
src/main/kotlin/com/intellij/ml/llm/template/intentions/ApplyMoveMethodInteractiveIntention.kt - Developer → Suggestion panel: selects and applies
README.md - Move-method action → Move-method prompts: uses prompt
src/main/kotlin/com/intellij/ml/llm/template/intentions/ApplyMoveMethodInteractiveIntention.kt - Move-method action → Move-method factory: creates candidates
src/main/kotlin/com/intellij/ml/llm/template/intentions/ApplyMoveMethodInteractiveIntention.kt - Move-method action → Model settings: reads settings
src/main/kotlin/com/intellij/ml/llm/template/intentions/ApplyMoveMethodInteractiveIntention.kt - Move-method prompts → Move-method action: names action types
src/main/kotlin/com/intellij/ml/llm/template/prompts/MoveMethodRefactoringPrompt.kt - LLM request provider → OpenAI requests: creates requests
src/main/kotlin/com/intellij/ml/llm/template/models/LLMRequestProvider.kt - Model settings → Model services: selects model
src/main/kotlin/com/intellij/ml/llm/template/settings/RefAgentSettingsManager.kt - Suggestion panel → Code transformation: applies candidate
src/main/kotlin/com/intellij/ml/llm/template/ui/RefactoringSuggestionsPanel.kt - Suggestion panel → Refactoring candidates: renders candidates
src/main/kotlin/com/intellij/ml/llm/template/ui/RefactoringSuggestionsPanel.kt - Refactoring factories → Refactoring candidates: creates refactorings
src/main/kotlin/com/intellij/ml/llm/template/refactoringobjects/MyRefactoringFactory.kt - Move-method factory → Move-method handler: delegates move
src/main/kotlin/com/intellij/ml/llm/template/refactoringobjects/movemethod/MoveMethodFactory.kt - Move-method action → LLM request provider: requests suggestions
- Move-method action → Telemetry data: records outcomes
src/main/kotlin/com/intellij/ml/llm/template/intentions/ApplyMoveMethodInteractiveIntention.kt - Telemetry data → Local telemetry files: stores locally
README.md - Developer → Assistant logs: opens logs
README.md - Refactoring analysis → Move-data validation: includes validator
src/main/python/mm_analyser/refactoring_miner_processing/compute_accuracy_emm.py - Accuracy evaluation → Move-data validation: uses move references
src/main/python/mm_analyser/refactoring_miner_processing/compute_accuracy.py