Abstract
Most traditional code clone detections have less accurate results because they ignore the structure of the program itself, and some of them really think about it by creating a complex syntax tree but leading to a high time complexity. Confronting such situation, this paper proposes an efficient metric vector-based code clone detection method using function-calling tree. Considering the two program code to be detected, feature vectors in all defined functions of the two different code are extracted first. Then, two functioncalling trees are created according to the function-calling process and node matches each other between two trees, at the same time, the matching similarities are calculated. Finally, by using the bottom-up approach and combining similarity values of all child nodes, the detection can get the similarity of the two program code to be detected. Our experiment selects a set of typical code sample to measure and the results demonstrate that, compared the famous JPlag system, it shows better detection effect.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
More From: International Journal of Hybrid Information Technology
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.