Skip to main content
Top
Published in: Empirical Software Engineering 1/2019

30-08-2018

Querying distilled code changes to extract executable transformations

Authors: Reinout Stevens, Tim Molderez, Coen De Roover

Published in: Empirical Software Engineering | Issue 1/2019

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

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. We show that our approach is able to recall different implementation variants of the same source code evolution in histories of different software projects. We also evaluate the expressiveness and ease-of-use of our approach in a user study.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Footnotes
1
These are variables only visible in the body of in-current-es. If these variables need to be available in other parts of the query a user needs to explicitly bind them to a logic variable.
 
2
Throughout this paper, logic variables are prefixed with a question mark.
 
7
Keep in mind that the approach currently only looks for minimal, executable solutions. As illustrated in Fig. 17, the approach disregards whether or not a distilled change sequence is realistic, i.e. a sequence that a developer might intuitively consider to transform one piece of code into another.
 
8
All material that was provided in the user study, including the study’s complete results, are available online: http://​soft.​vub.​ac.​be/​~tmoldere/​qwalkeko
 
9
Based on the org.eclipse.jdt.astview plugin
 
10
This refers to the API documentation for all classes in the org.eclipse.jdt.core.dom package.
 
11
This paper uses Tukey box plots (Frigge et al. 1989), the default type of box plots produced by the R language.
 
