Review of method name recommendation
Abstract
In software engineering projects, method name recommendation is a critical task aimed at assisting developers in selecting appropriate method names to enhance code readability and maintainability. Given the significance of method name recommendation, numerous researchers have delved into improving the quality of method names. In this paper, we systematically review the existing method name recommendation techniques and conduct a comprehensive analysis of their principles, characteristics, and performance. Furthermore, we summarize the comparisons and evaluations among various methods to aid researchers in choosing method name recommendation techniques that suit their specific requirements. Lastly, we highlight the future research directions in this field. Through this review, readers will gain a clearer understanding of the current state of method name recommendation, providing valuable guidance for further research and development.
References
- Gethers M, Savage T, Di Penta M, et al. CodeTopics: which topic am I coding now?[C]//Proceedings of the 33rd International Conference on Software Engineering. 2011: 1034-1036.
- Jiang L, Liu H, Jiang H. Machine learning based recommendation of method names: How far are we[C]//2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 2019: 602-614.
- Gao Yuan, Liu Hui, Fan Xiaozhong, et al. Function name recommendation method based on code base and feature matching [J]. Journal of Software, 2015, 26(12): 3062-3074.
- Liu K, Kim D, Bissyandé T F, et al. Learning to spot and refactor inconsistent method names[C]//2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE). IEEE, 2019: 1-12.
- Yang Y, Xu L, Yan M, et al. A Naming Pattern Based Approach for Method Name Recommendation[C]//2022 IEEE 33rd International Symposium on Software Reliability Engineering (ISSRE). IEEE, 2022: 344-354.
- Alon U, Zilberstein M, Levy O, et al. A general path-based representation for predicting program properties[J]. ACM SIGPLAN Notices, 2018, 53(4): 404-419.
- Alon U, Zilberstein M, Levy O, et al. code2vec: Learning distributed representations of code[J]. Proceedings of the ACM on Programming Languages, 2019, 3(POPL): 1-29.
- Alon U, Brody S, Levy O, et al. code2seq: Generating sequences from structured representations of code[J]. arXiv preprint arXiv:1808.01400, 2018.
- Zügner D, Kirschstein T, Catasta M, et al. Language-agnostic representation learning of source code from structure and context[J]. ar**v preprint ar**v:2103.11318, 2021.
- Peng H, Li G, Wang W, et al. Integrating tree path in transformer for code representation[J]. Advances in Neural Information Processing Systems, 2021, 34: 9343-9354.
- Allamanis M, Barr E T, Bird C, et al. Suggesting accurate method and class names[C]//Proceedings of the 2015 10th joint meeting on foundations of software engineering. 2015: 38-49.
- Allamanis M, Peng H, Sutton C. A convolutional attention network for extreme summarization of source code[C]//International conference on machine learning. PMLR, 2016: 2091-2100.
- Parsa S, Zakeri-Nasrabadi M, Ekhtiarzadeh M, et al. Method name recommendation based on source code metrics[J]. Journal of Computer Languages, 2023, 74: 101177.
- Nguyen S, Phan H, Le T, et al. Suggesting natural method names to check name consistencies[C]//Proceedings of the acm/ieee 42nd international conference on software engineering. 2020: 1372-1384.
- Li Y, Wang S, Nguyen T. A context-based automated approach for method name consistency checking and suggestion[C]//2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE). IEEE, 2021: 574-586.
- Wang S, Wen M, Lin B, et al. Lightweight global and local contexts guided method name recommendation with prior knowledge[C]//Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 2021: 741-753.
- Liu F, Li G, Fu Z, et al. Learning to recommend method names with global context[C]//Proceedings of the 44th International Conference on Software Engineering. 2022: 1294-1306.
- Wang K, Su Z. Blended, precise semantic program embeddings[C]//Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation. 2020: 121-134.
- Yonai H, Hayase Y, Kitagawa H. Mercem: Method name recommendation based on call graph embedding[C]//2019 26th Asia-Pacific Software Engineering Conference (APSEC). IEEE, 2019: 134-141.
- Wang Y, Wang K, Gao F, et al. Learning semantic program embeddings with graph interval neural network[J]. Proceedings of the ACM on Programming Languages, 2020, 4(OOPSLA): 1-27.