Intention is All You Need: Refining Your Code from Your Intention
Qi Guo, Xiaofei Xie, Shangqing Liu, Ming Hu, Xiaohong Li, and Lei Bu

TL;DR
This paper introduces an intention-based code refinement method that uses large language models to understand reviewer comments and generate improved code, significantly enhancing accuracy and efficiency in software development.
Contribution
It presents a novel two-phase approach combining intention extraction and guided code revision using LLMs, improving upon traditional comment-based code refinement methods.
Findings
Achieved 79% accuracy in intention extraction.
Revised code with up to 66% success rate.
Demonstrated effectiveness across five different LLMs.
Abstract
Code refinement aims to enhance existing code by addressing issues, refactoring, and optimizing to improve quality and meet specific requirements. As software projects scale in size and complexity, the traditional iterative exchange between reviewers and developers becomes increasingly burdensome. While recent deep learning techniques have been explored to accelerate this process, their performance remains limited, primarily due to challenges in accurately understanding reviewers' intents. This paper proposes an intention-based code refinement technique that enhances the conventional comment-to-code process by explicitly extracting reviewer intentions from the comments. Our approach consists of two key phases: Intention Extraction and Intention Guided Revision Generation. Intention Extraction categorizes comments using predefined templates, while Intention Guided Revision Generation…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Engineering Techniques and Practices · Topic Modeling
