Finding Code-Clone Snippets in Large Source-Code Collection by ccgrep - Open Source Systems 17th IFIP WG 2.13 International Conference, OSS 2021 Virtual Event, May 12–13, 2021 Access content directly
Conference Papers Year : 2021

Finding Code-Clone Snippets in Large Source-Code Collection by ccgrep

Katsuro Inoue
  • Function : Author
  • PersonId : 1031400
Yuya Miyamoto
  • Function : Author
  • PersonId : 1101497
Daniel M. German
  • Function : Author
  • PersonId : 982549
Takashi Ishio
  • Function : Author
  • PersonId : 1101498

Abstract

Finding the same or similar code snippets in the source code for a query code snippet is one of the fundamental activities in software maintenance. Code clone detectors detect the same or similar code snippets, but they report all of the code clone pairs in the target, which are generally excessive to the users. In this paper, we propose ccgrep, a token-based pattern matching tool with the notion of code clone pairs. The user simply inputs a code snippet as a query and specifies the target source code, and gets the matched code snippets as the result. The query and the result snippets form clone pairs. The use of special tokens (named meta-tokens) in the query allows the user to have precise control over the matching. It works for the source code in C, C++, Java, and Python on Windows or Unix with practical scalability and performance. The evaluation results show that ccgrep is effective in finding intended code snippets in large Open Source Software.
Fichier principal
Vignette du fichier
PaperID5-inoue-CCgrep_OSS_2021_CameraReady.pdf (295.14 Ko) Télécharger le fichier
Origin : Files produced by the author(s)

Dates and versions

hal-03254061 , version 1 (09-06-2021)

Licence

Attribution

Identifiers

Cite

Katsuro Inoue, Yuya Miyamoto, Daniel M. German, Takashi Ishio. Finding Code-Clone Snippets in Large Source-Code Collection by ccgrep. 17th IFIP International Conference on Open Source Systems (OSS), May 2021, Lathi/virtual event, Finland. pp.28-41, ⟨10.1007/978-3-030-75251-4_3⟩. ⟨hal-03254061⟩
57 View
199 Download

Altmetric

Share

Gmail Facebook X LinkedIn More