Recommending Extract Method Refactoring Based on Confidence of Predicted Method Name
Jinto Yamanaka, Yasuhiro Hayase, Toshiyuki Amagasa

TL;DR
This paper introduces a novel approach for recommending Extract Method refactoring by leveraging the confidence of predicted method names, improving recommendation accuracy over existing metric-based techniques.
Contribution
It proposes using the confidence scores from code2seq for semantic coherence to enhance Extract Method recommendation accuracy.
Findings
Higher correctness of recommendations compared to existing techniques
Effective use of method name prediction confidence for refactoring
Improved semantic coherence in extracted code fragments
Abstract
Refactoring is an important activity that is frequently performed in software development, and among them, Extract Method is known to be one of the most frequently performed refactorings. The existing techniques for recommending Extract Method refactoring calculate metrics from the source method and the code fragments to be extracted to order the recommendation candidates. This paper proposes a new technique for accurately recommending Extract Method refactoring by considering whether code fragments are semantically coherent chunks that can be given clear method names, in addition to the metrics used in previous studies. As a criterion for the semantic coherency, the proposed technique employs the probability (i.e. confidence) of the predicted method names for the code fragments output by code2seq, which is a state-of-the-art method name prediction technique. The evaluation experiment…
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 Reliability and Analysis Research · Software Testing and Debugging Techniques
