The Open UniversitySkip to content

Mining Java Class Naming Conventions

Butler, Simon; Wermelinger, Michel; Yu, Yijun and Sharp, Helen (2011). Mining Java Class Naming Conventions. In: 27th IEEE International Conference on Software Maintenance, 25-30 Sep 2011, Williamsburg, VA, USA, pp. 93–102.

Full text available as:
PDF (Accepted Manuscript) - Requires a PDF viewer such as GSview, Xpdf or Adobe Acrobat Reader
Download (237kB)
[img] ZIP archive
Download (880kB)
DOI (Digital Object Identifier) Link:
Google Scholar: Look up in Google Scholar


Class names represent the concepts implemented in object-oriented source code and are key elements in program comprehension and, thus, software maintenance. Programming conventions often state that class names should be noun-phrases, but there is little further guidance for developers on the composition of class names. Other researchers have observed that the majority of Java class identifier names are composed of one or more nouns preceded, optionally, by one or more adjectives. However, no detailed analysis of class identifier name structure has been undertaken that could be leveraged to support program comprehension activities.
We investigate the lexical and syntactic composition of Java class identifier names in two ways. Firstly, as others have done for C function and Java method names, we identify conventional patterns found in the use of parts of speech. Secondly, we identify the origin of words used in class names within the name of any super class and implemented interfaces to identify patterns of class name construction related to inheritance.
Through the analysis of 120,000 unique class names found in 60 open source projects we identify both common and project specific class naming conventions. We apply this knowledge in a case study of the mind-mapping tool Freemind to investigate whether class names that follow unconventional naming schemes are candidates for refactoring – either a name refactoring that conforms to established naming conventions within the code base, or refactoring of the class that results in conventionally named classes.

Item Type: Conference or Workshop Item
Copyright Holders: 2011 IEEE (Paper), 2011 The Open University (Data)
Extra Information: ISBN: 978-1-4577-0663-9
Pages 93-102
Zip file contains the research data described in the paper
Keywords: Java class naming; identifier names
Academic Unit/School: Faculty of Science, Technology, Engineering and Mathematics (STEM) > Computing and Communications
Faculty of Science, Technology, Engineering and Mathematics (STEM)
Research Group: Centre for Research in Computing (CRC)
Item ID: 29118
Depositing User: Michel Wermelinger
Date Deposited: 09 Aug 2011 08:52
Last Modified: 07 Dec 2018 11:09
Share this page:


Altmetrics from Altmetric

Citations from Dimensions

Download history for this item

These details should be considered as only a guide to the number of downloads performed manually. Algorithmic methods have been applied in an attempt to remove automated downloads from the displayed statistics but no guarantee can be made as to the accuracy of the figures.

Actions (login may be required)

Policies | Disclaimer

© The Open University   contact the OU