Javaにおける一文字変数の型とスコープに着目した利用実態調査
光輝 岡井, Kazumasa Shimari, Takashi Ishio et al. · Institutional Repositories DataBase (IRDB) · 2026
In program comprehension, variable names significantly impact maintainability, thus multi-letter names are generally recommended.However, single-letter variables are a non-negligible presence, constituting about 9% of Java source code.The importance of considering type and scope when using and naming variables has been shown, but recommendations for single-character variables are limited to using them in a narrow scope, and actual usages that are likely to vary depending on type and scope have not been investigated.This paper quantitatively analyzes the actual usage of single-letter variables in Java source code, focusing on type, scope, and the alphabet used.Our analysis revealed that the usage ratio, the chosen alphabet, and the scope of single-letter variables all vary depending on the variable type.These results demonstrate the necessity of considering type-based alphabet conventions and scope context when using single-letter variables.
Cited by 0 works. Open-access PDF