mlsanityData to 7 Oct 2026

Deep Learning-Based Identification of Inconsistent Method Names: How Far Are We?

arXiv 2501.12617 ↗First posted 22 Jan 2025cs.SE cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

Concise and meaningful method names are crucial for program comprehension and maintenance. However, method names may become inconsistent with their corresponding implementations, causing confusion and errors. Several deep learning (DL)-based approaches have been proposed to identify such inconsistencies, with initial evaluations showing promising results. However, these evaluations typically use a balanced dataset, where the number of inconsistent and consistent names are equal. This setup, along with flawed dataset construction, leads to false positives, making reported performance less reliable in real-world scenarios, where most method names are consistent. In this paper, we present an empirical study that evaluates state-of-the-art DL-based methods for identifying inconsistent method names. We create a new benchmark by combining automatic identification from commit histories and manual developer inspections, reducing false positives. We evaluate five representative DL approaches (one retrieval-based and four generation-based) on this benchmark. Our results show that performance drops substantially when moving from the balanced dataset to the new benchmark. We further conduct quantitative and qualitative analyses to understand the strengths and weaknesses of the approaches. Retrieval-based methods perform well on simple methods and those with popular name sub-tokens but fail due to inefficient representation techniques. Generation-based methods struggle with inaccurate similarity calculations and immature name generation. Based on these findings, we propose improvements using contrastive learning and large language models (LLMs). Our study suggests that significant improvements are needed before these DL approaches can be effectively applied to real-world software systems.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 25 of its 85 references that are in the map. First posted on arXiv 22 Jan 2025.

Builds on

25 of 85 references.

References · 25

  1. 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
  2. 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
  3. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  4. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  5. 2014Distributed Representations of Sentences and Documentscited by 677
  6. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
  7. 2023Self-collaboration Code Generation via ChatGPTcited by 255
  8. 2018code2vec: Learning Distributed Representations of Codecited by 249
  9. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
  10. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
  11. 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
  12. 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 90
13 more
  1. 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
  2. 2021Randomness In Neural Network Training: Characterizing The Impact of Toolingcited by 57
  3. 2015On the "Naturalness" of Buggy Codecited by 35
  4. 2014Learning Natural Coding Conventionscited by 28
  5. 2021Towards Learning (Dis)-Similarity of Source Code from Program Contrastscited by 17
  6. 2023Can Large Language Models Find And Fix Vulnerable Software?cited by 14
  7. 2019Commit2Vec: Learning Distributed Representations of Code Changescited by 12
  8. 2021VarCLR: Variable Semantic Representation Pre-training via Contrastive Learningcited by 11
  9. 2022Learning to Recommend Method Names with Global Contextcited by 6
  10. 2020On the Generation, Structure, and Semantics of Grammar Patterns in Source Code Identifierscited by 5
  11. 2021A Context-based Automated Approach for Method Name Consistency Checking and Suggestioncited by 5
  12. 2021On the Naming of Methods: A Survey of Professional Developerscited by 4
  13. 2023How are We Detecting Inconsistent Method Names? An Empirical Study from Code Review Perspectivecited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.