Planning for Untangling: Predicting the Difficulty of Merge Conflicts

Merge conflicts are inevitable in collaborative software development and are disruptive. When they occur, developers have to stop their current work, understand the conflict and the surrounding code, and plan an appropriate resolution. However, not all conflicts are equally problematic—some can be easily fixed, while others might be complicated enough to need multiple people. Currently, there is not much support to help developers plan their conflict resolution. In this work, we aim to predict the difficulty of a merge conflict so as to help developers plan their conflict resolution. The ability to predict the difficulty of a merge conflict and to identify the underlying factors for its difficulty can help tool builders improve their conflict detection tools to prioritize and warn developers of difficult conflicts. In this work, we investigate the characteristics of difficult merge conflicts, and automatically classify them. We analyzed 6,380 conflicts across 128 java projects and found that merge conflict difficulty can be accurately predicted (AUC of 0.76) through machine learning algorithms, such as bagging.

[1]  Antti Nieminen,et al.  Real-time collaborative resolving of merge conflicts , 2012, 8th International Conference on Collaborative Computing: Networking, Applications and Worksharing (CollaborateCom).

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

[3]  Daniela E. Damian,et al.  The promises and perils of mining GitHub , 2009, MSR 2014.

[4]  M. Shepperd,et al.  A critique of cyclomatic complexity as a software metric , 1988, Softw. Eng. J..

[5]  Lars Kotthoff,et al.  Auto-WEKA 2.0: Automatic model selection and hyperparameter optimization in WEKA , 2017, J. Mach. Learn. Res..

[6]  Harald C. Gall,et al.  Comparing fine-grained source code changes and code churn for bug prediction , 2011, MSR '11.

[7]  Cláudia Maria Lima Werner,et al.  To lock, or not to lock: That is the question , 2012, J. Syst. Softw..

[8]  Daniel Jackson,et al.  Semantic Diff: a tool for summarizing the effects of modifications , 1994, Proceedings 1994 International Conference on Software Maintenance.

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

[10]  André van der Hoek,et al.  CASI: preventing indirect conflicts through a live visualization , 2010, CHASE '10.

[11]  Nando de Freitas,et al.  A Tutorial on Bayesian Optimization of Expensive Cost Functions, with Application to Active User Modeling and Hierarchical Reinforcement Learning , 2010, ArXiv.

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

[13]  Abraham Bernstein,et al.  Improving defect prediction using temporal features and non linear models , 2007, IWPSE '07.

[14]  Scott Chacon,et al.  Pro Git , 2009, Apress.

[15]  Haifeng Shen,et al.  Syntax-based reconciliation for asynchronous collaborative writing , 2005, 2005 International Conference on Collaborative Computing: Networking, Applications and Worksharing.

[16]  Premkumar T. Devanbu,et al.  How, and why, process metrics are better , 2013, 2013 35th International Conference on Software Engineering (ICSE).

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

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

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

[20]  Aaron Klein,et al.  Efficient and Robust Automated Machine Learning , 2015, NIPS.

[21]  Harald C. Gall,et al.  Cross-project defect prediction: a large scale experiment on data vs. domain vs. process , 2009, ESEC/SIGSOFT FSE.

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

[23]  William W. Cohen Fast Effective Rule Induction , 1995, ICML.

[24]  Jacob Cohen,et al.  Applied multiple regression/correlation analysis for the behavioral sciences , 1979 .

[25]  Frank Tip,et al.  Safe-commit analysis to facilitate team software development , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[26]  Thomas Berlage,et al.  A framework for shared applications with a replicated architecture , 1993, UIST '93.

[27]  Leo Breiman,et al.  Bagging Predictors , 1996, Machine Learning.

[28]  Eugene W. Myers,et al.  AnO(ND) difference algorithm and its variations , 1986, Algorithmica.

[29]  Jim Buffenbarger,et al.  Syntactic Software Merging , 1995, SCM.

[30]  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.

[31]  Michele Lanza,et al.  Ninth international workshop on Principles of software evolution: in conjunction with the 6th ESEC/FSE joint meeting , 2007, FSE 2007.

[32]  Martin Pinzger,et al.  Method-level bug prediction , 2012, Proceedings of the 2012 ACM-IEEE International Symposium on Empirical Software Engineering and Measurement.

