Yewei Song
2024
Revisiting Code Similarity Evaluation with Abstract Syntax Tree Edit Distance
Yewei Song
|
Cedric Lothritz
|
Xunzhu Tang
|
Tegawendé Bissyandé
|
Jacques Klein
Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)
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).
CodeAgent: Autonomous Communicative Agents for Code Review
Xunzhu Tang
|
Kisub Kim
|
Yewei Song
|
Cedric Lothritz
|
Bei Li
|
Saad Ezzini
|
Haoye Tian
|
Jacques Klein
|
Tegawendé F. Bissyandé
Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing
Code review, which aims at ensuring the overall quality and reliability of software, is a cornerstone of software development. Unfortunately, while crucial, Code review is a labor-intensive process that the research community is looking to automate. Existing automated methods rely on single input-output generative models and thus generally struggle to emulate the collaborative nature of code review. This work introduces CodeAgent, a novel multi-agent Large Language Model (LLM) system for code review automation. CodeAgent incorporates a supervisory agent, QA-Checker, to ensure that all the agents’ contributions address the initial review question. We evaluated CodeAgent on critical code review tasks: (1) detect inconsistencies between code changes and commit messages, (2) identify vulnerability introductions, (3) validate code style adherence, and (4) suggest code revisions. The results demonstrate CodeAgent’s effectiveness, contributing to a new state-of-the-art in code review automation. Our data and code are publicly available (https://github.com/Daniel4SE/codeagent).
Search
Co-authors
- Bei Li 1
- Cedric Lothritz 2
- Haoye Tian 1
- Jacques Klein 2
- Kisub Kim 1
- show all...