Skip to content
/ Janus Public

Eclipse plug-in that aims to automate both the detection and the refactoring of code clones

License

Notifications You must be signed in to change notification settings

uazadi/Janus

Repository files navigation

Janus

Janus is an Eclipse plug-in that aims to automate the code clones detection and refactoring through an iterative workflow, depicted in the figure below.

  • Source code pre-processing: the source code is loaded in memory, normalised and filtered based on the user needs;
  • Refactoring-Aware Detection of code clones: the duplicate code detection has been model as a not costrained optimization problem, which is composed by two main functions. The Similarity function that detect the cloned statements and it quantifies some feature of the duplicate code. The Refactoring Risk that aim to estimate the effort requested to accomplish the refactoring.
  • Code Clones Refactoring: Janus is currently able to apply automatically three type of refactoring techiques that remove automatically cloned statements Extract Method, Extract and Pull-Up Method and Extract Superclass.
  • Behavioural Checks: After the refactoring Janus is able to automatically compile the project and lunch the classes contain a main method and the JUnit test cases selected by the User. Furthermore, if even one of the fails Janus is able texecute automatically the fallback since the entire refactoring process is subjected to versioning via Git.

Below the Stack diagram of Janus’s architecture is provided

Information

If you would like more information about this tool:

Problems

For report any problem please check if already exist an Issue on GitHub about it:

  • if there isn't one please add an Issue
  • if there is one please leave a comment

About

Eclipse plug-in that aims to automate both the detection and the refactoring of code clones

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages