A service to check to be included code changes in git repositories for code clones and suggest solutions or fix them.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Johannes Wuensche 8abaa4aeab
Change pentagrid path
6 months ago
gradle/wrapper Initial commit 2 years ago
src Fix block matching 6 months ago
.gitattributes Initial commit 2 years ago
.gitignore Initial commit 2 years ago
Makefile Add example and usage to README 6 months ago
README.md Add example and usage to README 6 months ago
build.gradle.kts Add nop binding for slf4j 2 years ago
example.tar Add example and usage to README 6 months ago
gradlew Initial commit 2 years ago
gradlew.bat Initial commit 2 years ago
settings.gradle.kts Change pentagrid path 6 months ago

README.md

Welcome to ignitron 🥽💡🔬

This is a research project, exploring the possibility of automatic detection of clones in test code, and suggestions and actions to fix this automated to a degree. The research you'll see here is still ongoing, the results will be published later on.

Description

This application utilized the pentagrid library developed in conjunction, implementing the internal logic for comparisons of Abstract Syntax Trees. The ultimate goal is the automated detection of duplicated or copied sub trees in these, as well as the suggestion of modifications to minimize them.

This project is still on-going, expect changes and instabilities on the way.

Setup

For this repository you require gradle. A project build tool based on maven. All dependencies you need will be added once the build process begins.

A short description on how to install and setup gradle can be found here.

Building and Testing

To build and run the tests:

$ make

The process may take some time, but if everything is in order it should display a Build successful, all tests will also have passed at this point.

Installing the Application

Supported on linux and macos. If not standard on your distribution please add $HOME/.local/bin to your $PATH.

To install simply execute

$ make install

This installs the application to your local user .local/bin and .local/lib directories.

Usage

$ ignitron -h
Usage: ignitron options_list
Options:
    --pullrequest, -p -> PR Branch (always required) { String }
    --basebranch, -b -> Base Branch { String }
    --applypatches, -a [false] -> Whether to apply patches automatically
    --help, -h -> Usage info

Example

A small example repository for exploration can be found in the example.tar. Contained are three commits based on a case found in javaparser. The archive also contains a README with more information.

$ tar xf example.tar
$ cd example
$ ignitron -b 58ea852b42ac464faf61db514aecf01c8b4cccaa -p 5062e9d552e48f3f2bbe8a0ef14f73efc3277a15 | tail -n 1 | jq

It is advised to use jq to display the result for better human comprehension.

Author

Johannes Wünsche
📄 spacesnek.rocks