Reanalysis of Empirical Data on Java Local Variables with Narrow and Broad Scope
It is generally accepted that variables with a narrow syntactic scope can have short names, whereas variables with a broad scope require more informative longer names. We study how names are given in practice, using a dataset of nearly 640 thousand variable names from Java methods, recently introduced by Aman et al. We extend their original analysis by using a finer division of scopes into ranges. We find that indeed variables with broader scope tend to be slightly longer and to include more words. There is also a progression of changes in name structures, with fewer single-letter names and more compound names as the scope increases. But the biggest differences occur at the low-scope end, not the high-scope end. In addition, we present more evidence that words of 6 letters or more are often abbreviated, but this is not affected by scope. Finally, we also analyze the distribution of popularity of names and of words in names, and show that single letter names are much more varied and common than usually thought, even when the variables have a broad scope.
Tue 16 MayDisplayed time zone: Hobart change
11:00 - 12:30 | Empirical Studies and RecommendationsResearch / Discussion / Early Research Achievements (ERA) / Journal First at Meeting Room 106 Chair(s): Issam Sedki Concordia University, Vittoria Nardone | ||
11:00 9mFull-paper | REMS: Recommending Extract Method Refactoring Opportunities via Multi-view Representation of Code Property Graph Research Di Cui , Qiangqiang Wang Xidian University, Siqi Wang , Jianlei Chi , Jianan Li Xidian University, Lu Wang Xidian University, Qingshan Li Xidian University | ||
11:09 9mFull-paper | Automating Method Naming with Context-Aware Prompt-Tuning Research Jie Zhu Institute of Software, Chinese Academy of Sciences;University of Chinese Academy of Sciences, Lingwei Li Institute of Software at Chinese Academy of Sciences; University of Chinese Academy of Sciences, Li Yang Institute of Software at Chinese Academy of Sciences, Xiaoxiao Ma Institute of Software, Chinese Academy of Sciences, Chun Zuo Sinosoft Pre-print | ||
11:18 9mFull-paper | Generation-based Code Review Automation: How Far Are We? Research Xin Zhou Singapore Management University, Singapore, Kisub Kim Singapore Management University, Bowen Xu North Carolina State University, DongGyun Han Royal Holloway, University of London, Junda He Singapore Management University, David Lo Singapore Management University Pre-print | ||
11:27 9mFull-paper | Reanalysis of Empirical Data on Java Local Variables with Narrow and Broad Scope Research Dror Feitelson Hebrew University Pre-print | ||
11:36 9mTalk | Predicting vulnerability inducing function versions using node embeddings and graph neural networks Journal First ecem mine özyedierler Istanbul Technical University, Ayse Tosun Istanbul Technical University, Sefa Eren Sahin Faculty of Computer and Informatics Engineering, Istanbul Technical University | ||
11:45 5mShort-paper | Properly Offer Options to Improve the Practicality of Software Document Completion Tools Early Research Achievements (ERA) Zhipeng Cai School of Computer Science, Wuhan University, Songqiang Chen School of Computer Science, Wuhan University, Xiaoyuan Xie School of Computer Science, Wuhan University, China Media Attached | ||
11:50 40mPanel | Discussion 6 Discussion |