anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: missionpinball/mpf
Issue: Catch invalid UTF-8 error when loading config

Show a better error: https://groups.google.com/forum/m/#!topic/mpf-users/vVAf7JKA2uI

Changed files:
mpf/core/assets.py, mpf/file_interfaces/yaml_interface.py

diff --git a/mpf/core/assets.py b/mpf/core/assets.py
index 56c66ee50..d5f2cba69 100644
--- a/mpf/core/assets.py
+++ b/mpf/core/assets.py
@@ -358,9 +358,14 @@ class BaseAssetManager(MpfController):
         root_path = os.path.join(path, asset_class['path_string'])
         self.log.debug("Processing assets from base folder: %s", root_path)
 
+        # ignore temporary files
+        ignore_prefixes = (".", "~")
+        # do not get fooled by windows or mac garbage
+        ignore_files = ("desktop.ini", "Thumbs.db")
+
         for path, _, files in os.walk(root_path, followlinks=True):
             valid_files = [f for f in files if f.endswith(
-                           asset_class['extensions'])]
+                           asset_class['extensions']) and not f.startswith(ignore_prefixes) and f != ignore_files]
             for file_name in valid_files:
                 folder = os.path.basename(path)
                 name = os.path.splitext(file_name)[0].lower()
diff --git a/mpf/file_interfaces/yaml_interface.py b/mpf/file_interfaces/yaml_interface.py
index 70b5010e5..b7dcc57c3 100644
--- a/mpf/file_interfaces/yaml_interface.py
+++ b/mpf/file_interfaces/yaml_interface.py
@@ -283,8 +283,10 @@ class YamlInterface(FileInterface):
     def get_show_file_version(filename):
         """Return show file version."""
         with open(filename) as f:
-            file_version = f.readline().split('show_version=')[-1:][0]
-
+            try:
+                file_version = f.readline().split('show_version=')[-1:][0]
+            except ValueError:
+                return 0
         try:
             return int(file_version)
         except ValueError:
Repository: gluufederation/community-edition-setup
Issue: post-setup install services failing

The folowing error raises when installing post-setup services

```
14:11:33 10/20/22 Traceback (most recent call last):
  File "/install/community-edition-setup/./setup.py", line 415, in do_installation
    install_services()
  File "/install/community-edition-setup/./setup.py", line 350, in install_services
    instance.start_installation()
  File "/install/community-edition-setup/setup_app/installers/base.py", line 50, in start_installation
    self.generate_configuration()
  File "/install/community-edition-setup/setup_app/installers/passport.py", line 139, in generate_configuration
    Config.passport_rs_client_jwks = self.gen_openid_data_store_keys(self.passport_rs_client_jks_fn, Config.passport_rs_client_jks_pass)
  File "/install/community-edition-setup/setup_app/utils/crypto64.py", line 262, in gen_openid_data_store_keys
    Config.non_setup_properties['key_gen_path'],
KeyError: 'key_gen_path'
```

Changed files:
setup.py

diff --git a/setup.py b/setup.py
index a6571894..9f6e86e0 100755
--- a/setup.py
+++ b/setup.py
@@ -411,6 +411,8 @@ def do_installation():
                 oxauthInstaller.make_salt()
                 app_installations()
                 prepare_for_installation()
+        else:
+            gluuInstaller.determine_key_gen_path()
 
         install_services()
Repository: gluufederation/community-edition-setup
Issue: fix: oxd-server is missing couchbase-spanner libs

External couchbase and spanner libs should be symlinked to oxd lib dir

Changed files:
setup_app/installers/oxd.py, setup_app/installers/jetty.py

diff --git a/setup_app/installers/jetty.py b/setup_app/installers/jetty.py
index 4ef3e628..15734bf4 100644
--- a/setup_app/installers/jetty.py
+++ b/setup_app/installers/jetty.py
@@ -391,7 +391,7 @@ class JettyInstaller(BaseInstaller, SetupUtils):
         war_zip = zipfile.ZipFile(target_war_fn)
         for builtin_path in war_zip.namelist():
             if  builtin_path.endswith('.jar'):
-                builtin_libs.append(os.path.basename( builtin_path))
+                builtin_libs.append(os.path.basename(builtin_path))
         war_zip.close()
 
         def in_war(name):
diff --git a/setup_app/installers/oxd.py b/setup_app/installers/oxd.py
index b23ccce0..d533d866 100644
--- a/setup_app/installers/oxd.py
+++ b/setup_app/installers/oxd.py
@@ -3,6 +3,7 @@ import glob
 import socket
 import ruamel.yaml
 import tempfile