Literature
go back to reference Alexandru CV, Gall HC (2015) Rapid multi-purpose, multi-commit code analysis. In: Proceedings of the 37th international conference on software engineering (ICSE15) Alexandru CV, Gall HC (2015) Rapid multi-purpose, multi-commit code analysis. In: Proceedings of the 37th international conference on software engineering (ICSE15)
go back to reference Chawathe SS, Rajaraman A, Garcia-Molina H, Widom J (1996) Change detection in hierarchically structured information. In: Proceedings of the international conference on management of data (SIGMOD96) Chawathe SS, Rajaraman A, Garcia-Molina H, Widom J (1996) Change detection in hierarchically structured information. In: Proceedings of the international conference on management of data (SIGMOD96)
go back to reference Christophe L, Stevens R, De Roover C (2014) Prevalence and maintenance of automated functional tests for web applications. In: Proceedings of the international conference on software maintenance and evolution (ICSME14) Christophe L, Stevens R, De Roover C (2014) Prevalence and maintenance of automated functional tests for web applications. In: Proceedings of the international conference on software maintenance and evolution (ICSME14)
go back to reference De Roover C, Inoue K (2014) The ekeko/x program transformation tool. In: Proceedings of 14th Int working conference on source code analysis and manipulation (SCAM14), Tool Demo Track De Roover C, Inoue K (2014) The ekeko/x program transformation tool. In: Proceedings of 14th Int working conference on source code analysis and manipulation (SCAM14), Tool Demo Track
go back to reference De Roover C, Stevens R (2014) Building development tools interactively using the ekeko meta-programming library. In: Proceedings of the European conference on software maintenance and reengineering (CSMR14) De Roover C, Stevens R (2014) Building development tools interactively using the ekeko meta-programming library. In: Proceedings of the European conference on software maintenance and reengineering (CSMR14)
go back to reference De Roover C, Noguera C, Kellens A, Jonckers V (2011) The SOUL tool suite for querying programs in symbiosis with Eclipse. In: Proceedings of the 9th international conference on principles and practice of programming in java (PPPJ11) De Roover C, Noguera C, Kellens A, Jonckers V (2011) The SOUL tool suite for querying programs in symbiosis with Eclipse. In: Proceedings of the 9th international conference on principles and practice of programming in java (PPPJ11)
go back to reference Dyer R, Nguyen HA, Rajan H, Nguyen TN (2013) Boa: a language and infrastructure for analyzing ultra-large-scale software repositories. In: Proceedings of the international conference on software engineering (ICSE13) Dyer R, Nguyen HA, Rajan H, Nguyen TN (2013) Boa: a language and infrastructure for analyzing ultra-large-scale software repositories. In: Proceedings of the international conference on software engineering (ICSE13)
go back to reference Ebraert P, Vallejos J, Costanza P, Paesschen EV, D’Hondt T (2007) Change-oriented software engineering. In: Proceedings of the 2007 international conference on dynamic languages (ICDL07) Ebraert P, Vallejos J, Costanza P, Paesschen EV, D’Hondt T (2007) Change-oriented software engineering. In: Proceedings of the 2007 international conference on dynamic languages (ICDL07)
go back to reference Falleri JR, Morandat F, Blanc X, Martinez M, Montperrus M (2014) Fine-grained and accurate source code differencing. In: Proceedings of the 29th international conference on automated software engineering (ASE14) Falleri JR, Morandat F, Blanc X, Martinez M, Montperrus M (2014) Fine-grained and accurate source code differencing. In: Proceedings of the 29th international conference on automated software engineering (ASE14)
go back to reference Fluri B, Würsch M, Pinzger M, Gall HC (2007) Change distilling: Tree differencing for fine-grained source code change extraction. Trans Softw Eng 33(11) Fluri B, Würsch M, Pinzger M, Gall HC (2007) Change distilling: Tree differencing for fine-grained source code change extraction. Trans Softw Eng 33(11)
go back to reference Frigge M, Hoaglin DC, Iglewicz B (1989) Some implementations of the boxplot. Am Stat 43(1):50–54 Frigge M, Hoaglin DC, Iglewicz B (1989) Some implementations of the boxplot. Am Stat 43(1):50–54
go back to reference Hajiyev E, Verbaere M, Moor OD (2006) Codequest: Scalable source code queries with datalog. In: Proceedings of the 20th European conference on object-oriented programming (ECOOP06) Hajiyev E, Verbaere M, Moor OD (2006) Codequest: Scalable source code queries with datalog. In: Proceedings of the 20th European conference on object-oriented programming (ECOOP06)
go back to reference Hindle A, German DM (2005) SCQL: A formal model and a query language for source control repositories. In: Proceedings of the 2005 working conference on mining software repositories (MSR05) Hindle A, German DM (2005) SCQL: A formal model and a query language for source control repositories. In: Proceedings of the 2005 working conference on mining software repositories (MSR05)
go back to reference Kamiya T, Kusumoto S, Inoue K (2002) Ccfinder: a multilinguistic token-based code clone detection system for large scale source code. IEEE Transactions on Software Engineering Kamiya T, Kusumoto S, Inoue K (2002) Ccfinder: a multilinguistic token-based code clone detection system for large scale source code. IEEE Transactions on Software Engineering
go back to reference Lin Z, Whitehead J (2015) Why power laws?: an explanation from fine-grained code changes. In: Proceedings of the 12th working conference on mining software repositories (MSR15) Lin Z, Whitehead J (2015) Why power laws?: an explanation from fine-grained code changes. In: Proceedings of the 12th working conference on mining software repositories (MSR15)
go back to reference Liu YA, Rothamel T, Yu F, Stoller SD, Hu N (2004) Parametric regular path queries. In: Proceedings of the conference on programming language design and implementation (PLDI04) Liu YA, Rothamel T, Yu F, Stoller SD, Hu N (2004) Parametric regular path queries. In: Proceedings of the conference on programming language design and implementation (PLDI04)
go back to reference Martin M, Livshits B, Lam MS (2005) Finding application errors and security flaws using pql: a program query language. In: Proceedings of the 20th conference on object-oriented programming, systems, languages, and applications (OOPSLA05) Martin M, Livshits B, Lam MS (2005) Finding application errors and security flaws using pql: a program query language. In: Proceedings of the 20th conference on object-oriented programming, systems, languages, and applications (OOPSLA05)
go back to reference Maruyama K, Omori T, Hayashi S (2016) Slicing fine-grained code change history. IEICE Trans 99-D(3):671–687CrossRef Maruyama K, Omori T, Hayashi S (2016) Slicing fine-grained code change history. IEICE Trans 99-D(3):671–687CrossRef
go back to reference Meng N, Kim M, McKinley KS (2013) Lase: locating and applying systematic edits by learning from examples. In: Proceedings of the 35th international conference on software engineering (ICSE13) Meng N, Kim M, McKinley KS (2013) Lase: locating and applying systematic edits by learning from examples. In: Proceedings of the 35th international conference on software engineering (ICSE13)
go back to reference Molderez T, Stevens R, De Roover C (2017) Mining change histories for unknown systematic edits. In: Proceedings of the 14th international conference on mining software repositories (MSR17) Molderez T, Stevens R, De Roover C (2017) Mining change histories for unknown systematic edits. In: Proceedings of the 14th international conference on mining software repositories (MSR17)
go back to reference de Moor O, Lacey D, Wyk EV (2002) Universal regular path queries. Higher-Order and Symbolic Computation pp 15–35 de Moor O, Lacey D, Wyk EV (2002) Universal regular path queries. Higher-Order and Symbolic Computation pp 15–35
go back to reference Mougenot A, Blanc X, Gervais. MP (2009) D-Praxis: A peer-to-peer collaborative model editing framework. In: Proceedings of the 9th international conference on distributed applications and interoperable systems (DAIS09) Mougenot A, Blanc X, Gervais. MP (2009) D-Praxis: A peer-to-peer collaborative model editing framework. In: Proceedings of the 9th international conference on distributed applications and interoperable systems (DAIS09)
go back to reference Murphy-Hill E, Parnin C, Black AP (2012) How we refactor, and how we know it. IEEE Trans Softw Eng 38:5–18CrossRef Murphy-Hill E, Parnin C, Black AP (2012) How we refactor, and how we know it. IEEE Trans Softw Eng 38:5–18CrossRef
go back to reference Negara S, Codoban M, Dig D, Johnson RE (2014) Mining fine-grained code changes to detect unknown change patterns. In: Proceedings of the 36th international conference on software engineering (ICSE14) Negara S, Codoban M, Dig D, Johnson RE (2014) Mining fine-grained code changes to detect unknown change patterns. In: Proceedings of the 36th international conference on software engineering (ICSE14)
go back to reference Oppenheim AN (2000) Questionnaire design, interviewing and attitude measurement. Bloomsbury Publishing Oppenheim AN (2000) Questionnaire design, interviewing and attitude measurement. Bloomsbury Publishing
go back to reference Palix N, Falleri J, Lawall J (2015) Improving pattern tracking with a language-aware tree differencing algorithm. In: Proceedings of the 22nd international conference on software analysis, evolution, and reengineering (SANER15), pp 43–52 Palix N, Falleri J, Lawall J (2015) Improving pattern tracking with a language-aware tree differencing algorithm. In: Proceedings of the 22nd international conference on software analysis, evolution, and reengineering (SANER15), pp 43–52
go back to reference Peled D (1998) Ten years of partial order reduction. In: Hu AJ, Vardi MY (eds) Computer aided verification. Springer, Berlin, pp 17–28CrossRef Peled D (1998) Ten years of partial order reduction. In: Hu AJ, Vardi MY (eds) Computer aided verification. Springer, Berlin, pp 17–28CrossRef
go back to reference Prete K, Rachatasumrit N, Sudan N, Kim M (2010) Template-based reconstruction of complex refactorings. In: Proceedings of the 2010 international conference on software maintenance (ICSM10) Prete K, Rachatasumrit N, Sudan N, Kim M (2010) Template-based reconstruction of complex refactorings. In: Proceedings of the 2010 international conference on software maintenance (ICSM10)
go back to reference Stevens R (2015) A declarative foundation for comprehensive history querying. In: Proceedings of the 37th international conference on software engineering, doctoral symposium track (ICSE15) Stevens R (2015) A declarative foundation for comprehensive history querying. In: Proceedings of the 37th international conference on software engineering, doctoral symposium track (ICSE15)
go back to reference Stevens R, De Roover C (2014) Querying the history of software projects using QWALKEKO. In: Proceedings of the 30th international conference on software maintenance and evolution Stevens R, De Roover C (2014) Querying the history of software projects using QWALKEKO. In: Proceedings of the 30th international conference on software maintenance and evolution
go back to reference Stevens R, De Roover C (2017) Extracting executable transformations from distilled code changes. In: Proceedings of the 24th international conference on software analysis, evolution and reengineering (SANER17) Stevens R, De Roover C (2017) Extracting executable transformations from distilled code changes. In: Proceedings of the 24th international conference on software analysis, evolution and reengineering (SANER17)
go back to reference Uquillas Gómez V, Ducasse S, Kellens A (2014) Supporting streams of changes during branch integration. Sci Comput Program 96 Uquillas Gómez V, Ducasse S, Kellens A (2014) Supporting streams of changes during branch integration. Sci Comput Program 96
Metadata
Title
Querying distilled code changes to extract executable transformations
Authors
Reinout Stevens
Tim Molderez
Coen De Roover
Publication date
30-08-2018
Publisher
Springer US
Published in
Empirical Software Engineering / Issue 1/2019
Print ISSN: 1382-3256
Electronic ISSN: 1573-7616
DOI
https://doi.org/10.1007/s10664-018-9644-3

Other articles of this Issue 1/2019

Empirical Software Engineering 1/2019 Go to the issue

Premium Partner