Giter Club home page Giter Club logo

smat's Introduction

SMAT: Identifying Semantic Merge Conflicts Via Automated Behavior Change Detection

This project aims to detect semantic conflicts by generating and running test suites on merge scenarios.

Getting Started

  • Clone the project locally using the command on your prompt: git clone https://github.com/leusonmario/SMAT
  • After cloning, you must rename the configuration file env-config.template.json for env-config.json, and set up the required information for java_home. You must inform the location that Java was installed on your project. In case this environment variable is already configured, you don't need to inform this information again. For more information regarding the configuration, please refer to the configuration documentation.
  • Next, you must inform the path of the file with the list of merge scenarios to be analyzed for the field path_hash_csv. Bellow, we provide further information to use the dataset we used to perform our study.
  • Our scripts require Python 3.6.x. In case you are running the scripts on a Linux terminal, you can just call the semantic_study.py file (python3 semantic_study.py). As a result, the file semantic_conflict_results.csv and the folder output-test-dest grouping the generated test suites will be created.

Getting Dataset

  • Clone the project MergeDataSet locally.
  • Next, perform a checkout for the commit c8b965f.
  • Finally, run the script get_sample.py.
  • As a result, the file results_semantic_study.csv will be created. If you want to analyze other merge scenarios, you must provide a file the same information provided in our dataset.

Providing input

SMAT allows the user to provide many scenarios for analysis using a JSON file. This JSON file consists of an array including each scenario that's going to be evaluated. The JSON file has the following structure:

[
  {
    "projectName": "spring-boot",
    "runAnalysis": true,
    "scenarioCommits": {
      "base": "7578f2f824aac027529878810b76ee176b39e73a",
      "left": "0d00039ae7d01538de3f813b17d125dc5fdd5706",
      "right": "1c21f54bf91283d70e04c49ea09a4c05a885d7ac",
      "merge": "3eebbe1c8aed529e6903e78476492592ce0b0049"
    },
    "targets": {
      "org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory": [
        "createDeploymentManager(org.springframework.boot.context.embedded.ServletContextInitializer[])"
      ]
    },
    "scenarioJars": {
      "base": "/home/jpedroh/Projetos/cin/testes-smat/spring-boot/7578f2f824aac027529878810b76ee176b39e73a-createDeploymentManager.jar",
      "left": "/home/jpedroh/Projetos/cin/testes-smat/spring-boot/0d00039ae7d01538de3f813b17d125dc5fdd5706-createDeploymentManager.jar",
      "right": "/home/jpedroh/Projetos/cin/testes-smat/spring-boot/1c21f54bf91283d70e04c49ea09a4c05a885d7ac-createDeploymentManager.jar",
      "merge": "/home/jpedroh/Projetos/cin/testes-smat/spring-boot/3eebbe1c8aed529e6903e78476492592ce0b0049-createDeploymentManager.jar"
    },
    "jarType": "transformation"
  }
]

The scenarios file path can then be informed in the env-config.json file using the input_path field.

Attentions When Using Windows

If you use Windows as your operating system, when you clone this project, you will probably receive an error message due to the size of a few file names. This problem will make it impossible for you to clone this repository.

To resolve this, you must install the Windows Subsystem for Linux (WSL); just follow the steps outlined in this guide. At the end of the installation, just open the Linux terminal on your Windows and clone the project as usual.

To execute the project, we advise you to use VSCode, because it has extensions to integrate with WSL. Once WSL is installed, when opening VSCode, a message will be displayed to download the Remote - WSL extension. With it, it is possible to edit all the files that are in WSL through VSCode and execute the project via terminal.

smat's People

Contributors

jpedroh avatar leusonmario avatar marcioaug avatar tonimaciel avatar vtlscin avatar leofernandesmo avatar jprmoisakis avatar semantic-conflicts avatar pauloborba avatar merge-conflict-factors avatar

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.