Recommending Extract Method Refactoring Based on Confidence of Predicted Method Name

08/25/2021
by   Jinto Yamanaka, et al.
0

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 confirmed that the proposed technique has higher correctness of recommendation than the existing techniques.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/12/2019

Mercem: Method Name Recommendation Based on Call Graph Embedding

Comprehensibility of source code is strongly affected by identifier name...
research
08/24/2023

How are We Detecting Inconsistent Method Names? An Empirical Study from Code Review Perspective

Proper naming of methods can make program code easier to understand, and...
research
10/03/2021

Towards Informative Tagging of Code Fragments to Support the Investigation of Code Clones

Investigating the code fragments of code clones detected by code clone d...
research
02/07/2023

Just-in-Time Code Duplicates Extraction

Refactoring is a critical task in software maintenance, and is usually p...
research
01/24/2022

A Two-phase Recommendation Framework for Consistent Java Method Names

In software engineering (SE) tasks, the naming approach is so important ...
research
01/20/2022

Evaluating the Performance of Clone Detection Tools in Detecting Cloned Co-change Candidates

Co-change candidates are the group of code fragments that require a chan...
research
12/03/2014

Ceramics Fragments Digitization by Photogrammetry, Reconstructions and Applications

This paper presents an application of photogrammetry on ceramic fragment...

Please sign up or login with your details

Forgot password? Click here to reset