Learning to Spot and Refactor Inconsistent Method Names

被引:55
|
作者
Liu, Kui [1 ]
Kim, Dongsun [1 ]
Bissyande, Tegawende F. [1 ]
Kim, Taeyoung [2 ]
Kim, Kisub [1 ]
Koyuncu, Anil [1 ]
Kim, Suntae [2 ]
Le Traon, Yves [1 ]
机构
[1] Univ Luxembourg, Interdisciplinary Ctr Secur Reliabil & Trust SnT, Esch Sur Alzette, Luxembourg
[2] Chonbuk Natl Univ, Dept Software Engn, Jeonju, South Korea
关键词
SOURCE CODE;
D O I
10.1109/ICSE.2019.00019
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
To ensure code readability and facilitate software maintenance, program methods must be named properly. In particular, method names must be consistent with the corresponding method implementations. Debugging method names remains an important topic in the literature, where various approaches analyze commonalities among method names in a large dataset to detect inconsistent method names and suggest better ones. We note that the state-of-the-art does not analyze the implemented code itself to assess consistency. We thus propose a novel automated approach to debugging method names based on the analysis of consistency between method names and method code. The approach leverages deep feature representation techniques adapted to the nature of each artifact. Experimental results on over 2.1 million Java methods show that we can achieve up to 15 percentage points improvement over the state-of-the-art, establishing a record performance of 67.9% F1-measure in identifying inconsistent method names. We further demonstrate that our approach yields up to 25% accuracy in suggesting full names, while the state-of-the-art lags far behind at 1.1% accuracy. Finally, we report on our success in fixing 66 inconsistent method names in a live study on projects in the wild.
引用
收藏
页码:1 / 12
页数:12
相关论文
共 50 条
  • [31] Inconsistent NDVI trends from AVHRR, MODIS, and SPOT sensors in the Tibetan Plateau
    Yu, Zhen
    Wang, Jingxin
    Liu, Shirong
    Sun, Pengsen
    Liu, Weiguo
    2013 SECOND INTERNATIONAL CONFERENCE ON AGRO-GEOINFORMATICS (AGRO-GEOINFORMATICS), 2013, : 97 - 101
  • [32] MORE ON LEARNING STUDENTS NAMES
    WILLIAMS, R
    EDUCATION, 1974, 95 (01): : 16 - 17
  • [33] Culturally inconsistent spatial structure reduces learning
    McCrink, Koleen
    Shaki, Samuel
    ACTA PSYCHOLOGICA, 2016, 169 : 20 - 26
  • [34] Quantifying Learning Guarantees for Convex but Inconsistent Surrogates
    Struminsky, Kirill
    Lacoste-Julien, Simon
    Osokin, Anton
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 31 (NIPS 2018), 2018, 31
  • [35] A Deep Learning Based Fast-Flux and CDN Domain Names Recognition Method
    Chen, Xunxun
    Li, Gaochao
    Zhang, Yongzheng
    Wu, Xiao
    Tian, Changbo
    PROCEEDINGS OF THE 2ND INTERNATIONAL CONFERENCE ON INFORMATION SCIENCE AND SYSTEMS (ICISS 2019), 2019, : 54 - 59
  • [36] Inconsistent transliteration of Iranian university names: a hazard to Iran’s ranking in ISI Web of Science
    Mohammad Reza Falahati Qadimi Fumani
    Marzieh Goltaji
    Pardis Parto
    Scientometrics, 2013, 95 : 371 - 384
  • [37] Metacognition About Collaborative Learning: Students' Beliefs Are Inconsistent with Their Learning Preferences
    Wei, Yunfeng
    Soderstrom, Nicholas C.
    Meade, Michelle L.
    Scott, Brandon G.
    BEHAVIORAL SCIENCES, 2024, 14 (11)
  • [38] How we refactor and how we document it? On the use of supervised machine learning algorithms to classify refactoring documentation
    AlOmar, Eman Abdullah
    Peruma, Anthony
    Mkaouer, Mohamed Wiem
    Newman, Christian
    Ouni, Ali
    Kessentini, Marouane
    EXPERT SYSTEMS WITH APPLICATIONS, 2021, 167 (167)
  • [39] Inconsistent transliteration of Iranian university names: a hazard to Iran's ranking in ISI Web of Science
    Fumani, Mohammad Reza Falahati Qadimi
    Goltaji, Marzieh
    Parto, Pardis
    SCIENTOMETRICS, 2013, 95 (01) : 371 - 384
  • [40] On Motzkin's method for inconsistent linear systems
    Haddock, Jamie
    Needell, Deanna
    BIT NUMERICAL MATHEMATICS, 2019, 59 (02) : 387 - 401