These functions manually matches the name of the stimuli with the name of the original code file, from which the stimuli was adapted. An example can be seen below (this is taken from add_tokens_to_AOIs):
|
if image_name == "rectangle_java.jpg": |
|
file_name = "Rectangle.java" |
|
|
|
if image_name == "rectangle_java2.jpg": |
|
file_name = "Rectangle.java" |
|
|
|
if image_name == "rectangle_python.jpg": |
|
file_name = "Rectangle.py" |
|
|
|
if image_name == "rectangle_scala.jpg": |
|
file_name = "Rectangle.scala" |
|
|
|
# vehicle files |
|
if image_name == "vehicle_java.jpg": |
|
file_name = "Vehicle.java" |
|
|
|
if image_name == "vehicle_java2.jpg": |
|
file_name = "Vehicle.java" |
|
|
|
if image_name == "vehicle_python.jpg": |
|
file_name = "vehicle.py" |
|
|
|
if image_name == "vehicle_scala.jpg": |
|
file_name = "Vehicle.scala" |
This needs to be refactor to make the two functions extendable for future datasets.
These functions manually matches the name of the stimuli with the name of the original code file, from which the stimuli was adapted. An example can be seen below (this is taken from
add_tokens_to_AOIs):EMIP-Toolkit/emip_toolkit.py
Lines 1222 to 1245 in d1a7eab
This needs to be refactor to make the two functions extendable for future datasets.