Giter Club home page Giter Club logo

anti-copy-paster's Introduction

AntiCopyPaster

AntiCopyPaster is a plugin for IntelliJ IDEA that tracks the copying and pasting carried out by the developer and suggests extracting duplicates into a new method as soon as they are introduced in the code.

Important: Please note that AntiCopyPaster is a prototype and a work in progress. We would appreciate any feedback on the concept itself, as well as the implementation.

How to install

AntiCopyPaster requires IntelliJ IDEA of version 2022.3 to work. To install the plugin:

  1. Download the pre-built version of the plugin from here;
  2. Open IntelliJ IDEA and go to File/Settings/Plugins;
  3. Select the gear icon, and choose Install Plugin from Disk...;
  4. Choose the downloaded ZIP archive;
  5. Click Apply;
  6. Restart the IDE.

How it works

The plugin monitors the copying and pasting that takes place inside the IDE. As soon as a code fragment is pasted, the plugin checks if it introduces code duplication, and if it does, the plugin calculates a set of code metrics for it, and a pre-installed CNN model makes a decision whether this piece of code is suitable for Extract Method refactoring. If it is, the plugin suggests the developer to perform the Extract Method refactoring and applies the refactoring if necessary.

The scripts and tools that were used for data gathering and model training could be found here.

Experiments

The tool validation and embedded models are available here: https://github.com/JetBrains-Research/extract-method-experiments.

Contacts

If you have any questions or propositions, do not hesitate to contact Yaroslav Golubev at [email protected].

How to cite?

Please, use the following bibtex entry:

@inproceedings{alomar2022anticopypaster,
  title={AntiCopyPaster: Extracting Code Duplicates As Soon As They Are Introduced in the IDE},
  author={Alomar, Eman Abdullah and Ivanov, Anton and Kurbatova, Zarina and Golubev, Yaroslav and Mkaouer, Mohamed Wiem and Ouni, Ali and Bryksin, Timofey and Nguyen, Le and Kini, Amit and Thakur, Aditya},
  booktitle={37th IEEE/ACM International Conference on Automated Software Engineering (ASE)},
  pages={1--4},
  year={2022}
}

Also, refer to our extended version of this work here:

@article{alomar2023just,
  title={Just-in-time code duplicates extraction},
  author={AlOmar, Eman Abdullah and Ivanov, Anton and Kurbatova, Zarina and Golubev, Yaroslav and Mkaouer, Mohamed Wiem and Ouni, Ali and Bryksin, Timofey and Nguyen, Le and Kini, Amit and Thakur, Aditya},
  journal={Information and Software Technology},
  volume={158},
  pages={107169},
  year={2023},
  publisher={Elsevier}
}

anti-copy-paster's People

Contributors

areyde avatar hotckiss avatar mkaouer avatar olenek avatar onewhl avatar ouniali avatar raipc 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anti-copy-paster's Issues

Download still old version

Hi guys,
here you describe to install this plugin :

"AntiCopyPaster requires IntelliJ IDEA of version 2022.2 to work. To install the plugin:
Download the pre-built version of the plugin from here;"

But it's still the old version for Intellij 2021.3 and not as written 2022.2 ?
There are another download link or other possibility to get ?
Kind regards
Holger

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.