-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprompt.py
20 lines (14 loc) · 1.7 KB
/
prompt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#Improved prompt
sp2 = "Consider the overall structure and logic of the following two codes and determine if the two code snippets perform a similar task. Respond with 'yes' if the two codes perform similar tasks or 'no' otherwise."
#Simple prompt
sp1 = "Analyze the following two code snippets and determine whether they are clones, regardless of the programming language. Respond with 'yes' if the code snippets are clones or 'no' if not."
#Similarity score
sim = "Assess the similarity of the following two code snippets and provide a similarity score between 0 and 10. A higher score indicates that the two codes are more similar. Output the similarity score."
#Reasoning
reas = "Provide a detailed reasoning process for detecting code clones in the following two code snippets, regardless of the programming language. Based on your analysis, respond with 'yes' if the code snippets are clones or 'no' if they are not."
#integrate
inte= "Analyze the following two code snippets to assess their similarity and determine if they are code clones, regardless of the programming language. Provide a similarity score between 0 and 10, where a higher score indicates more similarity. Additionally, presents a detailed reasoning process for detecting code clones. Conclude by 'yes' if they are clones or 'no' otherwise."
#Similar lines
sl= "Analyze the following two code snippets for code clone detection, regardless of the programming language. You should first report which lines of code are more similar. Then based on the report, please answer whether these two codes are a clone pair. The response should be 'yes' or 'no'"
# Get code explanation
query_desc= "Analyze the following code snippet and explain the function of the snippet."