Code cloning usage
#2
by
YorikML
- opened
Hello, I am interested in using your Codet5 model for code similarity tasks. I have a question about how to use it in test mode when I have only two code snippets to compare.
According to the CodexGlue dataset format, you expect a list of codes and you return the top n most similar examples to a given query. But what if I want to check the similarity between two specific code snippets? How can I use your model for that?
Can you please provide a way to get a similarity score (maybe a probability) or a binary output (0 or 1) if two code snippets are similar or different? For example, given these two code snippets:
public int f() { return 0;}
public void f() { int i = 0; }
Can your model tell me how similar they are, or if they are equivalent or not?
Thank you for your help and your great work!