Canonical Method Names for Java
Programmers rely on the conventional meanings of method names when writing programs. However, these conventional meanings are implicit and vague, leading to various forms of ambiguity. This is problematic since it hurts the readability and maintainability of programs. Java programmers would benefit greatly from a more well-defined vocabulary. Identifying synonyms in the vocabulary of verbs used in method names is a step towards this goal. By rooting the meaning of verbs in the semantics of a large number of methods taken from real-world Java applications, we find that such synonyms can readily be identified. To support our claims, we demonstrate automatic identification of synonym candidates. This could be used as a starting point for a manual canonicalisation process, where redundant verbs are eliminated from the vocabulary.
KeywordsJava Programmer Probability Mass Function Method Implementation Semantic Object Abstract Language
Unable to display preview. Download preview PDF.
- 3.Collar, E., Valerdi, R.: Role of software readability on software development cost. In: Proceedings of the 21st Forum on COCOMO and Software Cost Modeling, Herndon, VA (October 2006)Google Scholar
- 5.Lawrie, D., Morrell, C., Feild, H., Binkley, D.: Effective identifier names for comprehension and memory. ISSE 3(4), 303–318 (2007)Google Scholar
- 6.Martin, R.C.: Clean Code. Prentice-Hall, Englewood Cliffs (2008)Google Scholar
- 7.Beck, K.: Implementation Patterns. Addison-Wesley Professional, Reading (2007)Google Scholar
- 15.Singer, J., Brown, G., Lujan, M., Pocock, A., Yiapanis, P.: Fundamental nano-patterns to characterize and classify Java methods. In: Proceedings of the 9th Workshop on Language Descriptions, Tools and Applications (LDTA 2009), pp. 204–218 (2009)Google Scholar
- 18.Pollock, L.L., Vijay-Shanker, K., Shepherd, D., Hill, E., Fry, Z.P., Maloor, K.: Introducing natural language program analysis. In: Das, M., Grossman, D. (eds.) Proceedings of the 7th ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE 2007), pp. 15–16. ACM, New York (2007)CrossRefGoogle Scholar
- 19.Shepherd, D., Pollock, L.L., Vijay-Shanker, K.: Towards supporting on-demand virtual remodularization using program graphs. In: Filman, R.E. (ed.) Proceedings of the 5th International Conference on Aspect-Oriented Software Development (AOSD 2006), pp. 3–14. ACM, New York (2006)CrossRefGoogle Scholar
- 20.Shepherd, D., Fry, Z.P., Hill, E., Pollock, L., Vijay-Shanker, K.: Using natural language program analysis to locate and understand action-oriented concerns. In: Proceedings of the 6th International Conference on Aspect-Oriented Software Development (AOSD 2007), pp. 212–224. ACM, New York (2007)CrossRefGoogle Scholar