Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
119 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

AntiCopyPaster 2.0: Whitebox just-in-time code duplicates extraction (2402.06035v1)

Published 8 Feb 2024 in cs.SE

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.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (23)
  1. Improving the success rate of applying the extract method refactoring. Science of Computer Programming 195 (2020), 102475.
  2. Miltiadis Allamanis. 2019. The adverse effects of code duplication in machine learning models of code. In Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software. 143–153.
  3. AntiCopyPaster: extracting code duplicates as soon as they are introduced in the IDE. In Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering. 1–4.
  4. Just-in-time code duplicates extraction. Information and Software Technology 158 (2023), 107169.
  5. On preserving the behavior in software refactoring: A systematic mapping study. Information and Software Technology 140 (2021), 106675.
  6. Behind the Intent of Extract Method Refactoring: A Systematic Literature Review. IEEE Transactions on Software Engineering (2023).
  7. The effectiveness of supervised machine learning algorithms in predicting software refactoring. IEEE Transactions on Software Engineering (2020).
  8. Richard Fanta and Václav Rajlich. 1999. Removing clones from the code. Journal of Software Maintenance: Research and Practice 11, 4 (1999), 223–243.
  9. Automatic metric thresholds derivation for code smell detection. In 2015 IEEE/ACM 6th International Workshop on Emerging Trends in Software Metrics. IEEE, 44–53.
  10. Martin Fowler. 2018. Refactoring: improving the design of existing code. Addison-Wesley Professional.
  11. Roman Haas and Benjamin Hummel. 2016. Deriving extract method refactoring suggestions for long methods. In Int. Conf. on Software Quality. 144–155.
  12. Is duplicate code more frequently modified than non-duplicate code in software evolution? An empirical study on open source software. In Joint ERCIM Workshop on Software Evolution and Int. Workshop on Principles of Software Evolution (IWPSE). 73–82.
  13. DéjàVu: a map of code duplicates on GitHub. Proceedings of the ACM on Programming Languages 1, OOPSLA (2017), 1–28.
  14. Multi-criteria code refactoring using search-based software engineering: An industrial case study. TOSEM 25, 3 (2016), 1–53.
  15. Software clone detection: A systematic review. Information and Software Technology 55, 7 (2013), 1165–1199.
  16. An automated extract method refactoring approach to correct the long method code smell. Journal of Systems and Software (2022), 111221.
  17. Jextract: An eclipse plug-in for recommending automated extract method refactorings. arXiv preprint arXiv:1506.06086 (2015).
  18. Will this clone be short-lived? Towards a better understanding of the characteristics of short-lived clones. Empirical Software Engineering 24, 2 (2019), 937–972.
  19. Omkarendra Tiwari and Rushikesh Joshi. 2022. Identifying Extract Method Refactorings. In 15th Innovations in Software Engineering Conference. 1–11.
  20. MSR Mining Challenge: The SmartSHARK Repository Data. In Proceedings of the International Conference on Mining Software Repositories (MSR 2022).
  21. Accurate and efficient refactoring detection in commit history. In 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE). IEEE, 483–494.
  22. Data-driven extract method recommendations: a study at ING. In ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 1337–1347.
  23. Proactive clone recommendation system for extract method refactoring. In 2019 IEEE/ACM 3rd International Workshop on Refactoring (IWoR). IEEE, 67–70.
User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (6)
  1. Eman Abdullah AlOmar (32 papers)
  2. Benjamin Knobloch (1 paper)
  3. Thomas Kain (1 paper)
  4. Christopher Kalish (1 paper)
  5. Mohamed Wiem Mkaouer (42 papers)
  6. Ali Ouni (36 papers)

Summary

We haven't generated a summary for this paper yet.