Automatic Clone Recommendation for Refactoring Based on the Present and the Past
Ruru Yue, Zhe Gao, Na Meng, Yingfei Xiong, Xiaoyin Wang, J. David, Morgenthaler

TL;DR
CREC is a learning-based approach that leverages extensive features from current and historical software data to recommend code clones for refactoring, significantly outperforming existing methods.
Contribution
Introduces CREC, the largest feature set for clone recommendation, and demonstrates its effectiveness across multiple large projects with high F-scores.
Findings
CREC achieved 83% and 76% F-scores in within-project and cross-project evaluations.
CREC outperformed the state-of-the-art approach with 70% and 50% F-scores.
Different factors and algorithms were analyzed for effectiveness.
Abstract
When many clones are detected in software programs, not all clones are equally important to developers. To help developers refactor code and improve software quality, various tools were built to recommend clone-removal refactorings based on the past and the present information, such as the cohesion degree of individual clones or the co-evolution relations of clone peers. The existence of these tools inspired us to build an approach that considers as many factors as possible to more accurately recommend clones. This paper introduces CREC, a learning-based approach that recommends clones by extracting features from the current status and past history of software projects. Given a set of software repositories, CREC first automatically extracts the clone groups historically refactored (R-clones) and those not refactored (NR-clones) to construct the training set. CREC extracts 34 features to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Reliability and Analysis Research · Software Engineering Techniques and Practices
