Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3643916.3644433acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article
Open access

Understanding the Impact of Branch Edit Features for the Automatic Prediction of Merge Conflict Resolutions

Published: 13 June 2024 Publication History

Abstract

Developers regularly have to resolve merge conflicts, i.e., two conflicting sets of changes to the same files in different branches, which can be tedious and error-prone. To resolve conflicts, developers typically: keep the local version (KL) or the remote version (KR) of the code. They also sometimes manually edit both versions into a single one (ME). However, most existing techniques only support merging the local and remote versions (the ME strategy).
We recently proposed RPredictor, a machine learning-based approach to support developers in choosing how to resolve a conflict (by KL, KR, or ME), by predicting their resolution strategy. In its original design, RPredictor uses a set of Evolution History Features (EHFs) that capture: the magnitude of the changes in conflict, their evolution, and the experience of the developers involved.
In this paper, we proposed and evaluated a new set of Branch Edit Features (BEFs), that capture the fine-grained edits that were performed on each branch of the conflict. We learned multiple lessons. First, BEFs provided lower effectiveness (F-score) than the original EHFs. Second, combining BEFs with EHFs still did not improve the effectiveness of EHFs, it provided the same f-score. Third, the feature set that provided highest effectiveness in our experiments was the combination of EHFs with a subset of BEFs that captures the number of insertions performed in the local branch, but this combination only improved EHFs by 3 pp. f-score. Finally, our experiments also share the lesson that some feature sets provided higher C-score (i.e., the safety of the technique's mistakes) as a trade-off for lower f-scores. This may be valued by developers and we believe that it should be studied in the future.

References

[1]
2021. git merge - Integrating changes from another branch. https://www.git-tower.com/learn/git/commands/git-merge.
[2]
2021. jFSTMerge. https://github.com/guilhermejccavalcanti/jFSTMerge.
[3]
2023. Kruskal-Wallis Test. https://www.statisticssolutions.com/kruskal-wallis-test/.
[4]
2024. Research Artifact for Paper: Understanding the Impact of Branch Edit Features for the Automatic Prediction of Merge Conflict Resolutions.
[5]
I. Ahmed, C. Brindescu, U. A. Mannan, C. Jensen, and A. Sarma. 2017. An Empirical Examination of the Relationship between Code Smells and Merge Conflicts. In 2017 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). 58--67.
[6]
Khadijah Al Safwan, Mohammed Elarnaoty, and Francisco Servant. 2022. Developers' Need for the Rationale of Code Commits: An In-breadth and In-depth Study. Journal of Systems and Software (2022).
[7]
Khadijah Al Safwan and Francisco Servant. 2019. Decomposing the Rationale of Code Commits: The Software Developer's Perspective. In Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering.
[8]
Waad Aldndni, Na Meng, and Francisco Servant. 2023. Automatic prediction of developers' resolutions for software merge conflicts. Journal of Systems and Software 206 (2023), 111836.
[9]
Sven Apel, Olaf Lessenich, and Christian Lengauer. 2012. Structured Merge with Auto-tuning: Balancing Precision and Performance. In Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering (Essen, Germany) (ASE 2012). ACM, New York, NY, USA, 120--129.
[10]
Sven Apel, Jorg Liebig, Benjamin Brandl, Christian Lengauer, and Christian Kastner. 2011. Semistructured Merge: Rethinking Merge in Revision Control Systems. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering (Szeged, Hungary) (ESEC/FSE '11). ACM, New York, NY, USA, 190--200.
[11]
Jacob T. Biehl, Mary Czerwinski, Mary Czerwinski, Greg Smith, and George G. Robertson. 2007. FASTDash: A Visual Dashboard for Fostering Awareness in Software Teams. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (San Jose, California, USA) (CHI '07). ACM, New York, NY, USA, 1313--1322.
[12]
Caius Brindescu, Iftekhar Ahmed, Carlos Jensen, and Anita Sarma. 2020. An empirical investigation into merge conflicts and their effect on software quality. Empirical Software Engineering 25, 1 (2020), 562--590.
[13]
Yuriy Brun, Reid Holmes, Michael D. Ernst, and David Notkin. 2011. Proactive Detection of Collaboration Conflicts. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering (Szeged, Hungary) (ESEC/FSE '11). ACM, New York, NY, USA, 168--178.
[14]
Y. Brun, R. Holmes, M. D. Ernst, and D. Notkin. 2013. Early Detection of Collaboration Conflicts and Risks. IEEE Transactions on Software Engineering 39, 10 (Oct 2013), 1358--1375.
[15]
Guilherme Cavalcanti, Paulo Borba, and Paola Accioly. 2017. Evaluating and Improving Semistructured Merge. Proc. ACM Program. Lang. 1, OOPSLA, Article 59 (Oct. 2017), 27 pages.
[16]
Lykes Claytor and Francisco Servant. 2018. Understanding and Leveraging Developer Inexpertise. In International Conference on Software Engineering: Companion Proceeedings.
[17]
James C Davis, Christy A Coghlan, Francisco Servant, and Dongyoon Lee. 2018. The Impact of Regular Expression Denial of Service (ReDoS) in Practice: an Empirical Study at the Ecosystem Scale. In The ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE).
[18]
James C. Davis, Louis G. Michael IV, Christy A. Coghlan, Francisco Servant, and Dongyoon Lee. 2019. Why Aren't Regular Expressions a Lingua Franca? An Empirical Study on the Re-Use and Portability of Regular Expressions. In Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering.
[19]
Elizabeth Dinella, Todd Mytkowicz, Alexey Svyatkovskiy, Christian Bird, Mayur Naik, and Shuvendu Lahiri. 2023. DeepMerge: Learning to Merge Programs. IEEE Transactions on Software Engineering 49, 4 (2023), 1599--1614.
[20]
Mohammed El Arnaoty and Francisco Servant. 2024. OneSpace: Detecting cross-language clones by learning a common embedding space. Journal of Systems and Software 208 (2024), 111911.
[21]
Paulo Elias, Heleno de S. Campos, Eduardo Ogasawara, and Leonardo Gresta Paulino Murta. 2023. Towards accurate recommendations of merge conflicts resolution strategies. Information and Software Technology 164 (2023), 107332.
[22]
H Christian Estler, Martin Nordio, Carlo A Furia, and Bertrand Meyer. 2014. Awareness and merge conflicts in distributed software development. In 2014 IEEE 9th International Conference on Global Software Engineering. IEEE, 26--35.
[23]
Jean-Rémy Falleri, Floréal Morandat, Xavier Blanc, Matias Martinez, and Martin Monperrus. 2014. Fine-Grained and Accurate Source Code Differencing. In Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering (Vasteras, Sweden) (ASE '14). Association for Computing Machinery, New York, NY, USA, 313--324.
[24]
Aakash Gautam, Saket Vishwasrao, and Francisco Servant. 2017. An Empirical Study of Activity, Popularity, Size, Testing, and Stability in Continuous Integration. In International Conference on Mining Software Repositories.
[25]
Gleiph Ghiotto, Leonardo Murta, Márcio Barros, and André van der Hoek. 2018. On the Nature of Merge Conflicts: a Study of 2,731 Open Source Java Projects Hosted by GitHub. IEEE Transactions on Software Engineering (2018), 1--1.
[26]
M. L. Guimarães and A. R. Silva. 2012. Improving early detection of software merge conflicts. In 2012 34th International Conference on Software Engineering (ICSE). 342--352.
[27]
Sk Adnan Hassan, Zainab Aamir, Dongyoon Lee, James C. Davis, and Francisco Servant. 2023. Improving Developers' Understanding of Regex Denial of Service Tools through Anti-Patterns and Fix Strategies. In 2023 IEEE Symposium on Security and Privacy (SP). 1238--1255.
[28]
Xianhao Jin. 2021. Reducing Cost in Continuous Integration with a Collection of Build Selection Approaches. In Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering.
[29]
Xianhao Jin and Francisco Servant. 2018. The hidden cost of code completion: understanding the impact of the recommendation-list length on its efficiency. In Proceedings of the 15th International Conference on Mining Software Repositories (Gothenburg, Sweden) (MSR '18). Association for Computing Machinery, New York, NY, USA, 70--73.
[30]
Xianhao Jin and Francisco Servant. 2020. A Cost-efficient Approach to Building in Continuous Integration. In International Conference on Software Engineering.
[31]
Xianhao Jin and Francisco Servant. 2021. CIBench: A Dataset and Collection of Techniques for Build and Test Selection and Prioritization in Continuous Integration. In International Conference on Software Engineering: Companion Proceedings.
[32]
Xianhao Jin and Francisco Servant. 2021. What Helped, and What Did Not? An Evaluation of the Strategies to Improve Continuous Integration. In International Conference on Software Engineering.
[33]
Xianhao Jin and Francisco Servant. 2022. Which Builds are Really Safe to Skip? Maximizing Failure Observation for Build Selection in Continuous Integration. Journal of Systems and Software (2022).
[34]
Xianhao Jin and Francisco Servant. 2023. HybridCISave: A Combined Build and Test Selection Approach in Continuous Integration. ACM Transactions on Software Engineering and Methodology 32, 4, Article 93 (may 2023), 39 pages.
[35]
B. K. Kasi and A. Sarma. 2013. Cassandra: Proactive conflict minimization through optimized task scheduling. In 2013 35th International Conference on Software Engineering (ICSE). 732--741.
[36]
Ayaan M Kazerouni, James C Davis, Arinjoy Basak, Clifford A Shaffer, Francisco Servant, and Stephen H Edwards. 2021. Fast and Accurate Incremental Feedback for Students' Software Tests using Selective Mutation Analysis. Journal of Systems and Software (2021).
[37]
Ayaan M. Kazerouni, Clifford A. Shaffer, Stephen H. Edwards, and Francisco Servant. 2019. Assessing Incremental Testing Practices and Their Impact on Project Outcomes.
[38]
Michele Lanza, Marco D'Ambros, Alberto Bacchelli, Lile Hattori, and Francesco Rigotti. 2013. Manhattan: Supporting real-time visual team activity awareness. In 2013 21st International Conference on Program Comprehension (ICPC). IEEE, 207--210.
[39]
Olaf Leßenich, Sven Apel, and Christian Lengauer. 2015. Balancing Precision and Performance in Structured Merge. Automated Software Engg. 22, 3 (Sept. 2015), 367--397.
[40]
Olaf Leßenich, Janet Siegmund, Sven Apel, Christian Kästner, and Claus Hunsen. 2018. Indicators for merge conflicts in the wild: survey and empirical study. Automated Software Engineering 25, 2 (2018), 279--313.
[41]
Thomas W. MacFarland and Jan M. Yates. 2016. Kruskal-Wallis H-Test for Oneway Analysis of Variance (ANOVA) by Ranks. Springer International Publishing, Cham, 177--211.
[42]
Chandra Maddila, Nachiappan Nagappan, Christian Bird, Georgios Gousios, and Arie van Deursen. 2021. ConE: A Concurrent Edit Detection Tool for Large Scale Software Development. arXiv preprint arXiv:2101.06542 (2021).
[43]
M. Mahmoudi, S. Nadi, and N. Tsantalis. 2019. Are Refactorings to Blame? An Empirical Study of Refactorings in Merge Conflicts. In 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER). 151--162.
[44]
J.H. McDonald. 2014. Handbook of Biological Statistics (3rd ed.). Sparky House Publishing, Baltimore, Maryland, 157--164.
[45]
T. Mens. 2002. A state-of-the-art survey on software merging. IEEE Transactions on Software Engineering 28, 5 (2002), 449--462.
[46]
Louis G. Michael, James Donohue, James C. Davis, Dongyoon Lee, and Francisco Servant. 2019. Regexes are Hard: Decision-Making, Difficulties, and Risks in Programming Regular Expressions. In International Conference on Automated Software Engineering.
[47]
Nicholas Nelson, Caius Brindescu, Shane McKee, Anita Sarma, and Danny Dig. 2019. The life-cycle of merge conflicts: processes, barriers, and strategies. Empirical Software Engineering (02 2019).
[48]
Hoai Le Nguyen and Claudia-Lavinia Ignat. 2018. An Analysis of Merge Conflicts and Resolutions in Git-Based Open Source Projects. Computer Supported Cooperative Work (CSCW) 27, 3 (01 Dec 2018), 741--765.
[49]
Yuichi Nishimura and Katsuhisa Maruyama. 2016. Supporting Merge Conflict Resolution by Using Fine-Grained Code Change History. 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER) 1 (2016), 661--664.
[50]
Moein Owhadi-Kareshk, Sarah Nadi, and Julia Rubin. 2019. Predicting Merge Conflicts in Collaborative Software Development. https://arxiv.org/pdf/1907.06274.pdf.
[51]
Rangeet Pan, Vu Le, Nachiappan Nagappan, Sumit Gulwani, Shuvendu Lahiri, and Mike Kaufman. 2021. Can Program Synthesis Be Used to Learn Merge Conflict Resolutions? An Empirical Analysis. In Proceedings of the 43rd International Conference on Software Engineering (Madrid, Spain) (ICSE '21). IEEE Press, 785--796.
[52]
F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. 2011. Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research 12 (2011), 2825--2830.
[53]
Anita Sarma, David F Redmiles, and Andre Van Der Hoek. 2011. Palantir: Early detection of development conflicts arising from parallel code changes. IEEE Transactions on Software Engineering 38, 4 (2011), 889--908.
[54]
Francisco Servant. 2013. Supporting Bug Investigation using History Analysis. In International Conference on Automated Software Engineering.
[55]
Francisco Servant and James A Jones. 2011. History Slicing. In International Conference on Automated Software Engineering. IEEE.
[56]
Francisco Servant and James A Jones. 2012. History Slicing: Assisting Code-evolution Tasks. In International Symposium on the Foundations of Software Engineering.
[57]
Francisco Servant and James A Jones. 2012. WhoseFault: Automatic Developer-to-Fault Assignment through Fault Localization. In International Conference on Software Engineering.
[58]
Francisco Servant and James A Jones. 2013. Chronos: Visualizing Slices of Source-code History. In Working Conference on Software Visualization.
[59]
Francisco Servant and James A Jones. 2017. Fuzzy Fine-grained Code-history Analysis. In International Conference on Software Engineering.
[60]
Francisco Servant, James A Jones, and André Van Der Hoek. 2010. CASI: preventing indirect conflicts through a live visualization. In Proceedings of the 2010 ICSE Workshop on Cooperative and Human Aspects of Software Engineering. 39--46.
[61]
Bowen Shen, Muhammad Ali Gulzar, Fei He, and Na Meng. 2022. A Characterization Study of Merge Conflicts in Java Projects. ACM Trans. Softw. Eng. Methodol. (jun 2022). Just Accepted.
[62]
Bo Shen, Wei Zhang, Haiyan Zhao, Guangtai Liang, Zhi Jin, and Qianxiang Wang. 2019. IntelliMerge: A Refactoring-Aware Software Merging Technique. Proc. ACM Program. Lang. 3, OOPSLA, Article 170 (Oct. 2019), 28 pages.
[63]
Marcelo Sousa, Isil Dillig, and Shuvendu Lahiri. 2018. Verified Three-Way Program Merge. In Object-Oriented Programming, Systems, Languages & Applications Conference (OOPSLA 2018). ACM. https://www.microsoft.com/en-us/research/publication/verified-three-way-program-merge/
[64]
Alexey Svyatkovskiy, Sarah Fakhoury, Negar Ghorbani, Todd Mytkowicz, Elizabeth Dinella, Christian Bird, Jinu Jang, Neel Sundaresan, and Shuvendu K. Lahiri. 2022. Program Merge Conflict Resolution via Neural Transformers. In Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Singapore, Singapore) (ESEC/FSE 2022). Association for Computing Machinery, New York, NY, USA, 822--833.
[65]
Gustavo Vale, Claus Hunsen, Eduardo Figueiredo, and Sven Apel. 2021. Challenges of Resolving Merge Conflicts: A Mining and Survey Study. IEEE Transactions on Software Engineering (2021), 1--1.
[66]
R. Yuzuki, H. Hata, and K. Matsumoto. 2015. How we resolve conflict: an empirical study of method-level conflict resolution. In 2015 IEEE 1st International Workshop on Software Analytics (SWAN). 21--24.
[67]
Jialu Zhang, Todd Mytkowicz, Mike Kaufman, Ruzica Piskac, and Shuvendu K. Lahiri. 2022. Using Pre-Trained Language Models to Resolve Textual and Semantic Merge Conflicts (Experience Paper). In Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis (Virtual, South Korea) (ISSTA 2022). Association for Computing Machinery, New York, NY, USA, 77--88.
[68]
Fengmin Zhu and Fei He. 2018. Conflict Resolution for Structured Merge via Version Space Algebra. Proc. ACM Program. Lang. 2, OOPSLA, Article 166 (Oct. 2018), 25 pages.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICPC '24: Proceedings of the 32nd IEEE/ACM International Conference on Program Comprehension
April 2024
487 pages
ISBN:9798400705861
DOI:10.1145/3643916
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike International 4.0 License.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 13 June 2024

Check for updates

Qualifiers

  • Research-article

Funding Sources

Conference

ICPC '24
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 34
    Total Downloads
  • Downloads (Last 12 months)34
  • Downloads (Last 6 weeks)24
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media