Leveraging Lambda Expresssion in Micro-clone Refactoring
收藏NIAID Data Ecosystem2026-05-02 收录
下载链接:
https://zenodo.org/record/14814754
下载链接
链接失效反馈官方服务:
资源简介:
Duplicate code fragments, known as code clones, are a widespread phenomenon in software development, often causing difficulties in the maintenance and evolution of software systems. Micro-clones refer to short code fragments (i.e., less than five lines in length), which are particularly prevalent in the codebase. This study investigates the application of lambda expressions—a Java 8 functionality that enables the generation of concise and functional code segments, as a refactoring strategy for micro-clones. We focused and identified near-miss micro-clones of across five distinct subject systems using the NiCad clone detector. We have chosen 425 near-miss micro-clone pairs to ensure a 95% confidence level with a 5% confidence interval, based on the clone detector results for thorough investigation. Our findings indicate that 69.4% of these pairs can be refactored utilising the lambda refactoring technique. We also built a classifier using significant features based on Mann-Whitney-Wilcoxon U Test results from the micro-clones that achieved 78.91% accuracy. The effectiveness of lambda expressions in minimising repetition, enhancing maintainability, and parameterising the small changes in behaviour among micro-clone fragments was verified by their feedback. We enhance the overall understanding of refactoring techniques and offer developers real insights to optimise their code bases.
创建时间:
2025-02-05



