Using acceptance tests to predict files changed by programming tasks

Abstract In a collaborative development context, conflicting code changes might compromise software quality and developers productivity. To reduce conflicts, one could avoid the parallel execution of potentially conflicting tasks. Although hopeful, this strategy is challenging because it relies on the prediction of the required file changes to complete a task. As predicting such file changes is hard, we investigate its feasibility for BDD (Behaviour-Driven Development) projects, which write automated acceptance tests before implementing features. We develop a tool that, for a given task, statically analyzes Cucumber tests and infers test-based interfaces (files that could be executed by the tests), approximating files that would be changed by the task. To assess the accuracy of this approximation, we measure precision and recall of test-based interfaces of 513 tasks from 18 Rails projects on GitHub. We also compare such interfaces with randomly defined interfaces, interfaces obtained by textual similarity of test specifications with past tasks, and interfaces computed by executing tests. Our results give evidence that, in the specific context of BDD, Cucumber tests might help to predict files changed by tasks. We find that the better the test coverage, the better the predictive power. A hybrid approach for computing test-based interfaces is promising.

[1]  King-Ip Lin,et al.  Clustering source code files to predict change propagation during software maintenance , 2012, ACM-SE '12.

[2]  Sven Apel,et al.  Structured merge with auto-tuning: balancing precision and performance , 2012, 2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.

[3]  Shane McIntosh,et al.  Modern Release Engineering in a Nutshell -- Why Researchers Should Care , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[4]  Sven Apel,et al.  Semistructured merge: rethinking merge in revision control systems , 2011, ESEC/FSE '11.

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

[6]  Fergus Henderson Software Engineering at Google , 2017, ArXiv.

[7]  Nikolaos Konstantinou,et al.  Detecting duplicate examples in behaviour driven development specifications , 2018, 2018 IEEE Workshop on Validation, Analysis and Evolution of Software Tests (VST).

[8]  Paul Dourish,et al.  "Breaking the code", moving between private and public work in collaborative software development , 2003, GROUP.

[9]  Christian Bird,et al.  Assessing the value of branches with what-if analysis , 2012, SIGSOFT FSE.

[10]  Kim B. Clark,et al.  Design Rules: The Power of Modularity , 2000 .

[11]  Paulo Borba,et al.  Evaluating and improving semistructured merge , 2017, Proc. ACM Program. Lang..

[12]  Christian Bird,et al.  Diversity in software engineering research , 2013, ESEC/FSE 2013.

[13]  Josh Levenberg,et al.  Why Google stores billions of lines of code in a single repository , 2016, Commun. ACM.

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

[15]  André van der Hoek,et al.  Palantir: Early Detection of Development Conflicts Arising from Parallel Code Changes , 2012, IEEE Transactions on Software Engineering.

[16]  Oliver Denninger,et al.  Recommending relevant code artifacts for change requests using multiple predictors , 2012, 2012 Third International Workshop on Recommendation Systems for Software Engineering (RSSE).

[17]  John Ferguson Smart,et al.  BDD in Action: Behavior-driven development for the whole software lifecycle , 2014 .

[18]  Janice Singer,et al.  Hipikat: a project memory for software development , 2005, IEEE Transactions on Software Engineering.

[19]  Björn Regnell,et al.  An industrial survey of requirements interdependencies in software product release planning , 2001, Proceedings Fifth IEEE International Symposium on Requirements Engineering.

[20]  Mary Czerwinski,et al.  FASTDash: a visual dashboard for fostering awareness in software teams , 2007, CHI.

[21]  Liming Zhu,et al.  DevOps - A Software Architect's Perspective , 2015, SEI series in software engineering.

[22]  António Rito Silva,et al.  Improving early detection of software merge conflicts , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[23]  Shane McKee,et al.  Software Practitioner Perspectives on Merge Conflicts and Resolutions , 2017, 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[24]  F. Wilcoxon SOME RAPID APPROXIMATE STATISTICAL PROCEDURES , 1950 .

[25]  Anita Sarma,et al.  Cassandra: Proactive conflict minimization through optimized task scheduling , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[26]  Bogdan Dit,et al.  TopicXP: Exploring topics in source code using Latent Dirichlet Allocation , 2010, 2010 IEEE International Conference on Software Maintenance.

[27]  Mehrdad Sabetzadeh,et al.  The Case for Context-Driven Software Engineering Research: Generalizability Is Overrated , 2017, IEEE Softw..

[28]  Rebecca E. Grinter Supporting articulation work using software configuration management systems , 1996, Computer Supported Cooperative Work (CSCW).

[29]  Michael McGill,et al.  Introduction to Modern Information Retrieval , 1983 .

[30]  Gail C. Murphy,et al.  Predicting source code changes by mining change history , 2004, IEEE Transactions on Software Engineering.

[31]  Harvey P. Siy,et al.  Parallel changes in large scale software development: an observational case study , 1998, TSEM.

[32]  Matt Wynne,et al.  The Cucumber Book: Behaviour-Driven Development for Testers and Developers , 2012 .

[33]  Breno Piva,et al.  The Next Release Problem: Complexity, Exact Algorithms and Computations , 2018, ISCO.

[34]  Tore Dybå,et al.  The daily stand-up meeting: A grounded theory study , 2016, J. Syst. Softw..

[35]  Harald C. Gall,et al.  Can we predict types of code changes? An empirical analysis , 2012, 2012 9th IEEE Working Conference on Mining Software Repositories (MSR).

[36]  Paulo Borba,et al.  Understanding semi-structured merge conflict characteristics in open-source Java projects , 2017, Empirical Software Engineering.

[37]  Mik Kersten,et al.  Using task context to improve programmer productivity , 2006, SIGSOFT '06/FSE-14.

[38]  Thomas Zimmermann Mining Workspace Updates in CVS , 2007, Fourth International Workshop on Mining Software Repositories (MSR'07:ICSE Workshops 2007).

[39]  Xin Yao,et al.  Dynamic Software Project Scheduling through a Proactive-Rescheduling Method , 2016, IEEE Transactions on Software Engineering.

[40]  Georgios Gousios,et al.  Untangling fine-grained code changes , 2015, 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[41]  Audris Mockus,et al.  Software Dependencies, Work Dependencies, and Their Impact on Failures , 2009, IEEE Transactions on Software Engineering.

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

[43]  Prasun Dewan,et al.  Semi-Synchronous Conflict Detection and Resolution in Asynchronous Software Development , 2007, ECSCW.