MFP-EnNaTrans: an associative feature enhancement and method name bootstrapping model for multisource pointer code annotation generation
摘要
Automatic code annotation generation is an important research direction at the intersection of software engineering and natural language processing, aiming at automatically generating high-quality natural language descriptions for source code, helping developers understand the code functions, and improving the efficiency of software maintenance. Aiming at the problems of insufficient ability to characterize source code and neglecting the important semantics of source code method names, this paper proposes MFP-EnNaTrans, a multi-source pointer code annotation generation method guided by associative feature enhancement and method names, which improves the model’s understanding of code semantics through associative feature enhancement and the introduction of method name information, and at the same time, designs a multi-source pointer annotation generator to improve the model’s expressive capability, and establish method name-guided annotation generation. Experiments are conducted on two public datasets, and the results show that, compared with the existing methods, the model proposed in this paper achieves the best performance in BLEU, METEOR, and ROUGE-L metrics, with the highest enhancement of 1.97%, 3.07%, and 3.13% over the best baseline, respectively, which verifies the effectiveness of the method.