Hirohisa Aman, S. Amasaki, Tomoyuki Yokogawa, Minoru Kawahara
{"title":"An Investigation of Compound Variable Names Toward Automated Detection of Confusing Variable Pairs","authors":"Hirohisa Aman, S. Amasaki, Tomoyuki Yokogawa, Minoru Kawahara","doi":"10.1109/ASEW52652.2021.00036","DOIUrl":null,"url":null,"abstract":"A successful naming of variables is key to making the source code readable. Programmers may use a compound variable name by concatenating two or more words to make it easier to understand and more informative. While each compound variable name itself may be easy-to-understand, a collection of such variables sometimes makes a “confusing” variable pair if their names are highly similar, e.g., “shippingHeight,” vs. “shippingWeight.” A confusing variable pair would adversely affect the code readability because it may cause a misreading or a mix-up of variables. Toward automated support for enhancing the code readability, this paper conducts a large-scale investigation of compound variable names in Java programs to find quantitative criteria of the confusing variable pairs. The investigation collects 31,806,749 pairs of compound-named variables from 684 open-source Java projects and analyzes them from two different perspectives of name similarity: the string similarity and the semantic similarity.","PeriodicalId":349977,"journal":{"name":"2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW)","volume":"24 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-11-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ASEW52652.2021.00036","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
A successful naming of variables is key to making the source code readable. Programmers may use a compound variable name by concatenating two or more words to make it easier to understand and more informative. While each compound variable name itself may be easy-to-understand, a collection of such variables sometimes makes a “confusing” variable pair if their names are highly similar, e.g., “shippingHeight,” vs. “shippingWeight.” A confusing variable pair would adversely affect the code readability because it may cause a misreading or a mix-up of variables. Toward automated support for enhancing the code readability, this paper conducts a large-scale investigation of compound variable names in Java programs to find quantitative criteria of the confusing variable pairs. The investigation collects 31,806,749 pairs of compound-named variables from 684 open-source Java projects and analyzes them from two different perspectives of name similarity: the string similarity and the semantic similarity.