Keywords Guided Method Name Generation
Fan Ge, Li Kuang

TL;DR
This paper introduces a two-stage method name generation approach guided by keywords extracted from source code, improving accuracy over existing models by leveraging shared token information.
Contribution
It proposes a novel two-stage framework combining keyword extraction with guided name generation, enhancing method naming performance with a dual attention mechanism.
Findings
Outperforms state-of-the-art models by 1.5%-3.5% in ROUGE metrics.
Significantly improves ROUGE-1 score by 7.8% when shared tokens exist.
Demonstrates the effectiveness of keyword guidance in method name generation.
Abstract
High quality method names are descriptive and readable, which are helpful for code development and maintenance. The majority of recent research suggest method names based on the text summarization approach. They take the token sequence and abstract syntax tree of the source code as input, and generate method names through a powerful neural network based model. However, the tokens composing the method name are closely related to the entity name within its method implementation. Actually, high proportions of the tokens in method name can be found in its corresponding method implementation, which makes it possible for incorporating these common shared token information to improve the performance of method naming task. Inspired by this key observation, we propose a two-stage keywords guided method name generation approach to suggest method names. Specifically, we decompose the method naming…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Topic Modeling · Web Data Mining and Analysis
