Skip to main content
Presentation
Declarative visitors to ease fine-grained source code mining with full history on billions of AST nodes
ACM SIGPLAN Notices
  • Robert Dyer, Iowa State University
  • Tien N. Nguyen, Iowa State University
  • Hridesh Rajan, Iowa State University
Document Type
Conference Proceeding
Conference
The 12th international conference on Generative programming: concepts & experiences
Publication Version
Submitted Manuscript
Link to Published Version
https://doi.org/10.1145/2637365.2517226
Publication Date
1-1-2013
DOI
10.1145/2637365.2517226
Conference Date
October 27-28 2013
Geolocation
(39.768403, -86.15806800000001)
Abstract

Software repositories contain a vast wealth of information about software development. Mining these repositories has proven useful for detecting patterns in software development, testing hypotheses for new software engineering approaches, etc. Specifically, mining source code has yielded significant insights into software development artifacts and processes. Unfortunately, mining source code at a large-scale remains a difficult task. Previous approaches had to either limit the scope of the projects studied, limit the scope of the mining task to be more coarse-grained, or sacrifice studying the history of the code due to both human and computational scalability issues. In this paper we address the substantial challenges of mining source code: a) at a very large scale; b) at a fine-grained level of detail; and c) with full history information.

To address these challenges, we present domain-specific language features for source code mining. Our language features are inspired by object-oriented visitors and provide a default depth-first traversal strategy along with two expressions for defining custom traversals. We provide an implementation of these features in the Boa infrastructure for software repository mining and describe a code generation strategy into Java code. To show the usability of our domain-specific language features, we reproduced over 40 source code mining tasks from two large-scale previous studies in just 2 person-weeks. The resulting code for these tasks show between 2.0x--4.8x reduction in code size. Finally we perform a small controlled experiment to gain insights into how easily mining tasks written using our language features can be understood, with no prior training. We show a substantial number of tasks (77%) were understood by study participants, in about 3 minutes per task.

Comments

This article is published as Dyer, Robert, Hridesh Rajan, and Tien N. Nguyen. "Declarative visitors to ease fine-grained source code mining with full history on billions of AST nodes." In ACM SIGPLAN Notices, vol. 49, no. 3, pp. 23-32. ACM, 2013. 10.1145/2637365.2517226. Posted with Permission.

Rights
© ACM, 2013 This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ACM SIGPLAN Notices, vol. 49, no. 3, pp. 23-32. ACM, 2013. https://doi.org/10.1145/2637365.2517226
Copyright Owner
ACM
Language
en
File Format
application/pdf
Citation Information
Robert Dyer, Tien N. Nguyen and Hridesh Rajan. "Declarative visitors to ease fine-grained source code mining with full history on billions of AST nodes" Indianapolis, INACM SIGPLAN Notices Vol. 49 Iss. 3 (2013) p. 23 - 32
Available at: http://works.bepress.com/hridesh-rajan/82/