Article (Scientific journals)
Pre-implementation Method Name Prediction for Object-oriented Programming
Wang, Shangwen; Wen, Ming; Lin, Bo et al.
2023In ACM Transactions on Software Engineering and Methodology, 32 (6), p. 1-35
Peer Reviewed verified by ORBi
 

Files


Full Text
TOSEM-23.pdf
Author postprint (1.26 MB)
Download

All documents in ORBilu are protected by a user license.

Send to



Details



Keywords :
Method name prediction; naming convention; Automated tool support; Development tasks; Empirical analysis; Large-scales; Method implementations; Naming convention; Objectoriented programming (OOP); Real world projects; Research efforts; Software
Abstract :
[en] Method naming is a challenging development task in object-oriented programming. In recent years, several research efforts have been undertaken to provide automated tool support for assisting developers in this task. In general, literature approaches assume the availability of method implementation to infer its name. Methods, however, are usually named before their implementations. In this work, we fill the gap in the literature about method name prediction by developing an approach that predicts the names of all methods to be implemented within a class. Our work considers the class name as the input: The overall intuition is that classes with semantically similar names tend to provide similar functionalities, and hence similar method names. We first conduct a large-scale empirical analysis on 258K+ classes from real-world projects to validate our hypotheses. Then, we propose a hybrid big code-driven approach, Mario, to predict method names based on the class name: We combine a deep learning model with heuristics summarized from code analysis. Extensive experiments on 22K+ classes yielded promising results: compared to the state-of-the-art code2seq model (which leverages method implementation data), our approach achieves comparable results in terms of F-score at token-level prediction; our approach, additionally, outperforms code2seq in prediction at the name level. We further show that our approach significantly outperforms several other baselines.
Research center :
Interdisciplinary Centre for Security, Reliability and Trust (SnT) > TruX - Trustworthy Software Engineering
Disciplines :
Computer science
Author, co-author :
Wang, Shangwen ;  Key Laboratory of Software Engineering for Complex Systems, College of Computer Science, National University of Defense Technology, Changsha, China
Wen, Ming ;  School of Cyber Science and Engineering, Huazhong University of Science and Technology, Wuhan, China
Lin, Bo ;  Key Laboratory of Software Engineering for Complex Systems, College of Computer Science, National University of Defense Technology, Changsha, China
Liu, Yepang ;  Research Institute of Trustworthy Autonoumous Systems and Department of Computer Science and Engineering, Southern University of Science and Technology, Shenzhen, China
BISSYANDE, Tegawendé François d Assise  ;  University of Luxembourg > Interdisciplinary Centre for Security, Reliability and Trust (SNT) > TruX
Mao, Xiaoguang ;  Key Laboratory of Software Engineering for Complex Systems, College of Computer Science, National University of Defense Technology, Changsha, China
External co-authors :
yes
Language :
English
Title :
Pre-implementation Method Name Prediction for Object-oriented Programming
Publication date :
29 September 2023
Journal title :
ACM Transactions on Software Engineering and Methodology
ISSN :
1049-331X
Publisher :
Association for Computing Machinery
Volume :
32
Issue :
6
Pages :
1-35
Peer reviewed :
Peer Reviewed verified by ORBi
European Projects :
H2020 - 949014 - NATURAL - Natural Program Repair
Name of the research project :
R-AGR-3885 - H2020-ERC StG - NATURAL - BISSYANDE Tegawendé
Funders :
ERC - European Research Council
European Union
Funding number :
949014
Funding text :
This work was supported by the National Natural Science Foundation of China, Nos. 62002125 and 61932021, the Young Elite Scientists Sponsorship Program by CAST (Grant No. 2021QNRC001), and the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No. 949014).
Available on ORBilu :
since 10 December 2024

Statistics


Number of views
94 (1 by Unilu)
Number of downloads
37 (0 by Unilu)

Scopus citations®
 
4
Scopus citations®
without self-citations
2
OpenCitations
 
0
OpenAlex citations
 
6
WoS citations
 
2

Bibliography


Similar publications



Contact ORBilu