Giter Site home page Giter Site logo

redebug's Introduction

ReDeBug

Unpatched code clone detection tool - reimplemented version in Python.

Please refer to our IEEE S&P research paper and USENIX ;login: article for technical details.

Note that this is a reimplemented version in Python for usability and adaptability, and different from the original faster C implementation used in IEEE S&P evaluation.

Dependencies

  • bitarray, python-magic, and argparse modules: pip install bitarray python-magic argparse
  • libmagic package: apt-get install libmagic-dev on Ubuntu/Debian, brew install libmagic on OSX

Usage

Please refer to the help message for options:

$ python redebug.py -h
usage: redebug.py [-h] [-n NUM] [-c NUM] [-v] patch_path source_path

positional arguments:
  patch_path            path to patch files (in unified diff format)
  source_path           path to source files

optional arguments:
  -h, --help            show this help message and exit
  -n NUM, --ngram NUM   use n-gram of NUM lines (default: 4)
  -c NUM, --context NUM
                        print NUM lines of context (default: 10)
  -v, --verbose         enable verbose mode (default: False)

redebug's People

Contributors

dbrumley avatar souljang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redebug's Issues

magic.open ERROR. AttributeError: 'module' object has no attribute 'open

Hi, I have trouble in running this project under Python2.7
user@user:~/git/redebug$ python redebug.py /home/user/xxx /home/user/xxx Traceback (most recent call last): File "redebug.py", line 65, in <module> common.magic_cookie = magic.open(magic.MAGIC_MIME) AttributeError: 'module' object has no attribute 'open'

I found that in my magic.py, there is no method named "magic.open", and I want to know how to fix this. Thanks

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.