Computer Science > Computation and Language
arXiv:2404.08817 (cs)
[Submitted on 12 Apr 2024 (v1), last revised 3 Jun 2024 (this version, v2)]
Title:Revisiting Code Similarity Evaluation with Abstract Syntax Tree Edit Distance
View a PDF of the paper titled Revisiting Code Similarity Evaluation with Abstract Syntax Tree Edit Distance, by Yewei Song and 4 other authors
View PDFHTML (experimental)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).
Comments: | ACL 2024 Main |
Subjects: | Computation and Language (cs.CL); Programming Languages (cs.PL); Software Engineering (cs.SE) |
Cite as: | arXiv:2404.08817 [cs.CL] |
(orarXiv:2404.08817v2 [cs.CL] for this version) | |
https://doi.org/10.48550/arXiv.2404.08817 arXiv-issued DOI via DataCite |
Submission history
From: Yewei Song [view email][v1] Fri, 12 Apr 2024 21:28:18 UTC (7,981 KB)
[v2] Mon, 3 Jun 2024 11:56:38 UTC (7,983 KB)
Full-text links:
Access Paper:
- View PDF
- HTML (experimental)
- TeX Source
- Other Formats
View a PDF of the paper titled Revisiting Code Similarity Evaluation with Abstract Syntax Tree Edit Distance, by Yewei Song and 4 other authors
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer(What is the Explorer?)
Connected Papers(What is Connected Papers?)
Litmaps(What is Litmaps?)
scite Smart Citations(What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv(What is alphaXiv?)
CatalyzeX Code Finder for Papers(What is CatalyzeX?)
DagsHub(What is DagsHub?)
Gotit.pub(What is GotitPub?)
Hugging Face(What is Huggingface?)
Papers with Code(What is Papers with Code?)
ScienceCast(What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower(What are Influence Flowers?)
CORE Recommender(What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community?Learn more about arXivLabs.