Delta refactoring for merge conflict avoidance
Abstract
Today's software are developed and maintained by multiple developers. A particular source code can be updated from multiple sources which can possibly lead to a conflict. Manual resolution of such conflict is time consuming and error prone. Various frameworks address this problem in different ways - some define guidelines or contracts to avoid such conflict, others use powerful merge tools to automatically resolve the conflicts. We observe that in many cases the conflicts are due to identical update locations. Such a conflict can be avoided if the change is performed in some other location. In this paper we developed Delta Refactoring, a set of semantic preserving program transformations to move a change to a safe location - either following the guidelines or outside the conflict region determined by the text-based merging tool. Our main motivation is to solve a problem in SAP-ERP domain where conflicts occur during the merge of SAP updates and custom enhancements. We also demonstrate the effectiveness of our solution in the context of diff3 based textual merge used in source code management systems.