EconPapers    
Economics at your fingertips  
 

Pseudocode Generation from Source Code Using the BART Model

Anas Alokla, Walaa Gad, Waleed Nazih (), Mustafa Aref and Abdel-badeeh Salem
Additional contact information
Anas Alokla: Faculty of Computers and Information Sciences, Ain Shams University, Abassia, Cairo 11566, Egypt
Walaa Gad: Faculty of Computers and Information Sciences, Ain Shams University, Abassia, Cairo 11566, Egypt
Waleed Nazih: College of Computer Engineering and Sciences, Prince Sattam Bin Abdulaziz University, Al Kharj 11942, Saudi Arabia
Mustafa Aref: Faculty of Computers and Information Sciences, Ain Shams University, Abassia, Cairo 11566, Egypt
Abdel-badeeh Salem: Faculty of Computers and Information Sciences, Ain Shams University, Abassia, Cairo 11566, Egypt

Mathematics, 2022, vol. 10, issue 21, 1-14

Abstract: In the software development process, more than one developer may work on developing the same program and bugs in the program may be fixed by a different developer; therefore, understanding the source code is an important issue. Pseudocode plays an important role in solving this problem, as it helps the developer to understand the source code. Recently, transformer-based pre-trained models achieved remarkable results in machine translation, which is similar to pseudocode generation. In this paper, we propose a novel automatic pseudocode generation from the source code based on a pre-trained Bidirectional and Auto-Regressive Transformer (BART) model. We fine-tuned two pre-trained BART models (i.e., large and base) using a dataset containing source code and its equivalent pseudocode. In addition, two benchmark datasets (i.e., Django and SPoC) were used to evaluate the proposed model. The proposed model based on the BART large model outperforms other state-of-the-art models in terms of BLEU measurement by 15% and 27% for Django and SPoC datasets, respectively.

Keywords: pseudocode generation; BERT; GPT; BART; natural language processing; neural machine translation (search for similar items in EconPapers)
JEL-codes: C (search for similar items in EconPapers)
Date: 2022
References: View references in EconPapers View complete reference list from CitEc
Citations:

Downloads: (external link)
https://www.mdpi.com/2227-7390/10/21/3967/pdf (application/pdf)
https://www.mdpi.com/2227-7390/10/21/3967/ (text/html)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:gam:jmathe:v:10:y:2022:i:21:p:3967-:d:953078

Access Statistics for this article

Mathematics is currently edited by Ms. Emma He

More articles in Mathematics from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().

 
Page updated 2025-03-19
Handle: RePEc:gam:jmathe:v:10:y:2022:i:21:p:3967-:d:953078