Understanding Predictive Factors for Merge Conflicts

Size Factors Descriptive Statistics


Ruby Sample
Study Design
Python Sample
Study Design

Likelihood of conflict occurrence increases when contributions to be merged have more developers, commits, changed files, and changed lines


See Collinearity diagnostic results here
Ruby Sample (Models II-IV) - Odds Ratios from Regression Assessing Merge Conflicts Factors
Factor Metric Model I Model II Model III Model IV Model V Model VI Model VII
Changes to a common slice 6.13 *** 4.28 *** 3.80 *** 5.18 *** 4.28 *** 3.78 *** 5.11 ***
Number of commits 3.55 *** 3.53 ***
Number of developers 1.17 *** 1.56 *** 1.15 *** 1.51 ***
Number of changed files 3.27 *** 3.24 ***
Number of changed lines 0.99 0.99
Duration 1.04 *** 1.09 ***
Conclusion delay 1.01 1.01 1.01
Deviance Explained 10.9% 17.5% 19.0% 14.3% 17.5% 19.0% 14.5%
*** p < 0.001 ** p < 0.01 * p < 0.05

See Collinearity diagnostic results here
Python Sample (Models II-IV) - Odds Ratios from Regression Assessing Merge Conflicts Factors
Factor Metric Model I Model II Model III Model IV Model V Model VI Model VII
Changes to a common slice 4.39 *** 2.82 *** 3.13 *** 3.60 *** 2.83 *** 3.11 *** 3.52 ***
Number of commits 2.16 *** 2.17 ***
Number of developers 1.36 *** 1.45 *** 1.36 *** 1.44 ***
Number of changed files 2.40 *** 2.17 ***
Number of changed lines 1.64 *** 1.49 ***
Duration 1.18 *** 1.23 ***
Conclusion delay 0.98 0.87 *** 0.85 ***
Deviance Explained 7.1% 14.4% 13.5% 11.6% 14.4% 14.3% 12.7%
*** p < 0.001 ** p < 0.01 * p < 0.05

Contribution size does not predict the extent of merge damage


Ruby Sample - Size metrics do not correlate strongly with Number of Merge Conflicts
Size Metrics cor p-value
Number of developers 0.1841854 < 2.2e-16
Number of commits 0.3234939 < 2.2e-16
Number of changed files 0.3660037 < 2.2e-16
Number of changed lines 0.3607888 < 2.2e-16

Python Sample - Size metrics do not correlate strongly with Number of Merge Conflicts
Size Metrics cor p-value
Number of developers 0.1379625 < 2.2e-16
Number of commits 0.3034841 < 2.2e-16
Number of changed files 0.325837 < 2.2e-16
Number of changed lines 0.3024995 < 2.2e-16

Ruby Sample - Size metrics do not correlate strongly with Number of Files with Merge Conflicts
Size Metrics cor p-value
Number of developers 0.1846815 < 2.2e-16
Number of commits 0.3238114 < 2.2e-16
Number of changed files 0.3667021 < 2.2e-16
Number of changed lines 0.3604608 < 2.2e-16

Python Sample - Size metrics do not correlate strongly with Number of Files with Merge Conflicts
Size Metrics cor p-value
Number of developers 0.1401576 < 2.2e-16
Number of commits 0.3038332 < 2.2e-16
Number of changed files 0.3269765 < 2.2e-16
Number of changed lines 0.3029361 < 2.2e-16