+import pathlib
 
 from setup_app import paths
 from setup_app.static import AppType, InstallOption, fapolicyd_rule_tmp
@@ -93,6 +94,8 @@ class OxdInstaller(SetupUtils, BaseInstaller):
 
             self.run([paths.cmd_chown, '{}:{}'.format(oxd_user, Config.gluu_group), os.path.join(Config.osDefault, self.service_name)])
 
+        self.configure_extra_libs()
+
         self.enable()
 
     def get_yaml_config(self):
@@ -291,3 +294,19 @@ class OxdInstaller(SetupUtils, BaseInstaller):
         if not os.path.exists(self.oxd_root):
             self.run([paths.cmd_mkdir, self.oxd_root])
 
+
+    def configure_extra_libs(self):
+
+        if Config.cb_install:
+            common_lib_dir = base.current_app.CouchbaseInstaller.common_lib_dir
+        elif Config.rdbm_install and Config.rdbm_type == 'spanner':
+            common_lib_dir = base.current_app.RDBMInstaller.common_lib_dir
+        else:
+            return
+
+        target_path = pathlib.Path(self.oxd_root).joinpath('lib')
+
+        for common_lib in pathlib.Path(common_lib_dir).glob('*.jar'):
+            target_lib = target_path.joinpath(common_lib.name)
+            if not target_lib.exists():
+                target_lib.symlink_to(common_lib)
Repository: gluufederation/community-edition-setup
Issue: fix: spanner post-setup

Since `Config.rdbm_install` were not set propery in post-setup for spanner backend, spanenr libs are not added to `extraClasspath` in post setup.

Changed files:
setup_app/utils/collect_properties.py, setup_app/installers/rdbm.py

diff --git a/setup_app/installers/rdbm.py b/setup_app/installers/rdbm.py
index 6c2b445e..9b168a73 100644
--- a/setup_app/installers/rdbm.py
+++ b/setup_app/installers/rdbm.py
@@ -463,5 +463,5 @@ class RDBMInstaller(BaseInstaller, SetupUtils):
         self.createDirs(Config.static_rdbm_dir)
 
     def installed(self):
-        return os.path.exists(Config.gluuRDBMProperties)
+        return os.path.exists(Config.gluuRDBMProperties) or os.path.exists(Config.gluuSpannerProperties)
 
diff --git a/setup_app/utils/collect_properties.py b/setup_app/utils/collect_properties.py
index a2db2dca..78d9b4dd 100644
--- a/setup_app/utils/collect_properties.py
+++ b/setup_app/utils/collect_properties.py
@@ -42,6 +42,9 @@ class CollectProperties(SetupUtils, BaseInstaller):
         oxidp_ConfigurationEntryDN = gluu_prop['oxidp_ConfigurationEntryDN']
         gluu_ConfigurationDN = 'ou=configuration,o=gluu'
 
+        if Config.persistence_type in ('sql', 'spanner'):
+            Config.rdbm_install = True
+
         if Config.persistence_type in ('couchbase', 'sql', 'spanner'):
             ptype = 'rdbm' if Config.persistence_type in ('sql', 'spanner') else 'couchbase'
             Config.mappingLocations = { group: ptype for group in Config.couchbaseBucketDict }
Repository: gluufederation/community-edition-setup
Issue: fix: test data load with mysql backend

Consequence of https://github.com/JanssenProject/jans/issues/5690

Changed files:
setup_app/utils/db_utils.py

diff --git a/setup_app/utils/db_utils.py b/setup_app/utils/db_utils.py
index fea6473d..ce89387c 100644
--- a/setup_app/utils/db_utils.py
+++ b/setup_app/utils/db_utils.py
@@ -816,17 +816,18 @@ class DBUtils(SetupUtils):
     def get_rdbm_val(self, key, val, rdbm_type=None):
 
         data_type = self.get_attr_sql_data_type(key)
+        val_ = val[0] if isinstance(val, list) or isinstance(val, tuple) else val
 
         if data_type in ('SMALLINT', 'BOOL', 'BOOLEAN'):
-            if val[0].lower() in ('1', 'on', 'true', 'yes', 'ok'):
+            if val_.lower() in ('1', 'on', 'true', 'yes', 'ok'):
                 return 1 if data_type == 'SMALLINT' else True
             return 0 if data_type == 'SMALLINT' else False
 
         if data_type == 'INT':
-            return int(val[0])
+            return int(val_)
 
         if data_type in ('DATETIME(3)', 'TIMESTAMP'):
