Reproduce “HyClone: Bridging LLM Understanding and Dynamic Execution for Semantic Code Clone Detection” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Yunhao Liang, Ruixuan Ying, Takuya Taniguchi, Guwen Lyu, Zhe Cui

HyClone, a two-stage framework, combines LLM-based semantic screening and dynamic execution validation to accurately detect Type 4 code clones in Python. The approach demonstrably improves recall and F1-score for identifying functionally identical yet syntactically distinct code pairs.

Key insights

  • A hybrid approach that combines LLM semantic understanding for initial filtering with deterministic execution-based verification is effective for robust Type 4 clone detection.
  • While LLMs can generate diverse test inputs, their limitations in accurately predicting complex program outputs necessitate external, empirical validation for functional equivalence.
  • LLMs can be susceptible to adversarial prompts and context, suggesting that they may rely on superficial patterns rather than deep semantic reasoning for complex code clone tasks.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.