MSCCD: Grammar Pluggable Clone Detection Based on ANTLR Parser Generation
Wenqing Zhu, Norihiro Yoshida, Toshihiro Kamiya, Eunjong Choi, Hiroaki Takada
Abstract
For various reasons, programming languages continue to multiply and evolve. It has become necessary to have a multilingual clone detection tool that can easily expand supported programming languages and detect various code clones is needed. However, research on multilingual code clone detection has not received sufficient attention. In this study, we propose MSCCD (Multilingual Syntactic Code Clone Detector), a grammar pluggable code clone detection tool that uses a parser generator to generate a code block extractor for the target language. The extractor then extracts the semantic code blocks from a parse tree. MSCCD can detect Type-3 clones at various granularities. We evaluated MSCCD's language extensibility by applying MSCCD to 20 modern languages. Sixteen languages were perfectly supported, and the remaining four were provided with the same detection capabilities at the expense of execution time. We evaluated MSCCD's recall by using BigCloneEval and conducted a manual experiment to evaluate precision. MSCCD achieved equivalent detection performance equivalent to state-of-the-art tools.
Create a lesson
Related papers
Reliable and explainable analysis of AVS/RS by Statistical Model Checking and Process Mining
Emanuele Guerrazzi, Andrea Vandin
ProofCoder: Continuous Reasoning for Automated Software Verification
Martim Afonso, Inês Lynce, Maurizio Morisio et al.
DEIA: Evidence-Grounded Crash Repair with Change-Aware Test Design for HarmonyOS ArkTS
Xuhui Lu, Zhihao Liu, Xiaoke Fang et al.
Software Refactoring Research with Large Language Models: A Systematic Literature Review
Sofia Martinez, Luo Xu, Mariam Elnaggar et al.
OpenRE-Bench: A Benchmark Harness for Multi-Agent Requirements Engineering with Mined GitHub Issues
Haowei Cheng, Milhan Kim, Bowen Jiang et al.
Do They Do as They Are Told? Investigating Coding Agents' Adherence to Explicit Instructions in Context Files
Gianmario Voria, Yutaro Kashiwa, Gemma Catolino et al.