anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: cyberbotics/webots
Issue: web_component_studio script not working with Python 3.5

This script is not compatible with Python 3.5:
```
  File "scripts/web_component_studio/web_component_studio.py", line 54, in <module>
    with open(ROBOTS) as f:
TypeError: invalid file: PosixPath('/home/david/webots/scripts/web_component_studio/components.json')
```
(works fine with python 3.7).

We should either make it compatible with Python 3.5 or update the minimum required version.

Changed files:
scripts/web_component_studio/web_component_studio.py

diff --git a/scripts/web_component_studio/web_component_studio.py b/scripts/web_component_studio/web_component_studio.py
index 208cda5cd..a79c50082 100755
--- a/scripts/web_component_studio/web_component_studio.py
+++ b/scripts/web_component_studio/web_component_studio.py
@@ -31,9 +31,9 @@ assert WEBOTS_HOME, 'WEBOTS_HOME is undefined'
 
 # Paths.
 scriptdir = Path(getframeinfo(currentframe()).filename).resolve().parent
-WORLD = scriptdir / 'worlds' / 'web_component_studio.wbt'
-TEMPLATE = scriptdir / 'worlds' / 'web_component_studio_template.wbt'
-ROBOTS = scriptdir / 'components.json'
+WORLD = str(scriptdir / 'worlds' / 'web_component_studio.wbt')
+TEMPLATE = str(scriptdir / 'worlds' / 'web_component_studio_template.wbt')
+ROBOTS = str(scriptdir / 'components.json')
 
 
 def search_and_replace(filename, fromString, toString):
Repository: cyberbotics/webots
Issue: Avoid exporting default background in web_component_studio

**Describe the Bug**
It is not required to export the default (mountain) background for the robot component. The `web_component_studio` script should therefore be improved to not export it.

Changed files:
scripts/web_component_studio/controllers/web_component_studio_supervisor/web_component_studio_supervisor.py

diff --git a/scripts/web_component_studio/controllers/web_component_studio_supervisor/web_component_studio_supervisor.py b/scripts/web_component_studio/controllers/web_component_studio_supervisor/web_component_studio_supervisor.py
index b3ef3b9f7..0e977ac7f 100644
--- a/scripts/web_component_studio/controllers/web_component_studio_supervisor/web_component_studio_supervisor.py
+++ b/scripts/web_component_studio/controllers/web_component_studio_supervisor/web_component_studio_supervisor.py
@@ -67,8 +67,9 @@ supervisor.step(timeStep)
 # Remove useless files.
 os.remove(targetHTMLFile)
 os.remove(targetAnimationFile)
-for fl in glob.glob(os.path.join(scenePath, 'textures', 'cubic', 'noon_cloudy_mountains*.jpg')):
-    os.remove(fl)
+for extension in ['hdr', 'png', 'jpg']:
+    for fl in glob.glob(os.path.join(scenePath, 'textures', 'cubic', 'mountains*.%s' % extension)):
+        os.remove(fl)
 
 # Simplified JSON file.
 # - keep only the interested robot.
Repository: cyberbotics/webots
Issue: Bad height for vehicles in highway.wbt

When running the `vehicles/highway.wbt` world, the vehicles driven by SUMO are flying above the ramp up to the highway and they are sinking into the ramp down as well. This is probably related with the position of the center of the vehicle which changed in some version of SUMO.

Changed files:
projects/default/controllers/sumo_supervisor/SumoSupervisor.py

diff --git a/projects/default/controllers/sumo_supervisor/SumoSupervisor.py b/projects/default/controllers/sumo_supervisor/SumoSupervisor.py
index b1d2d24ce..0114ab0a6 100644
--- a/projects/default/controllers/sumo_supervisor/SumoSupervisor.py
+++ b/projects/default/controllers/sumo_supervisor/SumoSupervisor.py
@@ -197,8 +197,9 @@ class SumoSupervisor (Supervisor):
             dy = -math.sin(angle)
             yaw = -math.atan2(dy, -dx)
             # correct position (origin of the car is not the same in Webots / sumo)
-            pos[0] = pos[0] + 0.5 * subscriptionResult[id][self.traci.constants.VAR_LENGTH] * math.sin(angle)
-            pos[2] = pos[2] - 0.5 * subscriptionResult[id][self.traci.constants.VAR_LENGTH] * math.cos(angle)
+            vehicleLength = subscriptionResult[id][self.traci.constants.VAR_LENGTH]
+            pos[0] += 0.5 * vehicleLength * math.sin(angle)
+            pos[2] -= 0.5 * vehicleLength * math.cos(angle)
             # if needed check the vehicle is in the visibility radius
             if self.radius > 0:
                 viewpointPosition = self.viewpointPosition.getSFVec3f()
@@ -240,7 +241,7 @@ class SumoSupervisor (Supervisor):
                         vehicle.roll = roll
                         # ajust height according to the pitch
                         if not pitch == 0:
-                            height = height + roadPos * math.sin(pitch)
+                            height += (roadPos - 0.5 * vehicleLength) * math.sin(pitch)
                         # ajust height according to the roll and lateral position of the vehicle
                         if not roll == 0.0:
                             laneIndex = subscriptionResult[id][self.traci.constants.VAR_LANE_INDEX]