z-logo
Premium
An analysis of programming language statement frequency in C, C++, and Java source code
Author(s) -
Zhu Xiaoyan,
Whitehead E. James,
Sadowski Caitlin,
Song Qinbao
Publication year - 2015
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.2298
Subject(s) - statement (logic) , programming language , computer science , java , copying , java modeling language , source code , generics in java , problem statement , java annotation , real time java , linguistics , management science , political science , law , economics , philosophy
Summary Statement frequency data can inform programming language research and provide a solid basis for frequency‐based code analysis. This paper presents an analysis of programming language statement frequency in a large corpus of C, C++, and Java source code, comprised of more than 54 million lines of code. Across these languages, the top four work‐performing statement types are Method/Function Call, Assignment, If, and Return. As compared to studies of Formula Translating System, Common Business Oriented Language and Programming Language One in the 1970s, the main change is the prevalence of method/function calls. Statement use frequency across languages is remarkably similar, and within each individual language, most statement types have a frequency distribution that occupies a small range. A more detailed examination of assignment and looping statement types shows that many assignments simply involve copying of data and that C++/Java use for statements more than C. Copyright © 2014 John Wiley & Sons, Ltd.

This content is not available in your region!

Continue researching here.

Having issues? You can contact us here