Semantic Slicing of Software Version Histories (T)

Software developers often need to transfer func-tionality, e.g., a set of commits implementing a new feature or a bug fix, from one branch of a configuration management system to another. That can be a challenging task as the existing configuration management tools lack support for matching high-level semantic functionality with low-level version histories. The developer thus has to either manually identify the exact set of semantically-related commits implementing the functionality of interest or sequentially port a specific subset of the change history, "inheriting" additional, unwanted functionality. In this paper, we tackle this problem by providing automated support for identifying the set of semantically-related commits implementing a particular functionality, which is defined by a set of tests. We refer to our approach, CSLICER, as semantic slicing of version histories. We formally define the semantic slicing problem, provide an algorithm for identifying a set of commits that constitute a slice, and instantiate it in a specific implementation for Java projects managed in Git. We evaluate the correctness and effectiveness of our approach on a set of open-source software repositories. We show that it allows to identify subsets of change histories that maintain the functionality of interest but are substantially smaller than the original ones.

[1]  Frank Tip,et al.  A survey of program slicing techniques , 1994, J. Program. Lang..

[2]  Robert S. Arnold,et al.  Software Change Impact Analysis , 1996 .

[3]  Philip Bille,et al.  A survey on tree edit distance and related problems , 2005, Theor. Comput. Sci..

[4]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

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

[6]  Marsha Chechik,et al.  Semantic Slicing of Software Version Histories (T) , 2015, ASE.

[7]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

[8]  Akira Mori,et al.  Diff/TS: A Tool for Fine-Grained Structural Change Analysis , 2008, 2008 15th Working Conference on Reverse Engineering.

[9]  Matthew B. Dwyer,et al.  Differential symbolic execution , 2008, SIGSOFT '08/FSE-16.

[10]  Klaus Pohl,et al.  Software Product Line Engineering - Foundations, Principles, and Techniques , 2005 .

[11]  Marsha Chechik,et al.  Precise semantic history slicing through dynamic delta refinement , 2016, 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE).

[12]  Andreas Zeller,et al.  Mining Version Histories to Guide Software Changes , 2004 .

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

[14]  A. B. Kahn,et al.  Topological sorting of large networks , 1962, CACM.

[15]  Gregg Rothermel,et al.  A framework for evaluating regression test selection techniques , 1994, Proceedings of 16th International Conference on Software Engineering.

[16]  Thomas W. Reps,et al.  Precise Interprocedural Dataflow Analysis with Applications to Constant Propagation , 1995, TAPSOFT.

[17]  Sven Apel,et al.  Type-Checking Software Product Lines - A Formal Approach , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[18]  Yuriy Brun,et al.  Early Detection of Collaboration Conflicts and Risks , 2013, IEEE Transactions on Software Engineering.

[19]  Sven Apel,et al.  Guaranteeing Syntactic Correctness for All Product Line Variants: A Language-Independent Approach , 2009, TOOLS.

[20]  Ralph E. Johnson,et al.  Automated Detection of Refactorings in Evolving Components , 2006, ECOOP.

[21]  Carsten Görg,et al.  Detecting and visualizing refactorings from software archives , 2005, 13th International Workshop on Program Comprehension (IWPC'05).

[22]  Yuriy Brun,et al.  Development History Granularity Transformations (N) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[23]  Paul Clements,et al.  Software product lines - practices and patterns , 2001, SEI series in software engineering.

[24]  David Chenho Kung,et al.  Change impact identification in object oriented software maintenance , 1994, Proceedings 1994 International Conference on Software Maintenance.

[25]  Andreas Zeller,et al.  The impact of tangled code changes , 2013, 2013 10th Working Conference on Mining Software Repositories (MSR).

[26]  Shinpei Hayashi,et al.  Refactoring edit history of source code , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[27]  Andreas Zeller,et al.  Assessing Oracle Quality with Checked Coverage , 2011, 2011 Fourth IEEE International Conference on Software Testing, Verification and Validation.

[28]  C. A. R. Hoare,et al.  Differential static analysis: opportunities, applications, and challenges , 2010, FoSER '10.

[29]  Alessandro Orso,et al.  Leveraging field data for impact analysis and regression testing , 2003, ESEC/FSE-11.

[30]  Andreas Zeller,et al.  Yesterday, my program worked. Today, it does not. Why? , 1999, ESEC/FSE-7.

[31]  Harald C. Gall,et al.  Classifying Change Types for Qualifying Change Couplings , 2006, 14th IEEE International Conference on Program Comprehension (ICPC'06).

[32]  Ralph E. Johnson,et al.  Effective Software Merging in the Presence of Object-Oriented Refactorings , 2008, IEEE Transactions on Software Engineering.

[33]  Sarfraz Khurshid,et al.  Localizing failure-inducing program edits based on spectrum information , 2011, 2011 27th IEEE International Conference on Software Maintenance (ICSM).

[34]  Gregg Rothermel,et al.  Whole program path-based dynamic impact analysis , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[35]  Marsha Chechik,et al.  Managing forked product variants , 2012, SPLC '12.

[36]  Martin P. Robillard,et al.  Non-essential changes in version histories , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

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

[38]  Jianjun Zhao,et al.  Change impact analysis for AspectJ programs , 2008, 2008 IEEE International Conference on Software Maintenance.

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

[40]  Andreas Zeller,et al.  Simplifying and Isolating Failure-Inducing Input , 2002, IEEE Trans. Software Eng..

[41]  Frank Tip,et al.  Chianti: a tool for change impact analysis of java programs , 2004, OOPSLA.