Giter VIP home page Giter VIP logo

conflerge's Introduction

#Conflerge Conflerge is custom mergetool that strives to automatically resolve merge conflicts. This is an attempt to demonstrate that finer grain merging, unlike the line-by-line merging in Git, can result in fewer false-positive conflicts with a competitive false-negative rate.

We attempted finer grain merging with two approaches: Token-based and Abstract Syntax Tree based.

###Tokenization A token is an individual keyword in source code such as a reserved keyword, variable name or constant. For example, tokenizing the Java statement System.out.println(hello); yields the token sequence [ System . out . println ( hello ) ; ] We use the Wagner-Fischer Algorithm [1] to find the edit distance between BASE and LOCAL, and between BASE and REMOTE.

###Abstract Syntax Trees In contrast to tokens, Abstract Syntax Trees retain information about the syntactic structure of the code as hierarchical parent-child relationships. Each node has an ordered set of children. We use the mmdiff algorithm [2] to find the edit distance between BASE and LOCAL, and between BASE and REMOTE.

#Architecture

Conflerge architecture

Conflerge is implemented as a mergetool. Git provides the relevant versions of BASE, LOCAL and REMOTE. We use javaparser to parse and unparse the source code files. We also use it for tokenization and the construction of abstract syntax trees.

#Usage

Conflerge is currently scoped to work with Java source code files and Git.

To use the tool:

  • Clone the Conflerge repository to ~/.
  • Update your .gitconfig to include:
    [mergetool "conflerge-tree"]
		cmd = java -jar ~/Conflerge/ConflergeTree.jar \$BASE \$LOCAL \$REMOTE \$MERGED
    [mergetool "conflerge-token"]
        cmd = java -jar ~/Conflerge/ConflergeToken.jar \$BASE \$LOCAL \$REMOTE \$MERGED
    [merge]
        tool = conflerge-tree
        tool = conflerge-token
  • To run with token-based merging: git mergetool --tool=conflerge-token <conflicting file>

  • To run with AST-based merging: git mergetool --tool=conflerge-tree <conflicting file>

  • Note: Our experiments showed that AST-based merging was the more successful strategy, so we recommend using conflerge-tree.

Instructions to recreate the results in the paper can be found here.

###References [1] Gonzalo Navarro. 2001. A guided tour to approximate string matching. ACM Comput. Surv. 33, 1(March 2001), 31-88.

[2] Sudarshan S. Chawathe. 1999. Comparing Hierarchical Data in External Memory. In Proceedings ofthe 25th International Conference on Very Large Data Bases (VLDB โ€™99), Malcolm P. Atkinson, Maria E.Orlowska, Patrick Valduriez, Stanley B. Zdonik, and Michael L. Brodie (Eds.). Morgan Kaufmann PublishersInc., San Francisco, CA, USA, 90-101

conflerge's People

Contributors

glennhanawalt avatar glennhanawalt95 avatar ishansaksena avatar johnlawsharrison avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

glennhanawalt95

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.