anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: jolokia/jolokia
Issue: HistoryKey should empty pathes as null

The HistoryKey curently distinguishes between pathes which are empty ('') or null. Since they are semantically the same they should be treated the same.


Changed files:
agent/core/src/main/java/org/jolokia/history/HistoryKey.java, agent/core/src/main/java/org/jolokia/http/AgentServlet.java

diff --git a/agent/core/src/main/java/org/jolokia/history/HistoryKey.java b/agent/core/src/main/java/org/jolokia/history/HistoryKey.java
index be494b66..d35f4b8f 100644
--- a/agent/core/src/main/java/org/jolokia/history/HistoryKey.java
+++ b/agent/core/src/main/java/org/jolokia/history/HistoryKey.java
@@ -144,7 +144,7 @@ public class HistoryKey implements Serializable {
         type = "attribute";
         mBean = new ObjectName(pMBean);
         secondary = pAttribute;
-        path = pPath;
+        path = sanitize(pPath);
         target = pTarget;
     }
 
diff --git a/agent/core/src/main/java/org/jolokia/http/AgentServlet.java b/agent/core/src/main/java/org/jolokia/http/AgentServlet.java
index 0a1a28cf..d55658a9 100755
--- a/agent/core/src/main/java/org/jolokia/http/AgentServlet.java
+++ b/agent/core/src/main/java/org/jolokia/http/AgentServlet.java
@@ -328,15 +328,19 @@ public class AgentServlet extends HttpServlet {
         // Lookup the Agent URL if needed
         AgentDetails details = backendManager.getAgentDetails();
         if (details.isInitRequired()) {
-            if (details.isUrlMissing()) {
-                String url = getBaseUrl(NetworkUtil.sanitizeLocalUrl(pReq.getRequestURL().toString()),
-                                        extractServletPath(pReq));
-                details.setUrl(url);
-            }
-            if (details.isSecuredMissing()) {
-                details.setSecured(pReq.getAuthType() != null);
+            synchronized (details) {
+                if (details.isInitRequired()) {
+                    if (details.isUrlMissing()) {
+                        String url = getBaseUrl(NetworkUtil.sanitizeLocalUrl(pReq.getRequestURL().toString()),
+                                extractServletPath(pReq));
+                        details.setUrl(url);
+                    }
+                    if (details.isSecuredMissing()) {
+                        details.setSecured(pReq.getAuthType() != null);
+                    }
+                    details.seal();
+                }
             }
-            details.seal();
         }
     }
Repository: openfoodfacts/openfoodfacts-androidapp
Issue: Uploaded images are not attributed to the user

Uploaded images are not attributed to the user
```
5 mars 2017 à 19:09:12 CET - Images sélectionnées (Ajout : front_en) - new image nutrition_en : 2.4 - voir
5 mars 2017 à 19:09:12 CET - openfoodfacts-contributors Images téléchargées (Ajout : 2) - new image 2 - image upload - voir
5 mars 2017 à 19:09:12 CET - openfoodfacts-contributors Images téléchargées (Ajout : 1) - new image 1 - image upload - voir
5 mars 2017 à 19:09:06 CET - sebleouf Informations (Ajout : lang, product_name, quantity, countries, nutrition_data_per) - (app)new android app - voir```

Changed files:
app/src/main/java/openfoodfacts/github/scrachx/openfood/network/OpenFoodAPIClient.java

diff --git a/app/src/main/java/openfoodfacts/github/scrachx/openfood/network/OpenFoodAPIClient.java b/app/src/main/java/openfoodfacts/github/scrachx/openfood/network/OpenFoodAPIClient.java
index 950460a61..39ea7b1ed 100644
--- a/app/src/main/java/openfoodfacts/github/scrachx/openfood/network/OpenFoodAPIClient.java
+++ b/app/src/main/java/openfoodfacts/github/scrachx/openfood/network/OpenFoodAPIClient.java
@@ -6,7 +6,6 @@ import android.content.Intent;
 import android.content.SharedPreferences;
 import android.os.AsyncTask;
 import android.os.Bundle;
-import android.support.annotation.NonNull;
 import android.support.v7.preference.PreferenceManager;
 import android.text.Html;
 import android.view.View;
@@ -31,6 +30,7 @@ import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 import me.dm7.barcodescanner.zxing.ZXingScannerView;
+import okhttp3.MediaType;
 import okhttp3.OkHttpClient;
 import okhttp3.RequestBody;
 import openfoodfacts.github.scrachx.openfood.BuildConfig;
@@ -368,6 +368,16 @@ public class OpenFoodAPIClient {
         imgMap.put("imgupload_nutrition\\"; filename=\\"nutrition_" + lang + ".png\\"", image.getImguploadNutrition());
         imgMap.put("imgupload_other\\"; filename=\\"other_" + lang + ".png\\"", image.getImguploadOther());
 
+        // Attribute the upload to the connected user
+        final SharedPreferences settings = context.getSharedPreferences("login", 0);
+        final String login = settings.getString("user", "");
+        final String password = settings.getString("pass", "");
+
+        if (!login.isEmpty() && !password.isEmpty()) {
+            imgMap.put("user_id", RequestBody.create(MediaType.parse("text/plain"), login));
+            imgMap.put("password", RequestBody.create(MediaType.parse("text/plain"), password));
+        }
+
         apiService.saveImage(imgMap)
                 .enqueue(new Callback<JsonNode>() {
                     @Override
Repository: openfoodfacts/openfoodfacts-androidapp
Issue: Add spaces after commas in Product View

Add spaces after commas in Product View 
- Packaging
- Manufacturing Places
- Purchase place

Check that all fields have proper spaces after commas, so that we're consistant across fields.

Changed files:
app/src/main/java/openfoodfacts/github/scrachx/openfood/fragments/SearchProductsResultsFragment.java
app/src/main/java/openfoodfacts/github/scrachx/openfood/models/Product.java

diff --git a/app/src/main/java/openfoodfacts/github/scrachx/openfood/fragments/SearchProductsResultsFragment.java b/app/src/main/java/openfoodfacts/github/scrachx/openfood/fragments/SearchProductsResultsFragment.java
index 956615d9d..c486737c6 100644
--- a/app/src/main/java/openfoodfacts/github/scrachx/openfood/fragments/SearchProductsResultsFragment.java
+++ b/app/src/main/java/openfoodfacts/github/scrachx/openfood/fragments/SearchProductsResultsFragment.java
@@ -10,6 +10,7 @@ import android.view.View;
 import android.view.ViewGroup;
 import android.widget.LinearLayout;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -156,7 +157,6 @@ public class SearchProductsResultsFragment extends BaseFragment {
     public void loadNextDataFromApi(int offset) {
         api.searchProduct(getArguments().getString("query"), offset, getActivity(),
                 new OpenFoodAPIClient.OnProductsCallback() {
-
                     @Override
                     public void onProductsResponse(boolean isResponseOk, List<Product> products, int countProducts) {
                         final int posStart = mProducts.size();
diff --git a/app/src/main/java/openfoodfacts/github/scrachx/openfood/models/Product.java b/app/src/main/java/openfoodfacts/github/scrachx/openfood/models/Product.java
index e27303ff3..f40dd0b1d 100644
--- a/app/src/main/java/openfoodfacts/github/scrachx/openfood/models/Product.java
+++ b/app/src/main/java/openfoodfacts/github/scrachx/openfood/models/Product.java
@@ -269,7 +269,7 @@ public class Product implements Serializable {
      * @return The stores
      */
     public String getStores() {
-        return stores;
+        return stores.replace(",",", ");
     }
 
 
@@ -293,7 +293,7 @@ public class Product implements Serializable {
      * @return The countries
      */
     public String getCountries() {
-        return countries;
+        return countries.replace(",",", ");
     }
 
 
@@ -301,7 +301,7 @@ public class Product implements Serializable {
      * @return The brands
      */
     public String getBrands() {
-        return brands;
+        return brands.replace(",", ", ");
     }
 
 
@@ -309,7 +309,7 @@ public class Product implements Serializable {
      * @return The packaging
      */
     public String getPackaging() {
-        return packaging;
+        return packaging.replace(",",", ");
     }
Repository: openfoodfacts/openfoodfacts-androidapp
Issue: Back button closes the activity in fragments

**Checklist**
- [x] Bug Report - The issue you are reporting might be there already. Please search on the [issues tracker](https://github.com/openfoodfacts/openfoodfacts-androidapp/issues) before creating or reporting a issue.
- [x] Before reporting, please ensure (if you can) that you have tested it with the latest (dev) version of the software.
- [x] Don't forget to tag your issue, it makes it easier to discover.

**Summary:** 

Back button closes the activity instead of going back to Home. Examples:

- Search by barcode
- Allergen alert
- Preferences
- Offline edit

**Steps to reproduce:** 

Go to the section. Press back button. 

**Expected behavior:** 

Go to home

**Observed behavior:** 

Activity closes

Changed files:
app/src/main/java/openfoodfacts/github/scrachx/openfood/views/MainActivity.java

diff --git a/app/src/main/java/openfoodfacts/github/scrachx/openfood/views/MainActivity.java b/app/src/main/java/openfoodfacts/github/scrachx/openfood/views/MainActivity.java
index 75eabfab3..7317c19ad 100644
--- a/app/src/main/java/openfoodfacts/github/scrachx/openfood/views/MainActivity.java
+++ b/app/src/main/java/openfoodfacts/github/scrachx/openfood/views/MainActivity.java
@@ -172,7 +172,8 @@ public class MainActivity extends BaseActivity implements CustomTabActivityHelpe
                     }
 
                     @Override
-                    public void onDrawerClosed(View drawerView) {}
+                    public void onDrawerClosed(View drawerView) {
+                    }
 
                     @Override
                     public void onDrawerSlide(View drawerView, float slideOffset) {
@@ -295,7 +296,7 @@ public class MainActivity extends BaseActivity implements CustomTabActivityHelpe
                     }
 
                     if (fragment != null) {
-                        getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, fragment).commit();
+                        getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, fragment).addToBackStack(null).commit();
                     } else {
                         // error in creating fragment
                         Log.e("MainActivity", "Error in creating fragment");
Repository: apache/hop
Issue: [Bug]: Unable to insert a variable in Write to log action with Ctrl+Space

### Apache Hop version?

2.3

### Java version?

11

### Operating system

Windows

### What happened?

Unable to insert a variable in Write to log action with Ctrl+Space in widget "Log Message".
Ctrl+Space work in "Log subject" but not in "Log message"

### Issue Priority

Priority: 3

### Issue Component

Component: Actions

Changed files:
plugins/actions/writetolog/src/main/java/org/apache/hop/workflow/actions/writetolog/ActionWriteToLogDialog.java

diff --git a/plugins/actions/writetolog/src/main/java/org/apache/hop/workflow/actions/writetolog/ActionWriteToLogDialog.java b/plugins/actions/writetolog/src/main/java/org/apache/hop/workflow/actions/writetolog/ActionWriteToLogDialog.java
index c3c2a8504e..de536b6a1d 100644
--- a/plugins/actions/writetolog/src/main/java/org/apache/hop/workflow/actions/writetolog/ActionWriteToLogDialog.java
+++ b/plugins/actions/writetolog/src/main/java/org/apache/hop/workflow/actions/writetolog/ActionWriteToLogDialog.java
@@ -26,7 +26,6 @@ import org.apache.hop.i18n.BaseMessages;
 import org.apache.hop.ui.core.PropsUi;
 import org.apache.hop.ui.core.dialog.BaseDialog;
 import org.apache.hop.ui.core.dialog.MessageBox;
-import org.apache.hop.ui.core.widget.ControlSpaceKeyAdapter;
 import org.apache.hop.ui.core.widget.TextVar;
 import org.apache.hop.ui.pipeline.transform.BaseTransformDialog;
 import org.apache.hop.ui.workflow.action.ActionDialog;
@@ -167,7 +166,7 @@ public class ActionWriteToLogDialog extends ActionDialog implements IActionDialo
     fdlLogMessage.top = new FormAttachment(wLogSubject, margin);
     fdlLogMessage.right = new FormAttachment(middle, -margin);
     wlLogMessage.setLayoutData(fdlLogMessage);
-
+  
     wLogMessage =
         new TextVar(
             variables, shell, SWT.MULTI | SWT.LEFT | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
@@ -180,7 +179,6 @@ public class ActionWriteToLogDialog extends ActionDialog implements IActionDialo
     fdLogMessage.right = new FormAttachment(100, 0);
     fdLogMessage.bottom = new FormAttachment(wOk, -margin);
     wLogMessage.setLayoutData(fdLogMessage);
-    wLogMessage.addKeyListener(new ControlSpaceKeyAdapter(variables, wLogMessage));
 
     getData();
Repository: bazelbuild/intellij
Issue: Error debugging py_binary: "More than 1 executable was produced when building don't know which one to debug"

#### Description of the issue. Please be specific.

I have a bazel repo with simple python app and lib projects.   I can run my app.py file using right-click run.  When I try to debug, I get failure popup on the debug tab that says "More than 1 executable was produced when building don't know which one to debug"

Not clear what other executable it is referring to?

I wonder if its because it produces a exe and zip file for the py_binary,  which is default behaviour for windows , no?

```
Target //projects/appA:main up-to-date:
  bazel-bin/projects/appA/main.exe
  bazel-bin/projects/appA/main.zip
```


#### Version information
IdeaUltimate: 2022.1.2
Platform: Windows 10 10.0
Bazel plugin: 2022.09.20.0.1-api-version-221
Bazel: 5.3.1


Changed files:
python/tests/unittests/com/google/idea/blaze/python/run/BlazePyRunConfigurationRunnerTest.java
python/src/com/google/idea/blaze/python/run/BlazePyRunConfigurationRunner.java

diff --git a/python/src/com/google/idea/blaze/python/run/BlazePyRunConfigurationRunner.java b/python/src/com/google/idea/blaze/python/run/BlazePyRunConfigurationRunner.java
index 7e512549e..7f0b26252 100644
--- a/python/src/com/google/idea/blaze/python/run/BlazePyRunConfigurationRunner.java
+++ b/python/src/com/google/idea/blaze/python/run/BlazePyRunConfigurationRunner.java
@@ -391,7 +391,12 @@ public class BlazePyRunConfigurationRunner implements BlazeCommandRunConfigurati
     }
     String name = PathUtil.getFileName(target.targetName().toString());
     for (File file : outputs) {
-      if (file.getName().equals(name)) {
+      String fileName = file.getName();
+      if (fileName.equals(name)) {
+        return file;
+      }
+      int exeIndex = fileName.lastIndexOf(".exe");
+      if (exeIndex > 0 && fileName.substring(0, exeIndex).equals(name)) {
         return file;
       }
     }
diff --git a/python/tests/unittests/com/google/idea/blaze/python/run/BlazePyRunConfigurationRunnerTest.java b/python/tests/unittests/com/google/idea/blaze/python/run/BlazePyRunConfigurationRunnerTest.java
index e9cd46aab..4e4bf49d3 100644
--- a/python/tests/unittests/com/google/idea/blaze/python/run/BlazePyRunConfigurationRunnerTest.java
+++ b/python/tests/unittests/com/google/idea/blaze/python/run/BlazePyRunConfigurationRunnerTest.java
@@ -38,4 +38,15 @@ public class BlazePyRunConfigurationRunnerTest {
     assertThat(BlazePyRunConfigurationRunner.findExecutable(target, outputFiles))
         .isEqualTo(new File("blaze-bin/path/to/package/SomeTest"));
   }
+
+  @Test
+  public void testMultipleOutputFilesOnWindows() {
+    Label target = Label.create("//path/to/package:SomeTest");
+    ImmutableList<File> outputFiles =
+            ImmutableList.of(
+                    new File("blaze-bin/path/to/package/SomeTest.zip"),
+                    new File("blaze-bin/path/to/package/SomeTest.exe"));
+    assertThat(BlazePyRunConfigurationRunner.findExecutable(target, outputFiles))
+            .isEqualTo(new File("blaze-bin/path/to/package/SomeTest.exe"));
+  }
 }
Repository: odpi/egeria
Issue: [BUG] REX pretraversals are failing.

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

 REX pretraversals are failing.

### Expected Behavior

 REX pretraversals should work

### Steps To Reproduce

create a n entity with a relationship an attempt to explore from it from the REX UI.

### Environment

```markdown
- Egeria:
- OS:
- Java:
- Browser (for UI issues):
- Additional connectors and integration:
```


### Any Further Information?

The Traversal logic work on longs whereas the pre traversal logic is incorrectly working with Longs (the object) and it checks for non null to determine if there is an asOfTime. The value is 0 for this case so it fails if the back end repository does no support asOfTime on the query 

Changed files:
open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/handlers/RexViewHandler.java

diff --git a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/handlers/RexViewHandler.java b/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/handlers/RexViewHandler.java
index 39e4d6ba87..a618422571 100644
--- a/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/handlers/RexViewHandler.java
+++ b/open-metadata-implementation/view-services/rex-view/rex-view-server/src/main/java/org/odpi/openmetadata/viewservices/rex/handlers/RexViewHandler.java
@@ -979,7 +979,7 @@ public class RexViewHandler
                                         boolean         enterpriseOption,
                                         String          entityGUID,
                                         int             depth,
-                                        Long            asOfTime,
+                                        long            asOfTime,
                                         String          methodName)
     throws
     RexViewServiceException
@@ -1021,7 +1021,7 @@ public class RexViewHandler
             if (depth > 0)
             {
                 Date asOfTimeDate = null;
-                if (asOfTime !=null) {
+                if (asOfTime != 0) {
                     asOfTimeDate = new Date(asOfTime);
                 }
                 instGraph = repositoryServicesClient.getEntityNeighborhood(userId,
Repository: odpi/egeria
Issue: [BUG] deleteGovernanceZone error

### Existing/related issue?

_No response_

### Current Behavior

(https://github.com/odpi/egeria/blob/main/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceZoneManager.java)
line: 210 spell error
`final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-program/users/{1}/governance-zones/{2}/delete}";`
the last symbol '}' is redundant 

### Expected Behavior

the correct as follow
`final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-program/users/{1}/governance-zones/{2}/delete";`

### Steps To Reproduce

_No response_

### Environment

```markdown
- Egeria:3.12
- OS:centos7
- Java:11
- Browser (for UI issues):chrome
- Additional connectors and integration:
```


### Any Further Information?

_No response_

Changed files:
open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceZoneManager.java

diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceZoneManager.java b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceZoneManager.java
index ac3263634e..6e9be1b6fb 100644
--- a/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceZoneManager.java
+++ b/open-metadata-implementation/access-services/governance-program/governance-program-client/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/client/GovernanceZoneManager.java
@@ -207,7 +207,7 @@ public class GovernanceZoneManager extends GovernanceProgramBaseClient implement
         final String methodName = "deleteGovernanceZone";
 
         final String guidParameter = "zoneGUID";
-        final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-program/users/{1}/governance-zones/{2}/delete}";
+        final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-program/users/{1}/governance-zones/{2}/delete";
 
         super.removeReferenceable(userId, zoneGUID, guidParameter, urlTemplate, methodName);
     }
Repository: javacord/javacord
Issue: Game of User does not update if not playing anything after.

When a user plays a game and leaves it, getGame() still gives the last played game, instead of null.


Changed files:
src/main/java/de/btobastian/javacord/utils/handler/user/PresenceUpdateHandler.java

diff --git a/src/main/java/de/btobastian/javacord/utils/handler/user/PresenceUpdateHandler.java b/src/main/java/de/btobastian/javacord/utils/handler/user/PresenceUpdateHandler.java
index 4f9d7745..14622b19 100644
--- a/src/main/java/de/btobastian/javacord/utils/handler/user/PresenceUpdateHandler.java
+++ b/src/main/java/de/btobastian/javacord/utils/handler/user/PresenceUpdateHandler.java
@@ -122,22 +122,27 @@ public class PresenceUpdateHandler extends PacketHandler {
         }
 
         // check game
-        if (packet.has("game") && !packet.isNull("game")) {
-            if (packet.getJSONObject("game").has("name")) {
-                String game = packet.getJSONObject("game").get("name").toString();
-                String oldGame = user.getGame();
-                if ((game == null && oldGame != null)
-                        || (game != null && oldGame == null)
-                        || (game != null && !game.equals(oldGame))) {
-                    ((ImplUser) user).setGame(game);
-                    List<UserChangeGameListener> listeners = api.getListeners(UserChangeGameListener.class);
-                    synchronized (listeners) {
-                        for (UserChangeGameListener listener : listeners) {
-                            try {
-                                listener.onUserChangeGame(api, user, oldGame);
-                            } catch (Throwable t) {
-                                logger.warn("Uncaught exception in UserChangeGameListener!", t);
-                            }
+        if (packet.has("game")) {
+            String game;
+            if (!packet.isNull("game")
+                    && packet.getJSONObject("game").has("name")
+                    && !packet.getJSONObject("game").isNull("name")) {
+                game = packet.getJSONObject("game").get("name").toString();
+            } else {
+                game = null;
+            }
+            String oldGame = user.getGame();
+            if ((game == null && oldGame != null)
+                    || (game != null && oldGame == null)
+                    || (game != null && !game.equals(oldGame))) {
+                ((ImplUser) user).setGame(game);
+                List<UserChangeGameListener> listeners = api.getListeners(UserChangeGameListener.class);
+                synchronized (listeners) {
+                    for (UserChangeGameListener listener : listeners) {
+                        try {
+                            listener.onUserChangeGame(api, user, oldGame);
+                        } catch (Throwable t) {
+                            logger.warn("Uncaught exception in UserChangeGameListener!", t);
                         }
                     }
                 }
Repository: javacord/javacord
Issue: Regions

Discord changed the avaible server-regions. Please update them. 

There is e.g. only one europe region now instead of east and west.

Changed files:
javacord-api/src/main/java/org/javacord/api/entity/Region.java

diff --git a/javacord-api/src/main/java/org/javacord/api/entity/Region.java b/javacord-api/src/main/java/org/javacord/api/entity/Region.java
index ddf5cce9..f59a25ee 100644
--- a/javacord-api/src/main/java/org/javacord/api/entity/Region.java
+++ b/javacord-api/src/main/java/org/javacord/api/entity/Region.java
@@ -8,6 +8,7 @@ public enum Region implements Nameable {
     // "Normal" regions
     AMSTERDAM("amsterdam", "Amsterdam", false),
     BRAZIL("brazil", "Brazil", false),
+    EUROPE("europe", "Europe", false),
     EU_WEST("eu-west", "EU West", false),
     EU_CENTRAL("eu-central", "EU Central", false),
     FRANKFURT("frankfurt", "Frankfurt", false),
@@ -15,6 +16,7 @@ public enum Region implements Nameable {
     JAPAN("japan", "Japan", false),
     LONDON("london", "London", false),
     RUSSIA("russia", "Russia", false),
+    INDIA("india", "India", false),
     SINGAPORE("singapore", "Singapore", false),
     SYDNEY("sydney", "Sydney", false),
     US_EAST("us-east", "US East", false),
Repository: javacord/javacord
Issue: http status codes being ignored

JavaCord will attempt to parse Discord's repsonse on certain actions (e.g. sendMessage()) without checking the http response code. This results in HTML being parsed as JSON, and an exception being thrown. Attached is a stacktrace of when the API returned an HTTP 502, but JavaCord tried parsing the response as JSON anyway.

https://hastebin.com/zodofazefi.php


Changed files:
javacord-core/src/main/java/org/javacord/core/util/rest/RestRequestResult.java

diff --git a/javacord-core/src/main/java/org/javacord/core/util/rest/RestRequestResult.java b/javacord-core/src/main/java/org/javacord/core/util/rest/RestRequestResult.java
index 515aa667..a983cef7 100644
--- a/javacord-core/src/main/java/org/javacord/core/util/rest/RestRequestResult.java
+++ b/javacord-core/src/main/java/org/javacord/core/util/rest/RestRequestResult.java
@@ -1,10 +1,13 @@
 package org.javacord.core.util.rest;
 
+import com.fasterxml.jackson.core.JsonParseException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.NullNode;
 import okhttp3.Response;
 import okhttp3.ResponseBody;
+import org.apache.logging.log4j.Logger;
+import org.javacord.core.util.logging.LoggerUtil;
 
 import java.io.IOException;
 import java.util.Optional;
@@ -14,6 +17,11 @@ import java.util.Optional;
  */
 public class RestRequestResult {
 
+    /**
+     * The logger of this class.
+     */
+    private static final Logger logger = LoggerUtil.getLogger(RestRequestResult.class);
+
     private final RestRequest<?> request;
     private final Response response;
     private final ResponseBody body;
@@ -37,7 +45,14 @@ public class RestRequestResult {
         } else {
             stringBody = body.string();
             ObjectMapper mapper = request.getApi().getObjectMapper();
-            JsonNode jsonBody = mapper.readTree(stringBody);
+            JsonNode jsonBody;
+            try {
+                jsonBody = mapper.readTree(stringBody);
+            } catch (JsonParseException e) {
+                // This can happen if Discord sends garbage (see https://github.com/Javacord/Javacord/issues/526)
+                logger.debug("Failed to parse json response", e);
+                jsonBody = null;
+            }
             this.jsonBody = jsonBody == null ? NullNode.getInstance() : jsonBody;
         }
     }
@@ -80,7 +95,7 @@ public class RestRequestResult {
 
     /**
      * Gets the json body of the response.
-     * Returns a {@link NullNode} if the response had no body.
+     * Returns a {@link NullNode} if the response had no body or the body is not in a valid json format.
      *
      * @return The json body of the response.
      */
Repository: javacord/javacord
Issue: Can't login to 'real' account

I'm attempting to log into a real account using the API. But it's throwing an error and an exception saying this:

> java.lang.IllegalArgumentException: 400 Bad request! Maybe wrong email or password?
>   at de.btobastian.javacord.ImplDiscordAPI.requestTokenBlocking(ImplDiscordAPI.java:1014)
>   at de.btobastian.javacord.ImplDiscordAPI.connectBlocking(ImplDiscordAPI.java:160)
>   at de.btobastian.javacord.ImplDiscordAPI$2.call(ImplDiscordAPI.java:147)
>   at de.btobastian.javacord.ImplDiscordAPI$2.call(ImplDiscordAPI.java:144)

I made sure the email and password are right. I even went to the discord program, logged out. Copied the email I put. Put it in the email box, copied the password from the program and hit login on discord, and it logged me in. So I do not know what the problem is :/ . I Do not have 2-FA enabled. I only require an email and password to login.


Changed files:
src/main/java/de/btobastian/javacord/ImplDiscordAPI.java

diff --git a/src/main/java/de/btobastian/javacord/ImplDiscordAPI.java b/src/main/java/de/btobastian/javacord/ImplDiscordAPI.java
index df7d9a13..6d87dcdd 100644
--- a/src/main/java/de/btobastian/javacord/ImplDiscordAPI.java
+++ b/src/main/java/de/btobastian/javacord/ImplDiscordAPI.java
@@ -72,6 +72,11 @@ import java.util.concurrent.Future;
  * The implementation of {@link DiscordAPI}.
  */
 public class ImplDiscordAPI implements DiscordAPI {
+    
+    // If you have a better way to retrieve this other than manually, please do implement
+	private static final String JAVA_VERSION = Runtime.class.getPackage().getImplementationVersion();
+	private static final String VERSION = "2.0.11";
+	private static final String UNIREST_VERSION = "1.4.8";
 
     /**
      * The logger of this class.
@@ -1006,8 +1011,9 @@ public class ImplDiscordAPI implements DiscordAPI {
         try {
             logger.debug("Trying to request token (email: {}, password: {})", email, password.replaceAll(".", "*"));
             HttpResponse<JsonNode> response = Unirest.post("https://discordapp.com/api/auth/login")
-                    .field("email", email)
-                    .field("password", password)
+                    .header("User-Agent", "DiscordBot (https://github.com/BtoBastian/Javacord " + VERSION + ") Java/" + JAVA_VERSION + " Unirest/" + UNIREST_VERSION)
+                    .header("Content-Type", "application/json")
+                    .body("{\\"email\\":\\"" + email +"\\", \\"password\\":\\"" + password + "\\"}")
                     .asJson();
             JSONObject jsonResponse = response.getBody().getObject();
             if (response.getStatus() == 400) {
Repository: spring-cloud/spring-cloud-commons
Issue: InfoEndpoint ID Is Not Set

When not using a boot version less than 1.4.x, the `InfoEndpoint` id is not set properly.  See spring-cloud/spring-cloud-netflix#1449.

Changed files:
spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshEndpointAutoConfiguration.java

diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshEndpointAutoConfiguration.java b/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshEndpointAutoConfiguration.java
index bac20fea..a09858d1 100644
--- a/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshEndpointAutoConfiguration.java
+++ b/spring-cloud-context/src/main/java/org/springframework/cloud/autoconfigure/RefreshEndpointAutoConfiguration.java
@@ -58,11 +58,16 @@ import org.springframework.integration.monitor.IntegrationMBeanExporter;
 @AutoConfigureAfter(EndpointAutoConfiguration.class)
 public class RefreshEndpointAutoConfiguration {
 
-	@ConditionalOnBean(EndpointAutoConfiguration.class)
+	//TODO Remove this class and InfoEndpointRebinderConfiguration once we no longer
+	//need to support Boot 1.3.x
 	@ConditionalOnMissingClass("org.springframework.boot.actuate.info.InfoContributor")
-	@Bean
-	InfoEndpointRebinderConfiguration infoEndpointRebinderConfiguration() {
-		return new InfoEndpointRebinderConfiguration();
+	protected static class InfoEndpointAutoConfiguration {
+
+		@ConditionalOnBean(EndpointAutoConfiguration.class)
+		@Bean
+		InfoEndpointRebinderConfiguration infoEndpointRebinderConfiguration() {
+			return new InfoEndpointRebinderConfiguration();
+		}
 	}
 
 	@ConditionalOnMissingBean
@@ -168,7 +173,7 @@ public class RefreshEndpointAutoConfiguration {
 		}
 
 		private InfoEndpoint infoEndpoint(InfoEndpoint endpoint) {
-			return new InfoEndpoint(endpoint.invoke()) {
+			InfoEndpoint newEndpoint = new InfoEndpoint(endpoint.invoke()) {
 				@Override
 				public Map<String, Object> invoke() {
 					Map<String, Object> info = new LinkedHashMap<String, Object>(
@@ -177,6 +182,10 @@ public class RefreshEndpointAutoConfiguration {
 					return info;
 				}
 			};
+			newEndpoint.setId(endpoint.getId());
+			newEndpoint.setEnabled(endpoint.isEnabled());
+			newEndpoint.setSensitive(endpoint.isSensitive());
+			return newEndpoint;
 		}
 
 	}
Repository: wso2/product-is
Issue: OIdC Session Management RP-initiated logout : Backchannel logout tokens form param should change to "logout_token"

backchannel logout tokens have a form param "logoutToken", which, according to the spec, should be "logout_token". Ref: http://openid.net/specs/openid-connect-backchannel-1_0.html#BCRequest.

Changed files:
modules/samples/oauth2/playground2/src/main/org/wso2/sample/identity/oauth2/OIDCBackchannelLogoutServlet.java

diff --git a/modules/samples/oauth2/playground2/src/main/org/wso2/sample/identity/oauth2/OIDCBackchannelLogoutServlet.java b/modules/samples/oauth2/playground2/src/main/org/wso2/sample/identity/oauth2/OIDCBackchannelLogoutServlet.java
index 9def5b6fa..902953f65 100644
--- a/modules/samples/oauth2/playground2/src/main/org/wso2/sample/identity/oauth2/OIDCBackchannelLogoutServlet.java
+++ b/modules/samples/oauth2/playground2/src/main/org/wso2/sample/identity/oauth2/OIDCBackchannelLogoutServlet.java
@@ -56,8 +56,8 @@ public class OIDCBackchannelLogoutServlet extends HttpServlet {
 
         String sid = null;
         try {
-            sid = (String) SignedJWT.parse(req.getParameter("logoutToken")).getJWTClaimsSet().getClaim("sid");
-            log.info("Logout token: " + req.getParameter("logoutToken"));
+            sid = (String) SignedJWT.parse(req.getParameter("logout_token")).getJWTClaimsSet().getClaim("sid");
+            log.info("Logout token: " + req.getParameter("logout_token"));
         } catch (ParseException e) {
             log.error("Error in generating Logout Token.", e);
         }
Repository: huaweicloud/sermant
Issue: 【fix】fix bug springboot registry plugin

### What happened?

if url contains space , request will fail;
We need use the encoded url replcae decoded url

### How can we reproduce it (as minimally and precisely as possible)?

Use url which has space(%20) request

### Anything else we need to know?

_No response_

### Sermant version

<details>
0.7.0
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```
</details>


Changed files:
sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java

diff --git a/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java b/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java
index 4b05f568..7dd73d7e 100644
--- a/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java
+++ b/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java
@@ -308,9 +308,9 @@ public class RequestInterceptorUtils {
             .append(HttpConstants.HTTP_URL_COLON)
             .append(serviceInstance.getPort())
             .append(path);
-        if (uri.getQuery() != null && method.equals(HttpConstants.HTTP_GET)) {
+        if (uri.getRawQuery() != null && method.equals(HttpConstants.HTTP_GET)) {
             urlBuild.append(HttpConstants.HTTP_URL_UNKNOWN)
-                .append(uri.getQuery());
+                .append(uri.getRawQuery());
         }
         return urlBuild.toString();
     }
Repository: huaweicloud/sermant
Issue: 【bug】fix the registry plugin bugs

### What happened?

can not work

### How can we reproduce it (as minimally and precisely as possible)?

no

### Anything else we need to know?

_No response_

### Sermant version

<details>
0.6.0
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```
</details>


Changed files:
sermant-plugins/sermant-springboot-registry/springboot-registry-service/src/main/java/com/huawei/discovery/service/retry/RetryServiceImpl.java

diff --git a/sermant-plugins/sermant-springboot-registry/springboot-registry-service/src/main/java/com/huawei/discovery/service/retry/RetryServiceImpl.java b/sermant-plugins/sermant-springboot-registry/springboot-registry-service/src/main/java/com/huawei/discovery/service/retry/RetryServiceImpl.java
index ce5ee597..454ca55e 100644
--- a/sermant-plugins/sermant-springboot-registry/springboot-registry-service/src/main/java/com/huawei/discovery/service/retry/RetryServiceImpl.java
+++ b/sermant-plugins/sermant-springboot-registry/springboot-registry-service/src/main/java/com/huawei/discovery/service/retry/RetryServiceImpl.java
@@ -40,6 +40,7 @@ import java.net.ConnectException;
 import java.net.NoRouteToHostException;
 import java.time.LocalDateTime;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -66,9 +67,8 @@ public class RetryServiceImpl implements InvokerService {
             ConnectException.class,
             NoRouteToHostException.class);
 
-    private final List<String> rawRetryEx = Arrays.asList(
-            "org.apache.http.conn.ConnectTimeoutException",
-            "org.apache.http.NoHttpResponseException");
+    private final List<String> rawRetryEx = Collections.singletonList(
+            "org.apache.http.conn.ConnectTimeoutException");
 
     private final Map<String, Retry> retryCache = new ConcurrentHashMap<>();
Repository: huaweicloud/sermant
Issue: 【fix】fix the bug that springboot registry plugin can not process the url query params when method is post

### What happened?

when the method is post, and it's url has the url query params, plugin will not handler it. The result for it will lose the query params

### How can we reproduce it (as minimally and precisely as possible)?

N/A

### Anything else we need to know?

_No response_

### Sermant version

<details>
0.8.0
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```
</details>


Changed files:
sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java

diff --git a/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java b/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java
index 7dd73d7e..3efa99ef 100644
--- a/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java
+++ b/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java
@@ -308,9 +308,8 @@ public class RequestInterceptorUtils {
             .append(HttpConstants.HTTP_URL_COLON)
             .append(serviceInstance.getPort())
             .append(path);
-        if (uri.getRawQuery() != null && method.equals(HttpConstants.HTTP_GET)) {
-            urlBuild.append(HttpConstants.HTTP_URL_UNKNOWN)
-                .append(uri.getRawQuery());
+        if (uri.getRawQuery() != null) {
+            urlBuild.append(HttpConstants.HTTP_URL_UNKNOWN).append(uri.getRawQuery());
         }
         return urlBuild.toString();
     }
Repository: hxsecurity/dongtai-agent-java
Issue: When using resttemplate to customize the header, some fields will not be loaded, such as the host header.

### Preflight Checklist

- [X] I agree to follow the [Code of Conduct](https://github.com/HXSecurity/DongTai/blob/main/.github/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/HXSecurity/DongTai/issues) for an issue that matches the one I want to file, without success.
- [X] I am not looking for support or already pursued the available [support channels](https://github.com/HXSecurity/DongTai/issues/new/choose) without success.

### Version

1.1.2

### Installation Type

Official Docker Compose

### Service Name

DongTai-agent-java

### Describe the details of the bug and the steps to reproduce it

When using resttemplate to customize the header, some fields will not be loaded, such as the host header.In sun.net.www.protocol.http.httpurlconnection, allowrestrictedheaders is assigned in the static block and will be initialized only once. In the agent, httpurlconnection is loaded before the program, which leads to this problem.
使用RestTemplate自定义头的时候有些字段会加载不进来，比如说host头。因为在sun.net.www.protocol.http.HttpURLConnection中allowRestrictedHeaders是放在static块中赋值，只会初始化一次。而在agent中先于程序加载了HttpURLConnection，所以导致这个问题。

### Additional Information

_No response_

### Logs

_No response_

Changed files:
iast-agent/src/main/java/com/secnium/iast/agent/AgentLauncher.java

diff --git a/iast-agent/src/main/java/com/secnium/iast/agent/AgentLauncher.java b/iast-agent/src/main/java/com/secnium/iast/agent/AgentLauncher.java
index 26ef6647..6f380206 100755
--- a/iast-agent/src/main/java/com/secnium/iast/agent/AgentLauncher.java
+++ b/iast-agent/src/main/java/com/secnium/iast/agent/AgentLauncher.java
@@ -24,6 +24,7 @@ public class AgentLauncher {
      * @param inst inst
      */
     public static void premain(String args, Instrumentation inst) {
+        System.setProperty("sun.net.http.allowRestrictedHeaders","true");
         LAUNCH_MODE = LAUNCH_MODE_AGENT;
         try {
             Agent.appendToolsPath();
Repository: hxsecurity/dongtai-agent-java
Issue: Agent动态attach后卸载存在bug

### Preflight Checklist

- [X] I agree to follow the [Code of Conduct](https://github.com/HXSecurity/DongTai/blob/main/.github/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/HXSecurity/DongTai/issues) for an issue that matches the one I want to file, without success.
- [X] I am not looking for support or already pursued the available [support channels](https://github.com/HXSecurity/DongTai/issues/new/choose) without success.

### Version

1.1.4

### Installation Type

Other (specify below)

### Service Name

DongTai-agent-java

### Describe the details of the bug and the steps to reproduce it

1.不涉及
2.不涉及
3.执行卸载时AttachLauncher 传入的是“token=uninstall” ，而agentmain中判断传入字符是否等于“uninstall”。前后不一致导致发起热卸载操作失败

### Additional Information

_No response_

### Logs

_No response_

Changed files:
iast-agent/src/main/java/com/secnium/iast/agent/AttachLauncher.java

diff --git a/iast-agent/src/main/java/com/secnium/iast/agent/AttachLauncher.java b/iast-agent/src/main/java/com/secnium/iast/agent/AttachLauncher.java
index ab373c86..fe861bc1 100644
--- a/iast-agent/src/main/java/com/secnium/iast/agent/AttachLauncher.java
+++ b/iast-agent/src/main/java/com/secnium/iast/agent/AttachLauncher.java
@@ -34,7 +34,7 @@ public class AttachLauncher {
                 }
             }
 
-            vmObj.loadAgent(AGENT_PATH, "token=" + args);
+            vmObj.loadAgent(AGENT_PATH, args);
             LogUtils.info("attach to process " + pid + " success.");
         } finally {
             if (null != vmObj) {
Repository: androidx/media
Issue: API <=26: MediaNotification will add a Badge to the App Icon

New APIs will never show a badge for a MediaStyle notification. It seems that for older API versions it needs to be deactivated manually.


### Media3 Version
1.0.0-beta02



Changed files:
libraries/session/src/main/java/androidx/media3/session/DefaultMediaNotificationProvider.java

diff --git a/libraries/session/src/main/java/androidx/media3/session/DefaultMediaNotificationProvider.java b/libraries/session/src/main/java/androidx/media3/session/DefaultMediaNotificationProvider.java
index 4b588cfda7..23bbb9f85d 100644
--- a/libraries/session/src/main/java/androidx/media3/session/DefaultMediaNotificationProvider.java
+++ b/libraries/session/src/main/java/androidx/media3/session/DefaultMediaNotificationProvider.java
@@ -508,6 +508,9 @@ public class DefaultMediaNotificationProvider implements MediaNotification.Provi
             channelId,
             context.getString(channelNameResourceId),
             NotificationManager.IMPORTANCE_LOW);
+    if (Util.SDK_INT == 26 || Util.SDK_INT == 27) {
+      channel.setShowBadge(false);
+    }
     notificationManager.createNotificationChannel(channel);
   }