Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bugsplainer: Leveraging Code Structures to Expl...

Masud Rahman
May 03, 2024
13

Bugsplainer: Leveraging Code Structures to Explain Software Bugs with Neural Machine Translation

Parvez Mahbub, M. Masudur Rahman, Ohiduzzaman Shuvo, Avinash Gopal. Bugsplainer: Leveraging Code Structures to Explain Software Bugs with Neural Machine Translation. In Proceeding of The 39th IEEE International Conference on Software Maintenance and Evolution (ICSME 2023), pp. 06, Bogota, Columbia, October 2023

Masud Rahman

May 03, 2024
Tweet

Transcript

  1. Bugsplainer: Leveraging Code Structures to Explain Software Bugs with Neural

    Machine Translation Parvez Mahbub Dalhousie University [email protected] Masud Rahman Dalhousie University [email protected] Ohiduzzaman Shuvo Dalhousie University [email protected] Avinas Gopal Metabob [email protected]
  2. We present Bugsplainer — a novel transformer- based generative model

    Can leverage code structures Trained using both buggy and fixed source code 3
  3. 4 In: Bug-fix Commit Generate diffSBT Discriminatory Pre-train diffSBT of

    Bug-free Nodes diffSBT of Buggy Nodes Fine-tune Commit Message Out: Fine- tuned Model In: Buggy Code Generate diffSBT Fine-tuned Model Out: Generated Explanation In: Line Numbers to Explain diffSBT How does it work? Training Bugsplainer Explanation Generation
  4. 5 A B C D E (A (B )B (C(D)D(E)E)C)A

    Structure-Based Traversal (SBT)
  5. Show me the explanation! Ground truth: Fix a bug where

    the lyricswiki fetcher would try to unescape an empty (None) response and crash CommitGen: Small bug fix for error handling NNGen: fix UnicodeDecodeError with non- ASCII text Fine-tuned CodeT5: Don’t try to get lyrics if we are licensed pyflakes: no error found Bugsplainer: fix crash when lyrics not found
  6. Bugsplainer meets ChatGPT 8 Ground truth: Fix a bug where

    the lyricswiki fetcher would try to unescape an empty (None) response and crash