Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 580 Bytes

README.md

File metadata and controls

21 lines (12 loc) · 580 Bytes

Evaluation Metric

Code Style Similarity

The calculation of Code Style Similarity is shown in code_style_sim.py. In this Python file, we evaluate the Code Style Similarity between exemplar codes and rewritten codes in four datasets generated by different LLMs.

CodeBLEU

The function cal_codebleu_for_one_pair in codebleu.py calculates CodeBLEU between two code snippets.

ROUGE-L

The function calc_score in rouge.py calculates ROUGE-L between two code snippets.

BLEU

The method corpus_bleu in bleu.py calculates BLEU between two code snippets.