[33]  Ron Kohavi,et al.  Irrelevant Features and the Subset Selection Problem , 1994, ICML.

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

[35]  Sven Apel,et al.  Balancing precision and performance in structured merge , 2014, Automated Software Engineering.

[36]  Welf Löwe,et al.  Quantitative Evaluation of Software Quality Metrics in Open-Source Projects , 2009, 2009 International Conference on Advanced Information Networking and Applications Workshops.

[37]  Michele Lanza,et al.  Syde: a tool for collaborative software development , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[38]  Ayse Basar Bener,et al.  Empirical Evaluation of Mixed-Project Defect Prediction Models , 2011, 2011 37th EUROMICRO Conference on Software Engineering and Advanced Applications.

[39]  Iftekhar Ahmed,et al.  An Empirical Examination of the Relationship between Code Smells and Merge Conflicts , 2017, 2017 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM).

[40]  Paulo Borba,et al.  Assessing Semistructured Merge in Version Control Systems: A Replicated Experiment , 2015, 2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM).

[41]  Lucas Batista Leite de Souza,et al.  Do software categories impact coupling metrics? , 2013, 2013 10th Working Conference on Mining Software Repositories (MSR).

[42]  Sven Apel,et al.  Indicators for merge conflicts in the wild: survey and empirical study , 2018, Automated Software Engineering.

[43]  Shane McKee,et al.  The life-cycle of merge conflicts: processes, barriers, and strategies , 2019, Empirical Software Engineering.

[44]  Leyton-BrownKevin,et al.  Auto-WEKA 2.0 , 2017 .

[45]  David Lo,et al.  Predicting Crashing Releases of Mobile Applications , 2016, ESEM.

[46]  Barry W. Boehm,et al.  Quantitative evaluation of software quality , 1976, ICSE '76.

[47]  Tom Mens,et al.  A State-of-the-Art Survey on Software Merging , 2002, IEEE Trans. Software Eng..

[48]  Shane McIntosh,et al.  Automated Parameter Optimization of Classification Techniques for Defect Prediction Models , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE).

[49]  Eugene W. Myers,et al.  A file comparison program , 1985, Softw. Pract. Exp..

[50]  Catarina Costa,et al.  TIPMerge: recommending developers for merging branches , 2016, SIGSOFT FSE.

[51]  Bernhard Westfechtel,et al.  Structure-oriented merging of revisions of software documents , 1991, SCM '91.

[52]  Audris Mockus,et al.  Towards building a universal defect prediction model , 2014, MSR 2014.

[53]  Ayse Basar Bener,et al.  Reducing false alarms in software defect prediction by decision threshold optimization , 2009, 2009 3rd International Symposium on Empirical Software Engineering and Measurement.

[54]  Gabriele Bavota,et al.  A Developer Centered Bug Prediction Model , 2018, IEEE Transactions on Software Engineering.

[55]  Guangchun Luo,et al.  Transfer learning for cross-company software defect prediction , 2012, Inf. Softw. Technol..

[56]  Iftekhar Ahmed,et al.  An Empirical Study of Design Degradation: How Software Projects Get Worse over Time , 2015, 2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM).

[57]  Ernst Lippe,et al.  Operation-based merging , 1992, SDE 5.

[58]  Frank E. Harrell,et al.  Regression Modeling Strategies: With Applications to Linear Models, Logistic Regression, and Survival Analysis , 2001 .

[59]  Valdis Berzins,et al.  Software merge: semantics of combining changes to programs , 1994, TOPL.

[60]  Yuriy Brun,et al.  Proactive detection of collaboration conflicts , 2011, ESEC/FSE '11.

[61]  N. Graham,et al.  Areas beneath the relative operating characteristics (ROC) and relative operating levels (ROL) curves: Statistical significance and interpretation , 2002 .

[62]  Leonardo Murta,et al.  On the Nature of Merge Conflicts: A Study of 2,731 Open Source Java Projects Hosted by GitHub , 2020, IEEE Transactions on Software Engineering.

[63]  James E. Helmreich Regression Modeling Strategies with Applications to Linear Models, Logistic and Ordinal Regression and Survival Analysis (2nd Edition) , 2016 .

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

[65]  Stephen P. Berczuk,et al.  Software Configuration Management Patterns: Effective Teamwork, Practical Integration , 2003 .