Code Annotation Automatic Generation Based on Structure Aware Dual Encoder

In the process of software development,code annotation tools with good performance can improve development efficiency and reduce maintenance costs.Some researchers regard the automatic generation of code annotation as a task that translates source code into natural language annotation.They only take...

Full description

Saved in:
Bibliographic Details
Published in:Ji suan ji gong cheng Vol. 46; no. 2; pp. 304 - 308,314
Main Author: XU Shaofeng, PAN Wentao, XIONG Yun, ZHU Yangyong
Format: Journal Article
Language:Chinese
English
Published: Editorial Office of Computer Engineering 01.02.2020
Subjects:
ISSN:1000-3428
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:In the process of software development,code annotation tools with good performance can improve development efficiency and reduce maintenance costs.Some researchers regard the automatic generation of code annotation as a task that translates source code into natural language annotation.They only take the sequence information of source code into consideration,while ignoring the internal structure characteristics of the code.Therefore,on the basis of the common end to end translation model,by using the code abstract syntax tree,the structure information of the source code is embedded into the encoder and decoder translation model,and a dual encoder and decoder model based on structure awareness is proposed,which comprehensively considers the sequence information of the source code and the structure features within the code.Experimental results on real datasets show that compared with the PBMT and Seq2seq models,the BLEU score of the proposed method is higher and the generated annotations are more accurate and readable.
ISSN:1000-3428
DOI:10.19678/j.issn.1000-3428.0053873