Write a Blog >>
ICSE 2020
Mon 5 - Sun 11 October 2020 Yongsan-gu, Seoul, South Korea
Wed 7 Oct 2020 14:40 - 15:00 at TBD3 - Code Summarization and Analysis

Misleading names of the methods in a project or the APIs in a software library confuse developers about program functionality and API usages, leading to API misuses and defects. In this paper, we introduce MNIRE, a machine learning approach to check the consistency between the name of a given method and its implementation. MNIRE first generates a candidate name and compares the current name against it. If the two names are sufficiently similar, we consider the method as consistent. To generate the method name, we draw our ideas and intuition from an empirical study on the nature of method names in a large dataset. Our key findings are that high proportions of the tokens of method names can be found in the three contexts of a given method including its body, the interface (the method’s parameter types and return type), and the enclosing class’ name. Even when such tokens are not there, MNIRE uses the contexts to predict the tokens due to the high co-occurrence likelihoods. Our unique idea is to treat the name generation as an abstract summarization on the tokens collected from the names of the program entities in the three above contexts.

We conducted several experiments to evaluate MNIRE in method name consistency checking and in method name recommending on large datasets with +14M methods. In detecting inconsistency method names, MNIRE improves the state-of-the-art approach by 10.4% and 11% relatively in recall and precision, respectively. In method name recommendation, MNIRE improves relatively over the state-of-the-art technique, code2vec, in both recall (18.2% higher) and precision (11.1% higher). To assess MNIRE’s usefulness, we used it to detect inconsistent methods and suggest new names in several active, GitHub projects. We made 50 pull requests and received 42 responses. Among them, 5 PRs were merged into the main branch, and 13 were approved for later merging. In total, in 31/42 cases, the developer teams agree that our suggested names are more meaningful than the current names, showing MNIRE’s usefulness.

Wed 7 Oct

icse-2020-paper-presentations
14:00 - 15:40: Paper Presentations - Code Summarization and Analysis at TBD3
icse-2020-papers14:00 - 14:20
Talk
Profir-Petru PârțachiUniversity College London, Santanu Kumar DashUniversity College London, UK, Christoph TreudeThe University of Adelaide, Earl BarrUniversity College London
icse-2020-papers14:20 - 14:40
Talk
Juan ZhaiRutgers University, Xiangzhe XuNanjing University, Yu ShiPurdue University, Guanhong TaoPurdue University, Minxue PanNanjing University, Shiqing MaRutgers University, Lei XuNational Key Laboratory for Novel Software Technology, Nanjing University, Weifeng ZhangNanjing University of Posts and Telecommunications, Lin TanPurdue University, Xiangyu ZhangPurdue University
icse-2020-papers14:40 - 15:00
Talk
Son NguyenThe University of Texas at Dallas, Hung Phan, Trinh LeUniversity of Engineering and Technology, Tien N. NguyenUniversity of Texas at Dallas
icse-2020-papers15:00 - 15:20
Talk
Jian ZhangBeihang University, Xu WangBeihang University, Hongyu ZhangThe University of Newcastle, Hailong SunBeihang University, Xudong LiuBeihang University
Pre-print
icse-2020-New-Ideas-and-Emerging-Results15:20 - 15:30
Talk
Annie LouisUniversity of Edinburgh, Santanu Kumar DashUniversity College London, UK, Earl BarrUniversity College London, Michael D. ErnstUniversity of Washington, USA, Charles SuttonGoogle Research
icse-2020-New-Ideas-and-Emerging-Results15:30 - 15:40
Talk
Casey CasalnuovoUniversity of California at Davis, USA, Earl BarrUniversity College London, Santanu Kumar DashUniversity College London, UK, Prem DevanbuUniversity of California, Emily MorganUniversity of California, Davis