Abstract

Many consistent changes take place across code clones in software, and this has emerged as a severe issue for software security. If the developers forget to modify the relevant clones consistently, such modifications will introduce consistent-defect. Researchers leverage machine learning techniques to predict clone consistent-defect by representing these changes with the designed attributes. Meanwhile, deep learning technology has demonstrated tremendous potential in characterizing source code. As such, we explore whether deep learning technology can enhance the effectiveness of clone consistent-defect prediction. In this study, we investigate various neural networks for modeling clone consistent change. Specifically, our approach models code clones and their evolution to capture the semantic properties automatically from the perspectives of clone fragment, clone group, and clone evolution, as opposed to manually generated attributes. To evaluate the effectiveness of our approach, we conduct an experiment on the dataset collected from 8 open-source projects. The results demonstrate that our neural network models are efficient both in cross-project and within-project scenarios, with F-measures of around 80% and recalls of around 90%. We conclude that deep learning technology may successfully assist developers in predicting clone consistent-defect, so helping to improve the security of code clones by alerting developers to confirm their consistency.

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