-            dval = val[0].strip('Z')
+            dval = val_.strip('Z')
             sep= 'T' if rdbm_type == 'spanner' else ' '
             postfix = 'Z' if rdbm_type == 'spanner' else ''
             return "{}-{}-{}{}{}:{}:{}{}{}".format(dval[0:4], dval[4:6], dval[6:8], sep, dval[8:10], dval[10:12], dval[12:14], dval[14:17], postfix)
@@ -840,7 +841,7 @@ class DBUtils(SetupUtils):
         if data_type in ('ARRAY<STRING(MAX)>', 'JSONB'):
             return val
 
-        return val[0]
+        return val_
 
     def get_clean_objcet_class(self, entry):
Repository: vyxal/vyxal
Issue: Compressed numbers don't get converted to Sympy 

# UPDATE

The script now throws an error I guess we need to import sympy somewhere.

# Original
No clue how we missed that one.

# [Vyxal](https://github.com/Vyxal/Vyxal) `c`, 49 bytes 
```
»⟑]"Ȯ⁋æ≥ǔ}¼√ḋ¾d¯₴÷≤„~-↳§*≤4_⌐↳¯→ḟS∆Y↵Ḃ¥zjλ…°qẆ∷9»
```

[Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyJjIiwiIiwiwrvin5FdXCLIruKBi8Om4omlx5R9wrziiJrhuIvCvmTCr+KCtMO34omk4oCefi3ihrPCpyriiaQ0X+KMkOKGs8Kv4oaS4bifU+KIhlnihrXhuILCpXpqzrvigKbCsHHhuobiiLc5wrsiLCIiLCIiXQ==)


Gives 

```
stack.append(2190103378294521845700248699309885665950123333195645737170955981267389324534409006970256858120588676151695966441) 
```

Notice the lack of Sympy wrapper. 


Changed files:
vyxal/transpile.py

diff --git a/vyxal/transpile.py b/vyxal/transpile.py
index 59271abd..e1721859 100644
--- a/vyxal/transpile.py
+++ b/vyxal/transpile.py
@@ -188,7 +188,7 @@ def transpile_token(
     elif token.name == TokenType.GENERAL:
         return indent_str(elements.get(token.value, ("pass\\n", -1))[0], indent)
     elif token.name == TokenType.COMPRESSED_NUMBER:
-        return indent_str(f"stack.append({uncompress(token)})", indent)
+        return indent_str(f"stack.append(sympify({uncompress(token)}))", indent)
     elif token.name == TokenType.COMPRESSED_STRING:
         return indent_str(f"stack.append({uncompress(token)!r})", indent)
     elif token.name == TokenType.VARIABLE_GET:
Repository: vyxal/vyxal
Issue: Bug: `ḋ` flag breaks complex number output

**Describe the bug**
When adding the `ḋ` flag to a programme that outputs a complex number, it outputs nothing in the online interpreter.

**Example program (with `ḋ` flag)**

```
u√
```

[Try it](https://vyxal.pythonanywhere.com/?v=2#WyLhuIsiLCIiLCJ14oiaIiwiIiwiIl0=)

**Expected Output**

```
i
```
<!-- or formatted in any reasonable way -->

**Other things**

<!-- to help with diagnostics - completely optional, answer as many or as few -->

- Latest release when issue was created
- Removing the `ḋ` flag resolves issue
- No lists to force-evaluate
- I ran it in Python 3.10.11 IDLE (using `execute_vyxal("u√","eḋ","")`) and got this error (with directory names shortened):
```
Traceback (most recent call last):
  File "<pyshell#125>", line 1, in <module>
    execute_vyxal("u√","eḋ","")
  File "\\site-packages\\vyxal\\main.py", line 430, in execute_vyxal
    vy_print(output, ctx=ctx)
  File "\\site-packages\\vyxal\\elements.py", line 7260, in vy_print
    lhs = str(float(lhs))
  File "\\site-packages\\sympy\\core\\expr.py", line 350, in __float__
    raise TypeError("Cannot convert complex to float")
TypeError: Cannot convert complex to float
```

Changed files:
vyxal/elements.py

diff --git a/vyxal/elements.py b/vyxal/elements.py
index 9d3c5edd..4d6a479a 100644
--- a/vyxal/elements.py
+++ b/vyxal/elements.py
@@ -7257,7 +7257,12 @@ def vy_print(lhs, end="\\n", ctx=None):
     else:
         if is_sympy(lhs):
             if ctx.print_decimals and not lhs.is_Integer:
-                lhs = str(float(lhs))
+                if isinstance(
+                    lhs, complex
+                ):  # Complex numbers can't be converted to float,
+                    lhs = str(complex)  # so we have to handle them separately
+                else:
+                    lhs = str(float(lhs))
             else:
                 # Determine if the number is a imaginary sympy literal
                 if not lhs.is_real: