Title
A Neural Model for Method Name Generation from Functional Description
Abstract
The names of software artifacts, e.g., method names, are important for software understanding and maintenance, as good names can help developers easily understand others’ code. However, the existing naming guidelines are difficult for developers, especially novices, to come up with meaningful, concise and compact names for the variables, methods, classes and files. With the popularity of open source, an enormous amount of project source code can be accessed, and the exhaustiveness and instability of manually naming methods could now be relieved by automatically learning a naming model from a large code repository. Nevertheless, building a comprehensive naming system is still challenging, due to the gap between natural language functional descriptions and method names. Specifically, there are three challenges: how to model the relationship between the functional descriptions and formal method names, how to handle the explosion of vocabulary when dealing with large repositories, and how to leverage the knowledge learned from large repositories to a specific project. To answer these questions, we propose a neural network to directly generate readable method names from natural language description. The proposed method is built upon the encoder-decoder framework with the attention and copying mechanisms. Our experiments show that our method can generate meaningful and accurate method names and achieve significant improvement over the state-of-the-art baseline models. We also address the cold-start problem using a training trick to utilize big data in Github for specific projects.
Year
DOI
Venue
2019
10.1109/SANER.2019.8667994
2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER)
Keywords
Field
DocType
Natural languages,Decoding,Task analysis,Software,Training,Predictive models,Computational modeling
Codebase,Information retrieval,Source code,Computer science,Copying,Software,Natural language,Formal methods,Big data,Vocabulary
Conference
ISBN
Citations 
PageRank 
978-1-7281-0591-8
5
0.40
References 
Authors
0
6
Name
Order
Citations
PageRank
Sa Gao1261.06
Chunyang Chen230522.76
Zhenchang Xing3138787.95
Yukun Ma4181.93
Wen Song584.17
Shangwei Lin636837.73