Vedant Pungliya commited on
Commit
77c4d8b
·
unverified ·
1 Parent(s): 7005c0b
codenet_4000_finetuned_compile_error/java/layer12/kmeans/{clusters-kmeans-350 (1).txt → clusters-kmeans-350.txt} RENAMED
File without changes
pert.py CHANGED
@@ -44,7 +44,8 @@ perturbation_descriptions = {
44
  "Exact Name Class Variable Modification": "Renames classes and variables to a specific randomly generated name.",
45
  "Casing Class Variable Modification": "Generates lexical variations of class and variable names with different casing.",
46
  "Onecase Modification": "Generates lexical variations of class and variable names with just 1 letter uppercase wither for class anme or variable name.",
47
- "Example Modification": "Generates lexical variations of class and variable names with Example being the class name and example being the variable name or vice versa."
 
48
  }
49
 
50
  def compute_and_log_csi(file_orig, file_pert, perturbation_name, output_csv="results/csi_summary.csv"):
@@ -162,4 +163,11 @@ compute_and_log_csi(
162
  perturbation_name="Example Modification",
163
  output_csv="results/csi_summary.csv"
164
  )
 
 
 
 
 
 
 
165
  # You can now call compute_and_log_csi again and again for other perturbations!
 
44
  "Exact Name Class Variable Modification": "Renames classes and variables to a specific randomly generated name.",
45
  "Casing Class Variable Modification": "Generates lexical variations of class and variable names with different casing.",
46
  "Onecase Modification": "Generates lexical variations of class and variable names with just 1 letter uppercase wither for class anme or variable name.",
47
+ "Example Modification": "Generates lexical variations of class and variable names with Example being the class name and example being the variable name or vice versa.",
48
+ "Finetuned on compile error": "Clusters based on finetuned codebert model on compile errors"
49
  }
50
 
51
  def compute_and_log_csi(file_orig, file_pert, perturbation_name, output_csv="results/csi_summary.csv"):
 
163
  perturbation_name="Example Modification",
164
  output_csv="results/csi_summary.csv"
165
  )
166
+
167
+ compute_and_log_csi(
168
+ "codenet_4000_finetuned_compile_error/java/layer12/kmeans/clusters-kmeans-350.txt",
169
+ "codenet_4000_finetuned_compile_error/java/layer12/kmeans/clusters-kmeans-350.txt",
170
+ perturbation_name="Finetuned on compile error",
171
+ output_csv="results/csi_summary.csv"
172
+ )
173
  # You can now call compute_and_log_csi again and again for other perturbations!
results/csi_summary.csv CHANGED
@@ -11,3 +11,4 @@ Exact Name Class Variable Modification,0.675121649837896,0.324878350162104,Renam
11
  Casing Class Variable Modification,0.6722713965133429,0.3277286034866571,Generates lexical variations of class and variable names with different casing.
12
  Onecase Modification,0.665697304921991,0.334302695078009,Generates lexical variations of class and variable names with just 1 letter uppercase wither for class anme or variable name.
13
  Example Modification,1.0,0.0,Generates lexical variations of class and variable names with Example being the class name and example being the variable name or vice versa.
 
 
11
  Casing Class Variable Modification,0.6722713965133429,0.3277286034866571,Generates lexical variations of class and variable names with different casing.
12
  Onecase Modification,0.665697304921991,0.334302695078009,Generates lexical variations of class and variable names with just 1 letter uppercase wither for class anme or variable name.
13
  Example Modification,1.0,0.0,Generates lexical variations of class and variable names with Example being the class name and example being the variable name or vice versa.
14
+ Finetuned on compile error,1.0,0.0,Clusters based on finetuned codebert model on compile errors