arrow
Return

An intelligent java method name recommendation framework via two-phase neural networks

delete2024-11-08
delete0
PRE
AI
W
Weidong Wang *
D
Dian Li
Y
Y. James Kang
Y
Yang Zhao
DOI:10.1007/s10664-024-10574-1delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
High-quality method names are very significant for us to understand programs and maintain software efficiently. Giving concise and consistent method names can help developers understand such programs well, especially for inexperienced participants. The importance of the naming strategy to software engineering (SE) has attracted researchers from all around the world who are seeking approaches to enhance the quality of method names. We solve this challenge by using a unique two-phase framework that enables us to recommend precise method names. The first phase involves gathering almost 8,000,000 Java methods from Github as three assessment datasets. We also offer a quick and easy classifier for classifying different categories of methods to improve the searching efficiency. Then, we use heuristic rules to recommend method names for simple method names prefixed with i.e., get-, set-, and is-. In the second phase, we take advantage of the deep learning network to recommend suitable method names for complex method bodies. The experimental findings show that our framework greatly outperforms well-known approaches. The precision of our framework reaches 62%\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\%$$\end{document}, outperforming traditional approaches by 2%\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\%$$\end{document} to 13%\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\%$$\end{document}.
Keywords:
Method name recommendation
Two-phase framework
Machine learning
Heuristics

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

B
Beijing University of Technology
Scholars:
2.8W
Papers: 2.1W
Citations: 2.7W