Mining Programming Language Vocabularies from Source Code

Daniel P. Delorey; Charles D. Knutson; Mark Davies

We can learn much from the artifacts produced as the by-products of software devel- opment and stored in software repositories. Of all such potential data sources, one of the most important from the perspective of program comprehension is the source code itself. While other data sources give insight into what developers intend a program to do, the source code is the most accurate human-accessible description of what it will do. However, the ability of an individual developer to comprehend a particular source file depends directly on his or her familiarity with the specific features of the programming language being used in the file. This is not unlike the difficulties second-language learners may encounter when attempting to read a text written in a new language. We propose that by applying the techniques used by corpus linguists in the study of natural language texts to a corpus of programming language texts (i.e., source code repositories), we can gain new insights into the communication medium that is programming language. In this paper we lay the foundation for applying corpus linguistic methods to programming language by 1) defining the term “word” for programming language, 2) developing data collection tools and a data storage schema for the Java programming language, and 3) presenting an initial analysis of an example linguistic corpus based on version 1.5 of the Java Developers Kit. 

Type of Publication: Paper
Conference: PPIG 2009 - 21st Annual Workshop
Publication Year: 2009
Paper #: 12
TitleMining Programming Language Vocabularies from Source Code
Publication TypePaper
AuthorsDelorey, DP, Knutson, CD, Davies, M
PPIG Workshop: