Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3383972.3384014acmotherconferencesArticle/Chapter ViewAbstractPublication PagesicmlcConference Proceedingsconference-collections
research-article

A Fast Detecting Method for Clone Functions Using Global Alignment of Token Sequences

Published: 26 May 2020 Publication History

Abstract

In large software projects, proper source code reuse can make development more efficient, but a lot of duplicate code and error code reuse can be a major cause of difficult system maintenance. Efficient clone code detection for large project can help manage the project. However, most of the clone detection methods are difficult to perform on adaptive analysis that adjusts specificity or sensitivity according to the type of clone to be detected. Therefore, when a user wants to find a particular type of clone in a large project, they must analyze it repeatedly using various tools to adjust the options. In this study, we propose a clone detection system based on the global sequence alignment. Lex based token analysis models and global alignment algorithm-based clone detection models were able to detect not only exact matches but also various types of clones by setting lower bound scores. Using features of the global alignment score calculation method to eliminate functions that cannot be clone candidates in advance, alignment analysis was possible even for large projects, and the execution time was predicted. For clone functions, we visualized the matching area, which is the result of alignment analysis, to represent clone information more efficiently.

References

[1]
SCHLEIMER, Saul; WILKERSON, Daniel S.; AIKEN, Alex. 2003. Winnowing: local algorithms for document fingerprinting. ACM SIGMOD, 76--85.
[2]
Simon Harris. 2003. The Simian Software. American Mathematical Society URL= http://www.redhillconsulting.com.au/products/simian/
[3]
GÖDE, Nils; KOSCHKE, Rainer. 2009. Incremental clone detection. In: 3th European Conference on Software Maintenance and Reengineering. IEEE, 219--228.
[4]
KAMIYA, Toshihiro; KUSUMOTO, Shinji; INOUE, Katsuro. 2002. CCFinder: a multilinguistic token-based code clone detection system for large scale source code. IEEE Transactions on Software Engineering, 28, 7, 654--670.
[5]
JIANG, Lingxiao, et al. 2007. Deckard: Scalable and accurate tree-based detection of code clones. In: Proc. of the 29th int. conf. on Software Engineering. IEEE Computer Society. 96--105.
[6]
JI, Jeong-Hoon, et al. Source code similarity detection using adaptive local alignment of keywords. 2007. In: Eighth Int. Conf. on Parallel and Distributed Computing, Applications and Technologies (PDCAT 2007). IEEE. 179--180.
[7]
MURAKAMI, Hiroaki, et al. 2013. Gapped code clone detection with lightweight source code analysis. In: 2013 21st Int. Conf. on Program Comprehension (ICPC). IEEE, 93--102.
[8]
WANG, Jie; YU, Dongjin; SHU, Xiang. 2017. Detection of code clone based on source fragment alignment. J. Softw. Eng., 11, 3, 266--274.
[9]
CALEFATO, Fabio; LANUBILE, Filippo; MALLARDO, Teresa. 2004. Function clone detection in web applications: a semi-automated approach. J. Web Eng., 3, 1, 3--21.
[10]
TAIRAS, Robert; GRAY, Jeff. 2006. Phoenix-based clone detection using suffix trees. In: Proc. of the 44th annual Southeast regional conference. ACM, 679--684.
[11]
ROY, Chanchal K.; CORDY, James R. NICAD. 2008. Accurate detection of near-miss intentional clones using flexible pretty-printing and code normalization. In: 16th iEEE int. conf. on program comprehension. IEEE. 172--181.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
ICMLC '20: Proceedings of the 2020 12th International Conference on Machine Learning and Computing
February 2020
607 pages
ISBN:9781450376426
DOI:10.1145/3383972
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

In-Cooperation

  • Shenzhen University: Shenzhen University

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 26 May 2020

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Clone detection
  2. clone function
  3. code analysis
  4. global alignment

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

  • National Research Foundation of Korea

Conference

ICMLC 2020

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 76
    Total Downloads
  • Downloads (Last 12 months)5
  • Downloads (Last 6 weeks)0
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media