Proceedings

Towards Generating Summaries for Lexically Confusing Code through Code Erosion

Download BibTeX Cite

Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence. Main Track. Pages 3721-3727.

https://doi.org/10.24963/ijcai.2021/512

© 2021 International Joint Conferences on Artificial Intelligence

Abstract

Code summarization aims to summarize code functionality as high-level nature language descriptions to assist in code comprehension. Recent approaches in this field mainly focus on generating summaries for code with precise identifier names, in which meaningful words can be found indicating code functionality. When faced with lexically confusing code, current approaches are likely to fail since the correlation between code lexical tokens and summaries is scarce. To tackle this problem, we propose a novel summarization framework named VECOS. VECOS introduces an erosion mechanism to conquer the model's reliance on precisely defined lexical information. To facilitate learning the eroded code's functionality, we force the representation of the eroded code to align with the representation of its original counterpart via variational inference. Experimental results show that our approach outperforms the state-of-the-art approaches to generate coherent and reliable summaries for various lexically confusing code.

  1. [Bahuleyan et al., 2018] Hareesh Bahuleyan, Lili Mou, Olga Vechtomova, and Pascal Poupart. Variational attention for sequence-to-sequence models. In Proceedings of the 27th International Conference on Computational Linguistics, pages 1672-1682, 2018.
  2. [Bavishi et al., 2018] Rohan Bavishi, Michael Pradel, and Koushik Sen. Context2name: A deep learning-based ap- proach to infer natural variable names from usage contexts. arXiv preprint arXiv:1809.05193, 2018.
  3. [Bowman et al., 2015] Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015.
  4. [Cho et al., 2014] Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
  5. [Deissenboeck and Pizka, 2006] Florian Deissenboeck and Markus Pizka. Concise and consistent naming. Software Quality Journal, 14(3):261-282, 2006.
  6. [Haiduc et al., 2010] Sonia Haiduc, Jairo Aponte, Laura Moreno, and Andrian Marcus. On the use of automated text summarization techniques for summarizing source code. In Proceedings of the 17th Working Conference on Reverse Engineering, pages 35-44. IEEE, 2010.
  7. [Hu et al., 2018] Xing Hu, Ge Li, Xin Xia, David Lo, and Zhi Jin. Deep code comment generation. In Proceedings of the 26th IEEE/ACM International Conference on Program Comprehension, pages 200-210. IEEE, 2018.
  8. [Husain et al., 2019] Hamel Husain, Ho-Hsiang Wu, Tiferet Gazit, Miltiadis Allamanis, and Marc Brockschmidt. Codesearchnet challenge: Evaluating the state of seman- tic code search. arXiv preprint arXiv:1909.09436, 2019.
  9. [Isozaki et al., 2010] Hideki Isozaki, Tsutomu Hirao, Kevin Duh, Katsuhito Sudoh, and Hajime Tsukada. Automatic evaluation of translation quality for distant language pairs. In Proceedings of the 14th Conference on Empirical Meth- ods in Natural Language Processing, pages 944-952, 2010.
  10. [Iyer et al., 2016] Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, and Luke Zettlemoyer. Summarizing source code using a neural attention model. In Proceedings of the 54th annual meeting of the Association for Computational Lin- guistics, pages 2073-2083, 2016.
  11. [Kingma and Welling, 2013] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
  12. [LeClair et al., 2019] Alexander LeClair, Siyuan Jiang, and Collin McMillan. A neural model for generating natural language summaries of program subroutines. In Proceed- ings of the 41st International Conference on Software En- gineering, pages 795-806. IEEE, 2019. [Moreno et al., 2013]
  13. Laura Moreno, Jairo Aponte, Giriprasad Sridhara, Andrian Marcus, Lori Pollock, and K Vijay-Shanker. Automatic generation of natural language summaries for java classes. In Proceedings of the 21st IEEE/ACM International Conference on Program Comprehension, pages 23-32. IEEE, 2013.
  14. [Papineni et al., 2002] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: A method for au- tomatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Compu- tational Linguistics, pages 311-318, 2002.
  15. [Pennington et al., 2014] Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vec- tors for word representation. In Proceedings of the 19th Conference on Empirical Methods in Natural Language Processing, pages 1532-1543, 2014.
  16. [Serban et al., 2017] Iulian Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron Courville, and Yoshua Bengio. A hierarchical latent vari- able encoder-decoder model for generating dialogues. In Proceedings of the 31st AAAI Conference on Artificial In- telligence, volume 31, 2017.
  17. [Tai et al., 2015] Kai Sheng Tai, Richard Socher, and Christopher D Manning. Improved semantic representa- tions from tree-structured long short-term memory net- works. arXiv preprint arXiv:1503.00075, 2015.
  18. [Tran et al., 2019] Hieu Tran, Ngoc Tran, Son Nguyen, Hoan Nguyen, and Tien N Nguyen. Recovering variable names for minified code with usage contexts. In Proceed- ings of 41st International Conference on Software Engi- neering, pages 1165-1175. IEEE, 2019.
  19. [Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Sys- tems 30, pages 5998-6008. 2017.
  20. [Wan et al., 2018] Yao Wan, Zhou Zhao, Min Yang, Guan- dong Xu, Haochao Ying, Jian Wu, and Philip S Yu. Im- proving automatic source code summarization via deep reinforcement learning. In Proceedings of the 33rd ACM/IEEE international conference on Automated Soft- ware Engineering, pages 397-407. ACM, 2018.
  21. [Wong et al., 2013] E. Wong, Jinqiu Yang, and Lin Tan. Au- tocomment: Mining question and answer sites for auto- matic comment generation. In Proceedings of the 28th ACM/IEEE international conference on Automated Soft- ware Engineering, pages 562-567. ACM, 2013.
  22. [Zhang et al., 2016] Biao Zhang, Deyi Xiong, Jinsong Su, Hong Duan, and Min Zhang. Variational neural machine translation. In Proceedings of the 21st Conference on Em- pirical Methods in Natural Language Processing, pages 521-530, 2016.
  23. [Zheng et al., 2019] Wenhao Zheng, Hongyu Zhou, Ming Li, and Jianxin Wu. Codeattention: translating source code to comments by exploiting the code constructs. Frontiers of Computer Science, 13(3):565-578, 2019.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards