Opening book details…
Can I read Together We Go Further: LLMs and IDE Static Analysis for Extract Method Refactoring on EtoBox?
Together We Go Further: LLMs and IDE Static Analysis for Extract Method Refactoring by Pomian, Dorin; Bellur, Abhiram; Dilhara, Malinda; Kurbatova, Zarina; Bogomolov, Egor; Bryksin, Timofey; Dig, Danny is a scholarly article available to read on EtoBox.
What is Together We Go Further: LLMs and IDE Static Analysis for Extract Method Refactoring about?
Long methods that encapsulate multiple responsibilities within a single method are challenging to maintain. Choosing which statements to extract into new methods has been the target of many research tools. Despite steady improvements, these tools often fail to generate refactorings that align with developers' preferences and acceptance criteria. Given that Large Language Models (LLMs) have been trained on large code corpora, if we harness their familiarity with the way developers form functions, we could suggest refactorings that developers are likely to accept. In this paper, we advance the science and practice of refactoring by synergistically combining the insights of LLMs with the power of IDEs to perform Extract Method (EM). Our formative study on 1752 EM scenarios revealed that LLMs are very effective for giving expert suggestions, yet they are unreliable: up to 76.3% of the suggestions are hallucinations. We designed a novel approach that removes hallucinations from the candidates suggested by LLMs, then further enhances and ranks suggestions based on static analysis techniques from program slicing, and finally leverages the IDE to execute refactorings correctly. We implemen
- Author
- Pomian, Dorin; Bellur, Abhiram; Dilhara, Malinda; Kurbatova, Zarina; Bogomolov, Egor; Bryksin, Timofey; Dig, Danny
- Published
- 2024
- Language
- EN