Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
/ Refactory Public archive

This project implements the recommendation of Extract Method refactoring opportunities using Machine Learning on GitLab merge requests.

License

Notifications You must be signed in to change notification settings

refactoring-ai/Refactory

Repository files navigation

Refactory

This project implements the recomendation of method level refactoring opportunities using Machine Learning on GitLab merge requests. The research that lead to this project consisted of recommending ''extract method'' on merge requests. Currently the tool is limited to the following toolchain as the research was performed in this setting:

  • GitLab
  • Survalyzer
  • Extract method It should not be too dificult to adapt this tool to other toolchains however.

Setup

First you will need a model in ONNX format. Please see the repo for data collection for instructions on how to collect data and the repo for machine learning for instructions on how to generate an ONNX model from this data.

After this set up a postgres DB to store your results. Then setup your environment variables by either renaming .env-example to .env or setting the corresponding environment variables.

Running the application in dev mode

You can run your application in dev mode that enables live coding using: ./gradlew quarkusDev

Packaging and running the application

The application can be packaged using ./gradlew quarkusBuild. It produces the refactory-0.1.0-runner.jar file in the build directory.

The application is now runnable using java -jar build/refactory-0.1.0-runner.jar.

About

This project implements the recommendation of Extract Method refactoring opportunities using Machine Learning on GitLab merge requests.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages