{"type":"ScholarlyArticle","title":"Summarizing Source Code with Transferred API Knowledge","authors":[{"name":"Xing Hu","slug":"xing-hu","given":"Xing","family":"Hu","affiliation":"Key laboratory of High Confidence Software Technologies ( Peking University) , Ministry of Education; Institute of Software , EECS , Peking University , Beijing , China"},{"name":"Ge Li","slug":"ge-li","given":"Ge","family":"Li","affiliation":"Key laboratory of High Confidence Software Technologies ( Peking University) , Ministry of Education; Institute of Software , EECS , Peking University , Beijing , China"},{"name":"Xin Xia","slug":"xin-xia","given":"Xin","family":"Xia","affiliation":"Faculty of Information Technology , Monash University , Australia"},{"name":"David Lo","slug":"david-lo","given":"David","family":"Lo","affiliation":"School of Information Systems , Singapore Management University , Singapore"},{"name":"Shuai Lu","slug":"shuai-lu","given":"Shuai","family":"Lu","affiliation":"Key laboratory of High Confidence Software Technologies ( Peking University) , Ministry of Education; Institute of Software , EECS , Peking University , Beijing , China"},{"name":"Zhi Jin","slug":"zhi-jin","given":"Zhi","family":"Jin","affiliation":"Key laboratory of High Confidence Software Technologies ( Peking University) , Ministry of Education; Institute of Software , EECS , Peking University , Beijing , China"}],"abstract":"Code summarization, aiming to generate succinct natural language description of source code, is extremely useful for code search and code comprehension.\r\nIt has played an important role in software maintenance and evolution. Previous approaches generate summaries by retrieving summaries from similar code snippets. However, these approaches heavily rely on whether similar code snippets can be retrieved, how similar the snippets are, and fail to capture the API knowledge in the source code, which carries vital information about the functionality of the source code. In this paper, we propose a novel approach, named TL-CodeSum, which successfully uses API knowledge learned in a different but related task to code summarization. Experiments on large-scale real-world industry Java projects indicate that our approach is effective and outperforms the state-of-the-art in code summarization.","doi":"10.24963/ijcai.2018/314","url":"https://ijcai.org/proceedings/2018/314","pdf":"https://ijcai.org/proceedings/2018/0314.pdf","markdown":"https://ijcai.org/proceedings/2018/314.md","bibtex":"https://ijcai.org/proceedings/2018/bibtex/314","volume":{"slug":"2018","title":"Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence","short_title":"IJCAI 2018","url":"https://ijcai.org/proceedings/2018/","year":2018,"location":"Stockholm","dates":"13-19 July 2018","editors":"Jérôme Lang","isbn":"978-0-9992411-2-7","publisher":"International Joint Conferences on Artificial Intelligence Organization","doi_prefix":"10.24963/ijcai.2018"},"section":"Machine Learning","track":"Main track","number":314,"pages":{"first":2269,"last":2275},"keywords":["Machine Learning Applications: Applications of Supervised Learning","Machine Learning: Transfer, Adaptation, Multi-task Learning","Machine Learning: Deep Learning"],"videos":[],"references":[{"position":1,"raw":"[Allamanis et al., 2014] Miltiadis Allamanis, Earl T Barr, Christian Bird, and Charles Sutton. Learning natural cod- ing conventions. In Proceedings of the 22nd ACM SIG- SOFT International Symposium on Foundations of Soft- ware Engineering, pages 281-293. ACM, 2014.","title":"Learning natural coding conventions","authors":"Miltiadis Allamanis, T Earl, Christian Barr, Charles Bird, Sutton","year":"2014","venue":"Proceedings of the 22nd ACM SIG-SOFT International Symposium on Foundations of Software Engineering","doi":null,"url":null,"internal_url":null},{"position":2,"raw":"[Allamanis et al., 2015a] Miltiadis Allamanis, Earl T Barr, Christian Bird, and Charles Sutton. Suggesting accurate method and class names. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering, pages 38-49. ACM, 2015.","title":"Suggesting accurate method and class names","authors":"Allamanis","year":"2015","venue":"Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering","doi":null,"url":null,"internal_url":null},{"position":3,"raw":"[Allamanis et al., 2015b] Miltos Allamanis, Daniel Tarlow, Andrew Gordon, and Yi Wei. Bimodal modelling of source code and natural language. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 2123-2132, 2015.","title":"Bimodal modelling of source code and natural language","authors":"Allamanis","year":"2015","venue":"Proceedings of the 32nd International Conference on Machine Learning (ICML-15)","doi":null,"url":null,"internal_url":null},{"position":4,"raw":"[Allamanis et al., 2016] Miltiadis Allamanis, Hao Peng, and Charles Sutton. A convolutional attention network for extreme summarization of source code. In Interna- tional Conference on Machine Learning, pages 2091- 2100, 2016.","title":"A convolutional attention network for extreme summarization of source code","authors":"Miltiadis Allamanis, Hao Peng, Charles Sutton","year":"2016","venue":"International Conference on Machine Learning","doi":null,"url":null,"internal_url":null},{"position":5,"raw":"[Bahdanau et al., 2014] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. Computer Science, 2014.","title":"Neural machine translation by jointly learning to align and translate","authors":"Dzmitry Bahdanau, Kyunghyun Cho, Yoshua Bengio","year":"2014","venue":null,"doi":null,"url":null,"internal_url":null},{"position":6,"raw":"[Cho et al., 2014] Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. Computer Science, 2014.","title":"Learning phrase representations using rnn encoder-decoder for statistical machine translation","authors":"Cho","year":"2014","venue":null,"doi":null,"url":null,"internal_url":null},{"position":7,"raw":"[Denkowski and Lavie, 2014] Michael Denkowski and Alon Lavie. Meteor universal: Language specific translation evaluation for any target language. In Proceedings of the EACL 2014 Workshop on Statistical Machine Translation, 2014.","title":"Meteor universal: Language specific translation evaluation for any target language","authors":"Lavie Denkowski, Michael Denkowski, Alon Lavie","year":"2014","venue":"Proceedings of the EACL 2014 Workshop on Statistical Machine Translation","doi":null,"url":null,"internal_url":null},{"position":8,"raw":"[Eddy et al., 2013] Brian P Eddy, Jeffrey A Robinson, Nicholas A Kraft, and Jeffrey C Carver. Evaluating source code summarization techniques: Replication and expan- sion. In Program Comprehension (ICPC), 2013 IEEE 21st International Conference on, pages 13-22. IEEE, 2013.","title":"Evaluating source code summarization techniques: Replication and expansion","authors":"Brian P Eddy, Jeffrey A Robinson, Nicholas A Kraft, Jeffrey C Carver","year":"2013","venue":"IEEE 21st International Conference on","doi":null,"url":null,"internal_url":null},{"position":9,"raw":"[Gu et al., 2016] Xiaodong Gu, Hongyu Zhang, Dongmei Zhang, and Sunghun Kim. Deep api learning. In Proceed- ings of the 2016 24th ACM SIGSOFT International Sym- posium on Foundations of Software Engineering, pages 631-642. ACM, 2016.","title":"Deep api learning","authors":"Xiaodong Gu, Hongyu Zhang, Dongmei Zhang, Sunghun Kim","year":"2016","venue":"Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering","doi":null,"url":null,"internal_url":null},{"position":10,"raw":"[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 Reverse Engineering (WCRE), 2010 17th Work- ing Conference on, pages 35-44. IEEE, 2010.","title":"On the use of automated text summarization techniques for summarizing source code","authors":"Sonia Haiduc, Jairo Aponte, Laura Moreno, Andrian Marcus","year":"2010","venue":"Reverse Engineering (WCRE), 2010 17th Working Conference on","doi":null,"url":null,"internal_url":null},{"position":11,"raw":"[Hellendoorn and Devanbu, 2017] Vincent J Hellendoorn and Premkumar Devanbu. Are deep neural networks the best choice for modeling source code? In Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, pages 763-773. ACM, 2017.","title":"Are deep neural networks the best choice for modeling source code?","authors":"J Vincent, Premkumar Hellendoorn, Devanbu","year":"2017","venue":"Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering","doi":null,"url":null,"internal_url":null},{"position":12,"raw":"[Hindle et al., 2012] Abram Hindle, Earl T Barr, Zhendong Su, Mark Gabel, and Premkumar Devanbu. On the natu- ralness of software. In Software Engineering (ICSE), 2012 34th International Conference on, pages 837-847. IEEE, 2012.","title":"On the naturalness of software","authors":"Hindle","year":"2012","venue":"Software Engineering (ICSE), 2012 34th International Conference on","doi":null,"url":null,"internal_url":null},{"position":13,"raw":"[Hu et al., 2018] Xing Hu, Ge Li, Xin Xia, David Lo, and Zhi Jin. Deep code comment generation. In Proceedings of the 2018 26th IEEE/ACM International Confernece on Program Comprehension. ACM, 2018.","title":"Deep code comment generation","authors":"Xing Hu, Ge Li, Xin Xia, David Lo, Zhi Jin","year":"2018","venue":"Proceedings of the 2018 26th IEEE/ACM International Confernece on Program Comprehension","doi":null,"url":null,"internal_url":null},{"position":14,"raw":"[Iyer et al., 2016] Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, and Luke Zettlemoyer. Summarizing source code using a neural attention model. In ACL (1), 2016.","title":"Summarizing source code using a neural attention model","authors":"Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, Luke Zettlemoyer","year":"2016","venue":"ACL","doi":null,"url":null,"internal_url":null},{"position":15,"raw":"[Moreno et al., 2013] Laura Moreno, Jairo Aponte, Giriprasad Sridhara, Andrian Marcus, Lori Pollock, and K Vijay-Shanker. Automatic generation of natu- ral language summaries for java classes. In Program Comprehension (ICPC), 2013 IEEE 21st International Conference on, pages 23-32. IEEE, 2013.","title":"Automatic generation of natural language summaries for java classes","authors":"Laura Moreno, Jairo Aponte, Giriprasad Sridhara, Andrian Marcus, Lori Pollock, K Vijay-Shanker","year":"2013","venue":"IEEE 21st International Conference on","doi":null,"url":null,"internal_url":null},{"position":16,"raw":"[Nguyen et al., 2013] Tung Thanh Nguyen, Anh Tuan Nguyen, Hoan Anh Nguyen, and Tien N Nguyen. A sta- tistical semantic language model for source code. In Pro- ceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering, pages 532-542. ACM, 2013.","title":"A statistical semantic language model for source code","authors":"Thanh Tung, Anh Tuan Nguyen, Hoan Nguyen, Anh Nguyen, Tien N Nguyen","year":"2013","venue":"Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering","doi":null,"url":null,"internal_url":null},{"position":17,"raw":"[Pan and Yang, 2010] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on knowl- edge and data engineering, 22(10):1345-1359, 2010.","title":"A survey on transfer learning","authors":"Jialin Sinno, Qiang Pan, Yang","year":"2010","venue":"IEEE Transactions on knowledge and data engineering","doi":null,"url":null,"internal_url":null},{"position":18,"raw":"[Papineni et al., 2002] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for auto- matic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pages 311-318. Association for Computational Linguistics, 2002.","title":"Bleu: a method for automatic evaluation of machine translation","authors":"Kishore Papineni, Salim Roukos, Todd Ward, Wei-Jing Zhu","year":"2002","venue":"Proceedings of the 40th annual meeting on association for computational linguistics","doi":null,"url":null,"internal_url":null},{"position":19,"raw":"[Ray et al., 2016] Baishakhi Ray, Vincent Hellendoorn, Sa- heel Godhane, Zhaopeng Tu, Alberto Bacchelli, and Premkumar Devanbu. On the naturalness of buggy code. In Proceedings of the 38th International Conference on Software Engineering, pages 428-439. ACM, 2016.","title":"On the naturalness of buggy code","authors":"Baishakhi Ray, Vincent Hellendoorn, Saheel Godhane, Zhaopeng Tu, Alberto Bacchelli, Premkumar Devanbu","year":"2016","venue":"Proceedings of the 38th International Conference on Software Engineering","doi":null,"url":null,"internal_url":null},{"position":20,"raw":"[Raychev et al., 2015] Veselin Raychev, Martin Vechev, and Andreas Krause. Predicting program properties from big code. In ACM SIGPLAN Notices, volume 50, pages 111- 124. ACM, 2015.","title":"Predicting program properties from big code","authors":"Veselin Raychev, Martin Vechev, Andreas Krause","year":"2015","venue":"ACM SIGPLAN Notices","doi":null,"url":null,"internal_url":null},{"position":21,"raw":"[Rush et al., 2015] Alexander M Rush, Sumit Chopra, and Jason Weston. A neural attention model for ab- stractive sentence summarization. arXiv preprint arXiv:1509.00685, 2015.","title":"A neural attention model for abstractive sentence summarization","authors":"Sumit Alexander M Rush, Jason Chopra, Weston","year":"2015","venue":null,"doi":null,"url":null,"internal_url":null},{"position":22,"raw":"[Sutskever et al., 2014] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104-3112, 2014.","title":"Quoc V Le. Sequence to sequence learning with neural networks","authors":"Sutskever","year":"2014","venue":"Advances in neural information processing systems","doi":null,"url":null,"internal_url":null},{"position":23,"raw":"[Wong et al., 2015] Edmund Wong, Taiyue Liu, and Lin Tan. Clocom: Mining existing source code for automatic com- ment generation. In Software Analysis, Evolution and Reengineering (SANER), 2015 IEEE 22nd International Conference on, pages 380-389. IEEE, 2015.","title":"Clocom: Mining existing source code for automatic comment generation","authors":"Edmund Wong, Taiyue Liu, Lin Tan","year":"2015","venue":"Software Analysis, Evolution and Reengineering (SANER)","doi":null,"url":null,"internal_url":null}],"license_note":"Copyright International Joint Conferences on Artificial Intelligence."}