Finding Code-Clone Snippets in Large Source-Code Collection by ccgrep - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2021

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

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

Résumé

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
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

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

Licence

Paternité

Identifiants

Citer

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 Consultations
206 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More