ACL 2024short10 citations

Revisiting Code Similarity Evaluation with Abstract Syntax Tree Edit Distance

Yewei Song, Cedric Lothritz, Xunzhu Tang, Tegawendé Bissyandé, Jacques Klein

Abstract

This paper revisits recent code similarity evaluation metrics, particularly focusing on the application of Abstract Syntax Tree (AST) editing distance in diverse programming languages. In particular, we explore the usefulness of these metrics and compare them to traditional sequence similarity metrics. Our experiments showcase the effectiveness of AST editing distance in capturing intricate code structures, revealing a high correlation with established metrics. Furthermore, we explore the strengths and weaknesses of AST editing distance and prompt-based GPT similarity scores in comparison to BLEU score, execution match, and Jaccard Similarity. We propose, optimize, and publish an adaptable metric that demonstrates effectiveness across all tested languages, representing an enhanced version of Tree Similarity of Edit Distance (TSED).

BibTeX
@inproceedings{song-etal-2024-revisiting,
    title = "Revisiting Code Similarity Evaluation with Abstract Syntax Tree Edit Distance",
    author = "Song, Yewei  and
      Lothritz, Cedric  and
      Tang, Xunzhu  and
      Bissyand{\'e}, Tegawend{\'e}  and
      Klein, Jacques",
    editor = "Ku, Lun-Wei  and
      Martins, Andre  and
      Srikumar, Vivek",
    booktitle = "Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)",
    month = aug,
    year = "2024",
    address = "Bangkok, Thailand",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.acl-short.3/",
    doi = "10.18653/v1/2024.acl-short.3",
    pages = "38--46"
}
Revisiting Code Similarity Evaluation with Abstract Syntax Tree Edit Distance · ACL 2024