Extracting executable transformations from distilled code changes

Change distilling algorithms compute a sequence of fine-grained changes that, when executed in order, transform a given source AST into a given target AST. The resulting change sequences are used in the field of mining software repositories to study source code evolution. Unfortunately, detecting and specifying source code evolutions in such a change sequence is cumbersome. We therefore introduce a tool-supported approach that identifies minimal executable subsequences in a sequence of distilled changes that implement a particular evolution pattern, specified in terms of intermediate states of the AST that undergoes each change. This enables users to describe the effect of multiple changes, irrespective of their execution order, while ensuring that different change sequences that implement the same code evolution are recalled. Correspondingly, our evaluation is two-fold. Using examples, we demonstrate the expressiveness of specifying source code evolutions through intermediate ASTs. We also show that our approach is able to recall different implementation variants of the same source code evolution in open-source histories.

[1]  Jennifer Widom,et al.  Change detection in hierarchically structured information , 1996, SIGMOD '96.

[2]  Julia L. Lawall,et al.  Improving pattern tracking with a language-aware tree differencing algorithm , 2015, 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[3]  Elnar Hajiyev,et al.  codeQuest: Scalable Source Code Queries with Datalog , 2006, ECOOP.

[4]  Shinpei Hayashi,et al.  Slicing Fine-Grained Code Change History , 2016, IEICE Trans. Inf. Syst..

[5]  Shinji Kusumoto,et al.  CCFinder: A Multilinguistic Token-Based Code Clone Detection System for Large Scale Source Code , 2002, IEEE Trans. Software Eng..

[6]  Matias Martinez,et al.  Fine-grained and accurate source code differencing , 2014, ASE.

[7]  Andy Kellens,et al.  The SOUL tool suite for querying programs in symbiosis with Eclipse , 2011, PPPJ.

[8]  Yanhong A. Liu,et al.  Parametric regular path queries , 2004, PLDI '04.

[9]  Zhongpeng Lin,et al.  Why Power Laws? An Explanation from Fine-Grained Code Changes , 2015, 2015 IEEE/ACM 12th Working Conference on Mining Software Repositories.

[10]  Stas Negara,et al.  Mining fine-grained code changes to detect unknown change patterns , 2014, ICSE.

[11]  Coen De Roover,et al.  Building development tools interactively using the EKEKO meta-programming library , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[12]  Benjamin Livshits,et al.  Finding application errors and security flaws using PQL: a program query language , 2005, OOPSLA '05.

[13]  Reinout Stevens A Declarative Foundation for Comprehensive History Querying , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[14]  Miryung Kim,et al.  Lase: Locating and applying systematic edits by learning from examples , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[15]  Hridesh Rajan,et al.  Boa: A language and infrastructure for analyzing ultra-large-scale software repositories , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[16]  Harald C. Gall,et al.  Change Distilling:Tree Differencing for Fine-Grained Source Code Change Extraction , 2007, IEEE Transactions on Software Engineering.

[17]  Eric Van Wyk,et al.  Universal Regular Path Queries , 2003, High. Order Symb. Comput..

[18]  Marie-Pierre Gervais,et al.  D-Praxis : A Peer-to-Peer Collaborative Model Editing Framework , 2009, DAIS.

[19]  Coen De Roover,et al.  Querying the History of Software Projects Using QWALKEKO , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.

[20]  Daniel M. Germán,et al.  SCQL , 2005, MSR.

[21]  Miryung Kim,et al.  Template-based reconstruction of complex refactorings , 2010, 2010 IEEE International Conference on Software Maintenance.

[22]  Andrew P. Black,et al.  How We Refactor, and How We Know It , 2012, IEEE Trans. Software Eng..

[23]  Coen De Roover,et al.  Prevalence and Maintenance of Automated Functional Tests for Web Applications , 2014, 2014 IEEE International Conference on Software Maintenance and Evolution.