%0 Conference Proceedings %T Finding Code-Clone Snippets in Large Source-Code Collection by ccgrep %+ Osaka University %+ Osaka University %+ University of Victoria [Canada] (UVIC) %+ Nara Institute of Science and Technology %A Inoue, Katsuro %A Miyamoto, Yuya %A German, Daniel, M. %A Ishio, Takashi %< avec comité de lecture %( IFIP Advances in Information and Communication Technology %B 17th IFIP International Conference on Open Source Systems (OSS) %C Lathi/virtual event, Finland %Y Davide Taibi %Y Valentina Lenarduzzi %Y Terhi Kilamo %Y Stefano Zacchiroli %I Springer International Publishing %3 Open Source Systems %V AICT-624 %P 28-41 %8 2021-05-12 %D 2021 %R 10.1007/978-3-030-75251-4_3 %K Code snippet search %K Pattern matching %K Clone types %Z Computer Science [cs]Conference papers %X 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. %G English %Z TC 2 %Z WG 2.13 %2 https://inria.hal.science/hal-03254061/document %2 https://inria.hal.science/hal-03254061/file/PaperID5-inoue-CCgrep_OSS_2021_CameraReady.pdf %L hal-03254061 %U https://inria.hal.science/hal-03254061 %~ IFIP %~ IFIP-AICT %~ IFIP-TC %~ IFIP-WG %~ IFIP-OSS %~ IFIP-TC2 %~ IFIP-WG2-13 %~ IFIP-AICT-624