跳到主要导航 跳到搜索 跳到主要内容

An analysis of programming language statement frequency in C, C++, and Java source code

  • Xiaoyan Zhu
  • , E. James Whitehead
  • , Caitlin Sadowski
  • , Qinbao Song
  • University of California at Santa Cruz
  • Xi'an Jiaotong University

科研成果: 期刊稿件文章同行评审

4 引用 (Scopus)

摘要

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.

源语言英语
页(从-至)1479-1495
页数17
期刊Software - Practice and Experience
45
11
DOI
出版状态已出版 - 11月 2015

学术指纹

探究 'An analysis of programming language statement frequency in C, C++, and Java source code' 的科研主题。它们共同构成独一无二的指纹。

引用此