English

AntiCopyPaster 2.0: Whitebox just-in-time code duplicates extraction

Software Engineering 2024-02-12 v1

Abstract

AntiCopyPaster is an IntelliJ IDEA plugin, implemented to detect and refactor duplicate code interactively as soon as a duplicate is introduced. The plugin only recommends the extraction of a duplicate when it is worth it. In contrast to current Extract Method refactoring approaches, our tool seamlessly integrates with the developer's workflow and actively provides recommendations for refactorings. This work extends our tool to allow developers to customize the detection rules, i.e., metrics, based on their needs and preferences. The plugin and its source code are publicly available on GitHub at https://github.com/refactorings/anti-copy-paster. The demonstration video can be found on YouTube: https://youtu.be/ Y1sbfpds2Ms.

Cite

@article{arxiv.2402.06035,
  title  = {AntiCopyPaster 2.0: Whitebox just-in-time code duplicates extraction},
  author = {Eman Abdullah AlOmar and Benjamin Knobloch and Thomas Kain and Christopher Kalish and Mohamed Wiem Mkaouer and Ali Ouni},
  journal= {arXiv preprint arXiv:2402.06035},
  year   = {2024}
}
R2 v1 2026-06-28T14:43:29.106Z