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 条
  • [41] STRONG UNDERRELAXATION IN KACZMARZS METHOD FOR INCONSISTENT SYSTEMS
    CENSOR, Y
    EGGERMONT, PPB
    GORDON, D
    NUMERISCHE MATHEMATIK, 1983, 41 (01) : 83 - 92
  • [42] DETECTION OF RESISTANCE SPOT WELDING FAULTS IN COPPER MATERIALS BY TRANSFER LEARNING METHOD
    Seker, H. I.
    Kacar, S.
    Castillo, O.
    Uzun, S.
    Pehlivan, I.
    Tatli, Z.
    APPLIED AND COMPUTATIONAL MATHEMATICS, 2023, 22 (03) : 430 - 445
  • [43] Spot the differences Game: An Interactive Method That Engage Students in Organic Chemistry Learning
    Cha, Jeongho
    Kan, Su-Yin
    Chia, Poh Wai
    JOURNAL OF THE KOREAN CHEMICAL SOCIETY-DAEHAN HWAHAK HOE JEE, 2018, 62 (02): : 159 - 165
  • [44] HEAT SPOT DETECTION METHOD OF PHOTOVOLTAIC INFRARED IMAGE BASED ON DEEP LEARNING
    Niu, Xiaoyu
    Liu, Changliang
    Liu, Weiliang
    Liu, Shuai
    Wang, Xin
    Kang, Jiayao
    Taiyangneng Xuebao/Acta Energiae Solaris Sinica, 45 (11): : 272 - 283
  • [45] Many names of the Trefftz method
    Kolodziej, Jan Adam
    Grabski, Jakub Krzysztof
    ENGINEERING ANALYSIS WITH BOUNDARY ELEMENTS, 2018, 96 : 169 - 178
  • [46] INCONSISTENT COMMUNICATION - A SIMPLIFIED METHOD FOR SELECTING MESSAGES
    JOHNSON, S
    JACOB, T
    JOURNAL OF PSYCHOPATHOLOGY AND BEHAVIORAL ASSESSMENT, 1989, 11 (03) : 261 - 268
  • [47] On Motzkin’s method for inconsistent linear systems
    Jamie Haddock
    Deanna Needell
    BIT Numerical Mathematics, 2019, 59 : 387 - 401
  • [48] Comparative Analysis of Mikado Method Approach to Refactor Legacy Code to Common Approach in Software Quality Measuring
    Susanto, Hansel
    Alexander, Kelvin
    Sanjaya, Louis Vincent
    Gunawan, Alexander Agung Santoso
    SOFTWARE ENGINEERING PERSPECTIVES IN SYSTEMS, VOL. 1, 2022, 501 : 402 - 412
  • [49] The Learning and Generalization of Contrasts Consistent or Inconsistent with Native Biases
    Moon, Kyuwon
    Sumner, Meghan
    14TH ANNUAL CONFERENCE OF THE INTERNATIONAL SPEECH COMMUNICATION ASSOCIATION (INTERSPEECH 2013), VOLS 1-5, 2013, : 2102 - 2106
  • [50] Ranking Diagnoses for Inconsistent Knowledge Graphs by Representation Learning
    Du, Jianfeng
    SEMANTIC TECHNOLOGY (JIST 2018), 2018, 11341 : 52 - 67