IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v10y2022i21p3967-d953078.html
   My bibliography  Save this article

Pseudocode Generation from Source Code Using the BART Model

Author

Listed:
  • 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)

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.

Suggested Citation

  • Anas Alokla & Walaa Gad & Waleed Nazih & Mustafa Aref & Abdel-badeeh Salem, 2022. "Pseudocode Generation from Source Code Using the BART Model," Mathematics, MDPI, vol. 10(21), pages 1-14, October.
  • Handle: RePEc:gam:jmathe:v:10:y:2022:i:21:p:3967-:d:953078
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/10/21/3967/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/10/21/3967/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Anas Alokla & Walaa Gad & Waleed Nazih & Mustafa Aref & Abdel-Badeeh Salem, 2022. "Retrieval-Based Transformer Pseudocode Generation," Mathematics, MDPI, vol. 10(4), pages 1-16, February.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Robert Waszkowski & Grzegorz Bocewicz, 2022. "Visibility Matrix: Efficient User Interface Modelling for Low-Code Development Platforms," Sustainability, MDPI, vol. 14(13), pages 1-24, July.
    2. Jani Dugonik & Mirjam Sepesy Maučec & Domen Verber & Janez Brest, 2023. "Reduction of Neural Machine Translation Failures by Incorporating Statistical Machine Translation," Mathematics, MDPI, vol. 11(11), pages 1-22, May.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:10:y:2022:i:21:p:3967-:d:953078. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.