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.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call