Abstract

To detect large-variance code clones (i.e. clones with relatively more differences) in large-scale code repositories is difficult because most current tools can only detect almost identical or very similar clones. It will make promotion and changes to some software applications such as bug detection, code completion, software analysis, etc. Recently, CCAligner made an attempt to detect clones with relatively concentrated modifications called large-gap clones. Our contribution is to develop a novel and effective detection approach of large-variance clones to more general cases for not only the concentrated code modifications but also the scattered code modifications. A detector named LVMapper is proposed, borrowing and changing the approach of sequencing alignment in bioinformatics which can find two similar sequences with more differences. The ability of LVMapper was tested on both self-synthetic datasets and real cases, and the results show substantial improvement in detecting large-variance clones compared with other state-of-the-art tools including CCAligner. Furthermore, our new tool also presents good recall and precision for general Type-1, Type-2 and Type-3 clones on the widely used benchmarking dataset, BigCloneBench.

Highlights

  • Clone code is generated by copying, pasting and modifying code fragments for reuse, which are common operations in software development [1], [2]

  • (2) Method contribution: Inspired by the idea of the seedand-extend method in bioinformatics, we develop a novel tool with locate-filter-verify procedure and it is suited to detect clone with large variance

  • The results show that LVMapper is much better than the stateof-the-art tools in large-variance clone detection

Read more

Summary

Introduction

Clone code is generated by copying, pasting and modifying code fragments for reuse, which are common operations in software development [1], [2]. Code clones with relatively more modifications (called large-variance code clones) were difficult to be found by existing tools [3] because most of them were suitable for finding the identical or very similar clones. Compared with the clones provided by traditional tools, the large-variance code clones have a broader range. They have an important impact on and make changes to some software applications such as bug detection, code completion, software analysis and so on. A meaningful attempt has been made with CCAligner [3] It is a large-gap clone detection tool which can detect the code clones with relatively concentrated modifications. Our study focuses on a more general case: to detect large-variance code clones that include the clones with concentrated code modifications and those with scattered code modifications

Methods
Results
Conclusion
Full Text
Paper version not known

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

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.