Abstract
Code clones are comparable code snippets that are introduced into software by developers in order to increase software development productivity. A change to code clone may result in a consistent-defect if the developers forget to verify the consistency of the code after the change. To reduce such change-related maintenance costs, researchers have proposed a number of methods for predicting clone consistency in advance. Unfortunately, the effectiveness of these cross-project models is unsatisfactory, and performing such predictions with insufficient data remains a challenge. Meanwhile, cross-project defect prediction via transfer learning method is prevalent in the software engineering community. Consequently, we first construct an empirical study to explore whether transfer-learning techniques could well be utilized for clone cross-project consistent-defect prediction in the initial stages of software development. In this paper, we employ transfer-learning techniques to predict clone consistency at both the time of clone creating and clone changing in order to avoid clone consistent-defects and maintenance. We conduct an experiment on open-source projects to evaluate the effectiveness of various transfer-learning methods. Our investigation demonstrates that transfer-learning techniques have a beneficial impact on predicting cross-project clone consistent-defect, and that the size of the dataset also has a positive effect on prediction. In order to promote software safety and security, we recommend that developers leverage transfer-learning to enhance the capability for clone cross-project consistent-defect prediction early in the software development phase.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.