UCL Discovery
UCL home » Library Services » Electronic resources » UCL Discovery

Understanding the syntactic rule usage in java

Qiu, D; Li, B; Barr, ET; Su, Z; (2017) Understanding the syntactic rule usage in java. Journal of Systems and Software , 123 pp. 160-172. 10.1016/j.jss.2016.10.017. Green open access

[thumbnail of revised_paper.pdf]
Preview
Text
revised_paper.pdf - Accepted Version

Download (603kB) | Preview

Abstract

CONTEXT: Syntax is fundamental to any programming language: syntax defines valid programs. In the 1970s, computer scientists rigorously and empirically studied programming languages to guide and inform language design. Since then, language design has been artistic, driven by the aesthetic concerns and intuitions of language architects. Despite recent studies on small sets of selected language features, we lack a comprehensive, quantitative, empirical analysis of how modern, real-world source code exercises the syntax of its programming language. OBJECTIVE: This study aims to understand how programming language syntax is employed in actual development and explore their potential applications based on the results of syntax usage analysis. METHOD: We present our results on the first such study on Java, a modern, mature, and widely-used programming language. Our corpus contains over 5000 open-source Java projects, totalling 150 million source lines of code (SLoC). We study both independent (i.e. applications of a single syntax rule) and dependent (i.e. applications of multiple syntax rules) rule usage, and quantify their impact over time and project size. RESULTS: Our study provides detailed quantitative information and yields insight, particularly (i) confirming the conventional wisdom that the usage of syntax rules is Zipfian; (ii) showing that the adoption of new rules and their impact on the usage of pre-existing rules vary significantly over time; and (iii) showing that rule usage is highly contextual. CONCLUSIONS: Our findings suggest potential applications across language design, code suggestion and completion, automatic syntactic sugaring, and language restriction.

Type: Article
Title: Understanding the syntactic rule usage in java
Open access status: An open access version is available from UCL Discovery
DOI: 10.1016/j.jss.2016.10.017
Publisher version: https://doi.org/10.1016/j.jss.2016.10.017
Language: English
Additional information: This version is the author accepted manuscript. For information on re-use, please refer to the publisher’s terms and conditions.
Keywords: Language syntax, empirical study, practical language usage
UCL classification: UCL
UCL > Provost and Vice Provost Offices > UCL BEAMS
UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science
UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science > Dept of Computer Science
URI: https://discovery.ucl.ac.uk/id/eprint/10064730
Downloads since deposit
294Downloads
Download activity - last month
Download activity - last 12 months
Downloads by country - last 12 months

Archive Staff Only

View Item View Item