anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: ist-dresden/composum-nodes
Issue: Package Uploading is not respecting "force" and always forces an upload

Based on CRX Package Manager forcing an upload means that it will replace an already uploaded package and it not forced then the upload will fail.

As far as I understand the code the force tag is actually migrating to Package Zip File strict which is does seem wrong.

Anyhow it would be nice if Composum could act like CRX Package Manager or otherwise use a different name.

Changed files:
sling/core/pckgmgr/src/main/java/com/composum/sling/core/pckgmgr/PackageServlet.java

diff --git a/sling/core/pckgmgr/src/main/java/com/composum/sling/core/pckgmgr/PackageServlet.java b/sling/core/pckgmgr/src/main/java/com/composum/sling/core/pckgmgr/PackageServlet.java
index e4c940428..2a6edd2f0 100644
--- a/sling/core/pckgmgr/src/main/java/com/composum/sling/core/pckgmgr/PackageServlet.java
+++ b/sling/core/pckgmgr/src/main/java/com/composum/sling/core/pckgmgr/PackageServlet.java
@@ -749,7 +749,7 @@ public class PackageServlet extends AbstractServiceServlet {
                 RequestParameter file = parameters.getValue(AbstractServiceServlet.PARAM_FILE);
                 if (file != null) {
                     InputStream input = file.getInputStream();
-                    boolean force = RequestUtil.getParameter(request, PARAM_FORCE, false);
+                    boolean force = RequestUtil.getParameter(request, PARAM_FORCE, true);
 
                     JcrPackageManager manager = PackageUtil.createPackageManager(request);
                     JcrPackage jcrPackage = manager.upload(input, force);
Repository: ist-dresden/composum-nodes
Issue: Package Uploading is not respecting "force" and always forces an upload

Based on CRX Package Manager forcing an upload means that it will replace an already uploaded package and it not forced then the upload will fail.

As far as I understand the code the force tag is actually migrating to Package Zip File strict which is does seem wrong.

Anyhow it would be nice if Composum could act like CRX Package Manager or otherwise use a different name.

Changed files:
sling/core/pckgmgr/src/main/java/com/composum/sling/core/pckgmgr/PackageServlet.java
sling/core/commons/src/main/java/com/composum/sling/core/util/RequestUtil.java

diff --git a/sling/core/commons/src/main/java/com/composum/sling/core/util/RequestUtil.java b/sling/core/commons/src/main/java/com/composum/sling/core/util/RequestUtil.java
index 8e68c578b..1b2ea5d27 100644
--- a/sling/core/commons/src/main/java/com/composum/sling/core/util/RequestUtil.java
+++ b/sling/core/commons/src/main/java/com/composum/sling/core/util/RequestUtil.java
@@ -143,8 +143,8 @@ public class RequestUtil extends org.apache.sling.api.request.RequestUtil {
     public static Boolean getParameter(SlingHttpServletRequest request, String name, Boolean defaultValue) {
         Boolean result = null;
         String string = request.getParameter(name);
-        if (StringUtils.isNotBlank(string)) {
-            result = Boolean.parseBoolean(string);
+        if (string != null) {
+            result = StringUtils.isBlank(string) || name.equals(string) || Boolean.parseBoolean(string);
         }
         return result != null ? result : defaultValue;
     }
diff --git a/sling/core/pckgmgr/src/main/java/com/composum/sling/core/pckgmgr/PackageServlet.java b/sling/core/pckgmgr/src/main/java/com/composum/sling/core/pckgmgr/PackageServlet.java
index c536daffb..e4c940428 100644
--- a/sling/core/pckgmgr/src/main/java/com/composum/sling/core/pckgmgr/PackageServlet.java
+++ b/sling/core/pckgmgr/src/main/java/com/composum/sling/core/pckgmgr/PackageServlet.java
@@ -479,7 +479,7 @@ public class PackageServlet extends AbstractServiceServlet {
                 boolean force = RequestUtil.getParameter(request, PARAM_FORCE, false);
 
                 JcrPackageManager manager = PackageUtil.createPackageManager(request);
-                JcrPackage jcrPackage = manager.upload(input, true, force);
+                JcrPackage jcrPackage = manager.upload(input, force);
 
                 JsonWriter writer = ResponseUtil.getJsonWriter(response);
                 jsonAnswer(writer, "upload", "successful", manager, jcrPackage);
@@ -752,7 +752,7 @@ public class PackageServlet extends AbstractServiceServlet {
                     boolean force = RequestUtil.getParameter(request, PARAM_FORCE, false);
 
                     JcrPackageManager manager = PackageUtil.createPackageManager(request);
-                    JcrPackage jcrPackage = manager.upload(input, true, force);
+                    JcrPackage jcrPackage = manager.upload(input, force);
 
                     installPackage(request, response, manager, jcrPackage);
Repository: microsoftgraph/msgraph-sdk-java-core
Issue: Canary url is missing in the authentication provider

https://www.github.com/microsoftgraph/msgraph-sdk-java-core/tree/dev/src%2Fmain%2Fjava%2Fcom%2Fmicrosoft%2Fgraph%2Fauthentication%2FBaseAuthenticationProvider.java

https://github.com/microsoftgraph/msgraph-sdk-javascript/pull/413

Changed files:
src/main/java/com/microsoft/graph/authentication/BaseAuthenticationProvider.java

diff --git a/src/main/java/com/microsoft/graph/authentication/BaseAuthenticationProvider.java b/src/main/java/com/microsoft/graph/authentication/BaseAuthenticationProvider.java
index 4b73a21..78a596a 100644
--- a/src/main/java/com/microsoft/graph/authentication/BaseAuthenticationProvider.java
+++ b/src/main/java/com/microsoft/graph/authentication/BaseAuthenticationProvider.java
@@ -11,7 +11,7 @@ import javax.annotation.Nonnull;
  * Provides basic common methods for all authentication providers
  */
 public abstract class BaseAuthenticationProvider implements IAuthenticationProvider {
-    private static final HashSet<String> validGraphHostNames = new HashSet<>(Arrays.asList("graph.microsoft.com", "graph.microsoft.us", "dod-graph.microsoft.us", "graph.microsoft.de", "microsoftgraph.chinacloudapi.cn"));
+    private static final HashSet<String> validGraphHostNames = new HashSet<>(Arrays.asList("graph.microsoft.com", "graph.microsoft.us", "dod-graph.microsoft.us", "graph.microsoft.de", "microsoftgraph.chinacloudapi.cn", "canary.graph.microsoft.com"));
     /**
      * Determines whether a request should be authenticated or not based on it's url.
      * If you're implementing a custom provider, call that method first before getting the token
Repository: workcraft/workcraft
Issue: Unresponsive GUI if backend tool produces a lot of stdout/stderr

To reproduce run MPSat in technology mapping mode with `-v9` option. The Output window becomes flooded with updates and GUI becomes unresponsive. A solution may be to throttle update requests.


Changed files:
WorkcraftCore/src/org/workcraft/interop/ExternalProcess.java

diff --git a/WorkcraftCore/src/org/workcraft/interop/ExternalProcess.java b/WorkcraftCore/src/org/workcraft/interop/ExternalProcess.java
index c0c93227a..cd2d25ffe 100644
--- a/WorkcraftCore/src/org/workcraft/interop/ExternalProcess.java
+++ b/WorkcraftCore/src/org/workcraft/interop/ExternalProcess.java
@@ -12,7 +12,8 @@ public class ExternalProcess {
 
     abstract static class StreamReaderThread extends Thread {
         private final ReadableByteChannel channel;
-        private final ByteBuffer buffer = ByteBuffer.allocate(1024);
+        // Buffer is increased to 1MiB to reduce the number of updates for external processes with heavy output.
+        private final ByteBuffer buffer = ByteBuffer.allocate(1024 * 1024);
 
         StreamReaderThread(ReadableByteChannel channel) {
             this.channel = channel;
Repository: workcraft/workcraft
Issue: Names of the places that have proxies should always be shown

Never hide the names of places that have proxies. Otherwise it is impossible to track what the proxies are for.


Changed files:
PetriNetPlugin/src/org/workcraft/plugins/petri/VisualPlace.java

diff --git a/PetriNetPlugin/src/org/workcraft/plugins/petri/VisualPlace.java b/PetriNetPlugin/src/org/workcraft/plugins/petri/VisualPlace.java
index b0a4916d5..bdc712cc5 100644
--- a/PetriNetPlugin/src/org/workcraft/plugins/petri/VisualPlace.java
+++ b/PetriNetPlugin/src/org/workcraft/plugins/petri/VisualPlace.java
@@ -93,6 +93,11 @@ public class VisualPlace extends VisualComponent {
         });
     }
 
+    @Override
+    public boolean getNameVisibility() {
+        return super.getNameVisibility() || !getReplicas().isEmpty();
+    }
+
     @Override
     public void draw(DrawRequest r)    {
         Graphics2D g = r.getGraphics();
Repository: workcraft/workcraft
Issue: Simulation of Circuit  model does not highlight suggested component

**To reproduce:**
Start simulating a Circuit model and thengo few steps back in the simulation trace

**Observed behaviour:**
Excited components/ports/pins are highlighted in orange (but no "suggested" component/port/pin with green background).

**Expected behaviour:**
The next component/port/pin in the simulation trace should be highlighted with green background.

The same issue is also applicable to DFS model.

Changed files:
workcraft/StgPlugin/src/org/workcraft/plugins/stg/tools/StgSimulationTool.java

diff --git a/workcraft/StgPlugin/src/org/workcraft/plugins/stg/tools/StgSimulationTool.java b/workcraft/StgPlugin/src/org/workcraft/plugins/stg/tools/StgSimulationTool.java
index 2171f42a4..352627395 100644
--- a/workcraft/StgPlugin/src/org/workcraft/plugins/stg/tools/StgSimulationTool.java
+++ b/workcraft/StgPlugin/src/org/workcraft/plugins/stg/tools/StgSimulationTool.java
@@ -397,7 +397,7 @@ public class StgSimulationTool extends PetriSimulationTool {
 
     @Override
     public MathNode getUnderlyingNode(String ref) {
-        return refToUnderlyingNodeMap == null ? null : refToUnderlyingNodeMap.get(ref);
+        return refToUnderlyingNodeMap == null ? super.getUnderlyingNode(ref) : refToUnderlyingNodeMap.get(ref);
     }
 
     @Override
Repository: workcraft/workcraft
Issue: Right-click (two-finger click) doesn't work on Mac trackpad.

Please answer these questions before submitting your issue. Thanks!

1. What version of Workcraft are you using?
3.1.2
master from tuura/workcraft

2. What operating system are you using?
macOS 12 Sierra
I am unsure whether this is because I updated my mac.
I have looked into how right-click works on macs, and it appears that right-click works in the same way for all macs using the trackpad.

3. What did you do? If possible, provide a list of steps to reproduce
   the error.
Tried to right-click a gate in the Digital Circuit plugin in order to add a new input.

4. What did you expect to see?
A popup menu

5. What did you see instead?
Nothing

Changed files:
WorkcraftCore/src/org/workcraft/gui/graph/GraphEditorPanelMouseListener.java

diff --git a/WorkcraftCore/src/org/workcraft/gui/graph/GraphEditorPanelMouseListener.java b/WorkcraftCore/src/org/workcraft/gui/graph/GraphEditorPanelMouseListener.java
index 5b7943238..1dd28ce2e 100644
--- a/WorkcraftCore/src/org/workcraft/gui/graph/GraphEditorPanelMouseListener.java
+++ b/WorkcraftCore/src/org/workcraft/gui/graph/GraphEditorPanelMouseListener.java
@@ -92,9 +92,7 @@ class GraphEditorPanelMouseListener implements MouseMotionListener, MouseListene
             final MainWindow mainWindow = framework.getMainWindow();
             mainWindow.requestFocus(editor);
         }
-        if (!isPanCombo(e)) {
-            toolProvider.getSelectedTool().mouseClicked(adaptEvent(e));
-        }
+        toolProvider.getSelectedTool().mouseClicked(adaptEvent(e));
     }
 
     @Override