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

08/24/2023
by   Kisub Kim, et al.
0

Proper naming of methods can make program code easier to understand, and thus enhance software maintainability. Yet, developers may use inconsistent names due to poor communication or a lack of familiarity with conventions within the software development lifecycle. To address this issue, much research effort has been invested into building automatic tools that can check for method name inconsistency and recommend consistent names. However, existing datasets generally do not provide precise details about why a method name was deemed improper and required to be changed. Such information can give useful hints on how to improve the recommendation of adequate method names. Accordingly, we construct a sample method-naming benchmark, ReName4J, by matching name changes with code reviews. We then present an empirical study on how state-of-the-art techniques perform in detecting or recommending consistent and inconsistent method names based on ReName4J. The main purpose of the study is to reveal a different perspective based on reviewed names rather than proposing a complete benchmark. We find that the existing techniques underperform on our review-driven benchmark, both in inconsistent checking and the recommendation. We further identify potential biases in the evaluation of existing techniques, which future research should consider thoroughly.

READ FULL TEXT

page 12

page 14

research
02/28/2022

Understanding Digits in Identifier Names: An Exploratory Study

Before any software maintenance can occur, developers must read the iden...
research
05/11/2020

A Pattern-based Approach to Detect and Improve Non-descriptive Test Names

Unit tests are an important artifact that supports the software developm...
research
01/21/2022

An empirical study on Java method name suggestion: are we there yet?

A large-scale evaluation for current naming approaches substantiates tha...
research
08/25/2021

Recommending Extract Method Refactoring Based on Confidence of Predicted Method Name

Refactoring is an important activity that is frequently performed in sof...
research
06/21/2018

An empirical study on the names of points of interest and their changes with geographic distance

While Points Of Interest (POIs), such as restaurants, hotels, and barber...
research
02/27/2021

A Context-based Automated Approach for Method Name Consistency Checking and Suggestion

Misleading method names in software projects can confuse developers, whi...
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 ...

Please sign up or login with your details

Forgot password? Click here to reset