anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: rundeck/rundeck-cli
Issue: RUN-1002: rd projects scm perform project-commit issue

I seem to be unable to perform a project commit for multiple jobs using the cli.

Fail for multiple jobs that are surrounded by quotes:

```
rd projects scm perform --project=MyProject --integration="export" --field="message='Daily sync'" --action="project-commit" \\
  --job="221533ab-6d50-4345-adda-1c2a5408ffae 15a8b7f4-3bc3-4783-b1b4-eebf6679269e"
Action project-commit failed
No jobs were selected
```

Pass for single job surrounded by quotes:

```
rd projects scm perform --project=MyProject --integration="export" --field="message='Daily sync'" --action="project-commit" \\
  --job="15a8b7f4-3bc3-4783-b1b4-eebf6679269e"
# Action project-commit was successful.
# Result: SCM export Action was Successful: project-commit
```

Fail for multiple jobs without quotes:

```
rd projects scm perform --project=MyProject --integration="export" --field="message='Daily sync'" --action="project-commit" \\
  --job=221533ab-6d50-4345-adda-1c2a5408ffae 15a8b7f4-3bc3-4783-b1b4-eebf6679269e

Unmatched argument at index 8: '15a8b7f4-3bc3-4783-b1b4-eebf6679269e'
```

According to the cli/docs, I can pass in space separate job ids.

```
$ rd --version
2.0.0
```

Rundeck version 4.3.1

Changed files:
rd-cli-tool/src/main/java/org/rundeck/client/tool/commands/projects/SCM.java

diff --git a/rd-cli-tool/src/main/java/org/rundeck/client/tool/commands/projects/SCM.java b/rd-cli-tool/src/main/java/org/rundeck/client/tool/commands/projects/SCM.java
index 8648aff..0bc4eac 100644
--- a/rd-cli-tool/src/main/java/org/rundeck/client/tool/commands/projects/SCM.java
+++ b/rd-cli-tool/src/main/java/org/rundeck/client/tool/commands/projects/SCM.java
@@ -284,10 +284,10 @@ public class SCM extends BaseCommand {
 
     @Getter @Setter
     public static class ActionPerformOptions extends ActionInputsOptions {
-        @CommandLine.Option(names = {"--field", "-f"}, description = "Field input values, space separated key=value list")
+        @CommandLine.Option(names = {"--field", "-f"}, arity = "1..*", description = "Field input values, space separated key=value list")
         private List<String> fields;
 
-        @CommandLine.Option(names = {"--item", "-I"}, description = "Items to include, space separated list")
+        @CommandLine.Option(names = {"--item", "-I"}, arity = "1..*", description = "Items to include, space separated list")
         private List<String> item;
 
         @CommandLine.Option(names = {"-A", "--allitems"},
@@ -314,11 +314,12 @@ public class SCM extends BaseCommand {
                         "(import only)")
         boolean allUntrackedItems;
 
-        @CommandLine.Option(names = {"--job", "-j"}, description = "Job IDs to include, space separated list")
+        @CommandLine.Option(names = {"--job", "-j"}, arity = "1..*", description = "Job IDs to include, space separated list")
         List<String> job;
 
 
         @CommandLine.Option(names = {"--delete", "-d"},
+                arity = "1..*",
                 description = "Job IDs or Item Ids to delete, space separated list")
         List<String> delete;
Repository: hapifhir/org.hl7.fhir.core
Issue: Pluralization code returning constant name instead of template for HAPI-FHIR test

The following test in HAPI-FHIR fails with the new pluralization error message:

FhirPathFilterInterceptorTest

It is now returning `org.hl7.fhir.exceptions.PathEngineException: FHIRPATH_LEFT_VALUE` where it previously gave the templated message: `org.hl7.fhir.exceptions.PathEngineException: Error performing *: left operand has more than one value`

Changed files:
org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/context/IWorkerContext.java, org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java

diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/context/IWorkerContext.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/context/IWorkerContext.java
index 0e420ebf6..db92e864a 100644
--- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/context/IWorkerContext.java
+++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/context/IWorkerContext.java
@@ -299,6 +299,8 @@ public interface IWorkerContext {
 
   String formatMessage(String theMessage, Object... theMessageArguments);
 
+  String formatMessagePlural(Integer pl, String theMessage, Object... theMessageArguments);
+
   void setValidationMessageLanguage(Locale locale);
 
   public class ValidationResult {
diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java
index 2c865e49d..5e55e6401 100644
--- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java
+++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java
@@ -575,7 +575,7 @@ public class FHIRPathEngine {
   }
 
   private FHIRException makeExceptionPlural(Integer num, ExpressionNode holder, String constName, Object... args) {
-    String fmt = worker.formatMessage(constName, args);
+    String fmt = worker.formatMessagePlural(num, constName, args);
     if (location != null) {
       fmt = fmt + " "+worker.formatMessage(I18nConstants.FHIRPATH_LOCATION, location);
     }
Repository: openliberty/ci.maven
Issue: Issuing using `serverXmlFile` config parm in dev mode; parms with 'alias' don't propagate via mojo executor

Using a config parm like:
`<configFile>src/main/liberty/config/server.xml</configFile>`
leads to this failure in dev mode:

> [ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.0.1:dev (default-cli) on project demo: Unable to execute mojo: Unable to parse configuration of mojo io.openliberty.tools:liberty-maven-plugin:3.0.1:create for parameter configFile: Cannot find 'configFile' in class io.openliberty.tools.maven.server.CreateServerMojo -> [Help 1]

The problem seems to be either a limitation (or bug?) with mojo-executor for parameters defined with an alias.  The alias value cannot be used in the way it's being used, it seems.

So the parameter with alias is defined here:

    public class StartDebugMojoSupport extends BasicSupport {

    @Parameter(alias="configFile", property = "serverXmlFile")
    protected File serverXmlFile;

and DevMojo is using the alias like this:

    elements.add(element(name("configFile"), serverXmlFile.getCanonicalPath()));

A simple change to use the regular (non-alias property name) seems to fix this:

    elements.add(element(name("configFile"), serverXmlFile.getCanonicalPath()));

--------

It suggests there could be other issues to at least watch out for in the code, if not to fix now.

E.g. there is at least one other alias:

    @Parameter(property = "deployPackages", defaultValue = "project", alias = "installAppPackages")
    private String deployPackages;


Changed files:
liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java

diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java
index d1ec8439..c12637f8 100644
--- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java
+++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java
@@ -791,11 +791,11 @@ public class DevMojo extends StartDebugMojoSupport {
                     elements.add(element(name("stripVersion"), "true"));
                     elements.add(element(name("deployPackages"), "project"));
                     if (serverXmlFile != null) {
-                        elements.add(element(name("configFile"), serverXmlFile.getCanonicalPath()));
+                        elements.add(element(name("serverXmlFile"), serverXmlFile.getCanonicalPath()));
                     }
                 } else if (goal.equals("create")) {
                     if (serverXmlFile != null) {
-                        elements.add(element(name("configFile"), serverXmlFile.getCanonicalPath()));
+                        elements.add(element(name("serverXmlFile"), serverXmlFile.getCanonicalPath()));
                     }
                     if (assemblyArtifact != null) {
                         Element[] featureElems = new Element[4];
Repository: openliberty/ci.maven
Issue: Dev mode misses configuration for deploy

Dev mode includes configuration for `install-apps`, but since that is now called `deploy`, dev mode needs to set that configuration properly.

Changed files:
liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java

diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java
index d011934c..f8e5ef3b 100644
--- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java
+++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/DevMojo.java
@@ -780,7 +780,7 @@ public class DevMojo extends StartDebugMojoSupport {
                         featureElems[i] = element(name("feature"), dependencies.get(i));
                     }
                     elements.add(element(name("features"), featureElems));
-                } else if (goal.equals("install-apps")) {
+                } else if (goal.equals("deploy")) {
                     String appsDirectory = MavenProjectUtil.getPluginExecutionConfiguration(project, 
                         LIBERTY_MAVEN_PLUGIN_GROUP_ID, LIBERTY_MAVEN_PLUGIN_ARTIFACT_ID, "deploy", "appsDirectory");
                     if (appsDirectory != null) {
Repository: openliberty/ci.maven
Issue: compile-jsp does not honor skip parameter

The compile-jsp goal does not honor the skip parameter. I think it probably should.

Changed files:
liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/jsp/CompileJspMojo.java

diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/jsp/CompileJspMojo.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/jsp/CompileJspMojo.java
index 241a6fd8..62899ffa 100644
--- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/jsp/CompileJspMojo.java
+++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/jsp/CompileJspMojo.java
@@ -57,6 +57,11 @@ public class CompileJspMojo extends InstallFeatureSupport {
 
     @Override
     protected void doExecute() throws Exception {
+        if (skip) {
+            getLog().info("\\nSkipping compile-jsp goal.\\n");
+            return;
+        }
+
         CompileJSPs compile = (CompileJSPs) ant.createTask("antlib:io/openliberty/tools/ant:compileJSPs");
         if (compile == null) {
             throw new IllegalStateException(
Repository: openliberty/ci.maven
Issue: In some cases blank lines are added to server.xml 

The generateFeatures mojo adds a comment to server.xml indicating that a new file has been created to handle Liberty features generated by the mojo. In some cases adding that comment incorrectly adds multiple extra blank lines. 

We need to find out what triggers this behaviour and either fix it or stop adding the comment until we do.

Changed files:
liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java

diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java
index 06428ada..ac686422 100644
--- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java
+++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java
@@ -39,6 +39,7 @@ import org.apache.maven.project.MavenProject;
 import org.xml.sax.SAXException;
 
 import io.openliberty.tools.common.plugins.config.ServerConfigXmlDocument;
+import io.openliberty.tools.common.plugins.config.XmlDocument;
 import io.openliberty.tools.common.plugins.util.InstallFeatureUtil;
 import io.openliberty.tools.common.plugins.util.PluginExecutionException;
 import io.openliberty.tools.maven.BasicSupport;
@@ -273,9 +274,9 @@ public class GenerateFeaturesMojo extends InstallFeatureSupport {
             return;
         }
         try {
-            if (doc.findFMComment(FEATURES_FILE_MESSAGE) == null) {
-                doc.createFMComment(FEATURES_FILE_MESSAGE);
-                doc.writeXMLDocument(serverXml);    
+            if (doc.createFMComment(FEATURES_FILE_MESSAGE)) {
+                doc.writeXMLDocument(serverXml);
+                XmlDocument.addNewlineBeforeFirstElement(serverXml);
             }
         } catch (IOException | TransformerException e) {
             log.debug("Exception adding comment to server.xml", e);
Repository: openliberty/ci.maven
Issue: Check correct dependencies for Java EE version

We currently check 'io.openliberty.features' but we should check 'javax.javaee-api'

- [x] Maven
- [x] Gradle

Changed files:
liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java

diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java
index a0997a82..0cac1f55 100644
--- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java
+++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/GenerateFeaturesMojo.java
@@ -356,22 +356,17 @@ public class GenerateFeaturesMojo extends ServerFeatureSupport {
                 continue;
             }
             log.debug("getEEVersion, dep="+d.getGroupId()+":"+d.getArtifactId()+":"+d.getVersion());
-            if (d.getGroupId().equals("io.openliberty.features")) {
-                String id = d.getArtifactId();
-                if (id.equals("javaee-7.0")) {
-                    return "ee7";
-                } else if (id.equals("javaee-8.0")) {
+            if (d.getGroupId().equals("javax") && d.getArtifactId().equals("javaee-api")) {
+                if (d.getVersion().startsWith("8.")) {
                     return "ee8";
-                } else if (id.equals("javaeeClient-7.0")) {
+                } else if (d.getVersion().startsWith("7.")) {
                     return "ee7";
-                } else if (id.equals("javaeeClient-8.0")) {
-                    return "ee8";
-                } else if (id.equals("jakartaee-8.0")) {
-                    return "ee8";
+                } else if (d.getVersion().startsWith("6.")) {
+                    return "ee6";
                 }
             } else if (d.getGroupId().equals("jakarta.platform") &&
                     d.getArtifactId().equals("jakarta.jakartaee-api") &&
-                    d.getVersion().equals("8.0.0")) {
+                    d.getVersion().startsWith("8.")) {
                 return "ee8";
             }
         }
Repository: hashgraph/hedera-mirror-node
Issue: RecordFileDownloader re-downloads same files over and over

The hash map in ApplicationStatus.java isn't static so when it's used by several classes, changes made by one don't propagate to the other. As a result, RecordFileDownloader and Downloader were managing two separate hash maps.

Changed files:
src/main/java/com/hedera/databaseUtilities/ApplicationStatus.java, src/main/java/com/hedera/parser/RecordFileParser.java

diff --git a/src/main/java/com/hedera/databaseUtilities/ApplicationStatus.java b/src/main/java/com/hedera/databaseUtilities/ApplicationStatus.java
index 8d2847feb..30eab5987 100644
--- a/src/main/java/com/hedera/databaseUtilities/ApplicationStatus.java
+++ b/src/main/java/com/hedera/databaseUtilities/ApplicationStatus.java
@@ -22,7 +22,7 @@ public class ApplicationStatus {
 		,LAST_PROCESSED_RECORD_HASH
 	}
 	
-	private ConcurrentHashMap<ApplicationStatusCode, String> applicationStatusMap = new ConcurrentHashMap<ApplicationStatusCode, String>();
+	private static ConcurrentHashMap<ApplicationStatusCode, String> applicationStatusMap = new ConcurrentHashMap<ApplicationStatusCode, String>();
 	
 	private static final String updateSQL = "UPDATE t_application_status SET "
 			+ " status_value = ? "
diff --git a/src/main/java/com/hedera/parser/RecordFileParser.java b/src/main/java/com/hedera/parser/RecordFileParser.java
index 08217bf20..c575e4750 100644
--- a/src/main/java/com/hedera/parser/RecordFileParser.java
+++ b/src/main/java/com/hedera/parser/RecordFileParser.java
@@ -8,6 +8,7 @@ import java.security.MessageDigest;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 import com.google.common.base.Stopwatch;
Repository: eclipse-vertx/vertx-codegen
Issue: IndexOutOfBoundsException when processing javadocs

codegen will crash while processing javadocs that are:

```
/**
 * @deprecated
 * @see #handler(RoutingContext ctx)
 * @param ctx  the context
 */
```

Changed files:
src/test/java/io/vertx/test/codegen/DocTest.java, src/main/java/io/vertx/codegen/doc/Doc.java

diff --git a/src/main/java/io/vertx/codegen/doc/Doc.java b/src/main/java/io/vertx/codegen/doc/Doc.java
index 0daa8c1d..f0c03fd1 100644
--- a/src/main/java/io/vertx/codegen/doc/Doc.java
+++ b/src/main/java/io/vertx/codegen/doc/Doc.java
@@ -49,7 +49,13 @@ public class Doc {
         String name = matcher.group(2);
         int prev = matcher.end() + 1;
         if (matcher.find()) {
-          blockTags.add(new Tag(name, javadoc.substring(prev, matcher.start())));
+          int start = matcher.start();
+          if (start <= prev) {
+            // this is a tag without content (e.g.: deprecated)
+            blockTags.add(new Tag(name, ""));
+          } else {
+            blockTags.add(new Tag(name, javadoc.substring(prev, start)));
+          }
         } else {
           blockTags.add(new Tag(name, javadoc.substring(prev)));
           break;
diff --git a/src/test/java/io/vertx/test/codegen/DocTest.java b/src/test/java/io/vertx/test/codegen/DocTest.java
index b8209456..e6701b3d 100644
--- a/src/test/java/io/vertx/test/codegen/DocTest.java
+++ b/src/test/java/io/vertx/test/codegen/DocTest.java
@@ -50,6 +50,8 @@ public class DocTest {
     assertComment("@tag1 value", "", null, new Tag("tag1", "value"));
     assertComment("\\n@tag1 value", "", null, new Tag("tag1", "value"));
     assertComment("@tag1 value1\\n@tag2 value2", "", null, new Tag("tag1", "value1"), new Tag("tag2", "value2"));
+
+    assertComment("@deprecated\\n@see #handler(RountingContext)", "", null, new Tag("deprecated", ""), new Tag("see", "#handler(RountingContext)"));
   }
 
   private void assertComment(String text, String expectedFirstSentence, String expectedBody, Tag... expectedBlockTags) {
Repository: hazelcast/hazelcast-simulator
Issue: SIMULATOR_USER rename warning

If the old 'USER' is found in Simulator properties, a big fat error should be given

Changed files:
simulator/src/test/java/com/hazelcast/simulator/common/SimulatorPropertiesTest.java
simulator/src/main/java/com/hazelcast/simulator/common/SimulatorProperties.java

diff --git a/simulator/src/main/java/com/hazelcast/simulator/common/SimulatorProperties.java b/simulator/src/main/java/com/hazelcast/simulator/common/SimulatorProperties.java
index 902a72d0e..7e4331681 100644
--- a/simulator/src/main/java/com/hazelcast/simulator/common/SimulatorProperties.java
+++ b/simulator/src/main/java/com/hazelcast/simulator/common/SimulatorProperties.java
@@ -119,6 +119,7 @@ public class SimulatorProperties {
 
             for (Map.Entry entry : p.entrySet()) {
                 String key = (String) entry.getKey();
+
                 String value = (String) entry.getValue();
                 properties.put(key, new Value(isDefault, value));
             }
@@ -126,6 +127,10 @@ public class SimulatorProperties {
             if (containsKey("HAZELCAST_VERSION_SPEC")) {
                 throw new IOException("'HAZELCAST_VERSION_SPEC' property is deprecated, Use 'VERSION_SPEC' instead.");
             }
+
+            if (containsKey("USER")) {
+                throw new IOException("'USER' property is deprecated, Use 'SIMULATOR_USER' instead.");
+            }
         } catch (IOException e) {
             throw rethrow(e);
         } finally {
diff --git a/simulator/src/test/java/com/hazelcast/simulator/common/SimulatorPropertiesTest.java b/simulator/src/test/java/com/hazelcast/simulator/common/SimulatorPropertiesTest.java
index d7bc54506..efdf35de0 100644
--- a/simulator/src/test/java/com/hazelcast/simulator/common/SimulatorPropertiesTest.java
+++ b/simulator/src/test/java/com/hazelcast/simulator/common/SimulatorPropertiesTest.java
@@ -6,6 +6,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 import java.io.File;
+import java.io.IOException;
 
 import static com.hazelcast.simulator.TestEnvironmentUtils.setupFakeEnvironment;
 import static com.hazelcast.simulator.TestEnvironmentUtils.tearDownFakeEnvironment;
@@ -238,6 +239,14 @@ public class SimulatorPropertiesTest {
         assertEquals("testIdentity", simulatorProperties.getCloudCredential());
     }
 
+    @Test(expected = CommandLineExitException.class)
+    public void test_USER() {
+        File workingDirProperties = new File(simulatorHome, "simulator.properties");
+        appendText("USER=foobar", workingDirProperties);
+
+        simulatorProperties.load(workingDirProperties);
+    }
+
     private void initProperty(File file, String key, String value) {
         System.out.println("writing value: " + value);
         appendText(format("%s=%s", key, value), file);
Repository: hazelcast/hazelcast-simulator
Issue: InterruptedException in PerformanceThread.run()

Happens from time to time when using external clients (don't know if it will fail on regular tests as well). It's after the testsuite completes, so performance results and probes are written. Maybe it's just not shutdown properly.

```
FATAL 13:58:43 Exception in PerformanceThread.run()
java.lang.RuntimeException: java.lang.InterruptedException
    at com.hazelcast.simulator.coordinator.remoting.AgentsClient.getAllFutures(AgentsClient.java:394)
    at com.hazelcast.simulator.coordinator.remoting.AgentsClient.executeOnAllWorkersDetailed(AgentsClient.java:333)
    at com.hazelcast.simulator.coordinator.PerformanceMonitor$PerformanceThread.checkPerformance(PerformanceMonitor.java:110)
    at com.hazelcast.simulator.coordinator.PerformanceMonitor$PerformanceThread.run(PerformanceMonitor.java:99)
Caused by: java.lang.InterruptedException
    at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:404)
    at java.util.concurrent.FutureTask.get(FutureTask.java:204)
    at com.hazelcast.simulator.coordinator.remoting.AgentsClient.getAllFutures(AgentsClient.java:381)
    ... 3 more
```


Changed files:
simulator/src/main/java/com/hazelcast/simulator/coordinator/remoting/AgentsClient.java

diff --git a/simulator/src/main/java/com/hazelcast/simulator/coordinator/remoting/AgentsClient.java b/simulator/src/main/java/com/hazelcast/simulator/coordinator/remoting/AgentsClient.java
index cc5b5a738..b961bbe36 100644
--- a/simulator/src/main/java/com/hazelcast/simulator/coordinator/remoting/AgentsClient.java
+++ b/simulator/src/main/java/com/hazelcast/simulator/coordinator/remoting/AgentsClient.java
@@ -11,6 +11,7 @@ import com.hazelcast.simulator.test.Failure;
 import com.hazelcast.simulator.test.TestPhase;
 import com.hazelcast.simulator.test.TestSuite;
 import com.hazelcast.simulator.utils.CommandLineExitException;
+import com.hazelcast.simulator.utils.EmptyStatement;
 import com.hazelcast.simulator.worker.commands.Command;
 import com.hazelcast.simulator.worker.commands.IsPhaseCompletedCommand;
 import org.apache.log4j.Logger;
@@ -391,7 +392,9 @@ public class AgentsClient {
                 }
                 throw new RuntimeException(e);
             } catch (InterruptedException e) {
-                throw new RuntimeException(e);
+                LOGGER.info("Got interrupted while waiting for results from Agents!");
+                EmptyStatement.ignore(e);
+                break;
             }
         }
         return resultList;
Repository: hazelcast/hazelcast-simulator
Issue: Performance measuring problem

```
INFO  08:29:24 Operation-count: -3
INFO  08:29:24 Performance: -0.05 ops/s
```

One test failed and I got this output. How can operation count be negative.


Changed files:
stabilizer/src/main/java/com/hazelcast/stabilizer/coordinator/TestCaseRunner.java

diff --git a/stabilizer/src/main/java/com/hazelcast/stabilizer/coordinator/TestCaseRunner.java b/stabilizer/src/main/java/com/hazelcast/stabilizer/coordinator/TestCaseRunner.java
index a36cb50ce..24d6edae5 100644
--- a/stabilizer/src/main/java/com/hazelcast/stabilizer/coordinator/TestCaseRunner.java
+++ b/stabilizer/src/main/java/com/hazelcast/stabilizer/coordinator/TestCaseRunner.java
@@ -140,15 +140,21 @@ public class TestCaseRunner {
         for (Map.Entry<String, R> entry : combinedResults.entrySet()) {
             String probeName = entry.getKey();
             R result = entry.getValue();
-            echo("Probe " + probeName + " result: "+result.toHumanString());
+            echo("Probe " + probeName + " result: " + result.toHumanString());
         }
     }
 
     private void logPerformance() {
         if (coordinator.monitorPerformance) {
-            log.info("Operation-count: " + performanceFormat.format(coordinator.operationCount));
-            double performance = (coordinator.operationCount * 1.0d) / testSuite.duration;
-            log.info("Performance: " + performanceFormat.format(performance) + " ops/s");
+            long operationCount = coordinator.operationCount;
+            if (operationCount < 0) {
+                log.info("Operation-count: not available");
+                log.info("Performance: not available");
+            } else {
+                log.info("Operation-count: " + performanceFormat.format(operationCount));
+                double performance = (operationCount * 1.0d) / testSuite.duration;
+                log.info("Performance: " + performanceFormat.format(performance) + " ops/s");
+            }
         }
     }
 
@@ -176,7 +182,11 @@ public class TestCaseRunner {
             String msg = format("Running %s, %-4.2f percent complete", secondsToHuman(elapsed), percentage);
 
             if (coordinator.monitorPerformance) {
-                msg += ", " + performanceFormat.format(coordinator.performance) + " ops/s.";
+                if (coordinator.operationCount < 0) {
+                    msg += ",  performance not available";
+                } else {
+                    msg += ", " + performanceFormat.format(coordinator.performance) + " ops/s.";
+                }
             }
 
             log.info(prefix + msg);
Repository: osgi/osgi
Issue: Converter's DTOUtil is overly reliant on exceptions for normal execution flow

DTOUtil.isDTOType() [1] relies on exceptions to find out whether a class has a public constructor and to find out if it has any methods - as a DTO should have a public no-args constructor and no methods beyond the ones defined by Object.class. 

This works but is wasteful and slow. We should implement a different strategy to identify a DTO class as such.

[1] https://github.com/osgi/osgi/blob/main/org.osgi.util.converter/src/org/osgi/util/converter/DTOUtil.java

Changed files:
org.osgi.util.converter/src/org/osgi/util/converter/DTOUtil.java

diff --git a/org.osgi.util.converter/src/org/osgi/util/converter/DTOUtil.java b/org.osgi.util.converter/src/org/osgi/util/converter/DTOUtil.java
index 08023923fa..8f4df68dfe 100644
--- a/org.osgi.util.converter/src/org/osgi/util/converter/DTOUtil.java
+++ b/org.osgi.util.converter/src/org/osgi/util/converter/DTOUtil.java
@@ -18,45 +18,43 @@
 
 package org.osgi.util.converter;
 
+import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.util.Arrays;
 
 /**
  * @author $Id$
  */
 class DTOUtil {
+	private static final Method[] OBJECT_CLASS_METHODS = Object.class
+			.getMethods();
+
 	private DTOUtil() {
 		// Do not instantiate. This is a utility class.
 	}
 
 	static boolean isDTOType(Class< ? > cls, boolean ignorePublicNoArgsCtor) {
 		if (!ignorePublicNoArgsCtor) {
-			try {
-				cls.getConstructor();
-			} catch (NoSuchMethodException | SecurityException e) {
+			if (Arrays.stream(cls.getConstructors())
+					.noneMatch(ctor -> ctor.getParameterCount() == 0)) {
 				// No public zero-arg constructor, not a DTO
 				return false;
 			}
 		}
 
 		for (Method m : cls.getMethods()) {
-			try {
-				Object.class.getMethod(m.getName(), m.getParameterTypes());
-			} catch (NoSuchMethodException snme) {
+			if (Arrays.stream(OBJECT_CLASS_METHODS)
+					.noneMatch(om -> om.getName().equals(m.getName())
+							&& Arrays.equals(om.getParameterTypes(),
+									m.getParameterTypes()))) {
 				// Not a method defined by Object.class (or override of such
 				// method)
 				return false;
 			}
 		}
 
-		/*
-		 * for (Field f : cls.getDeclaredFields()) { int modifiers =
-		 * f.getModifiers(); if (Modifier.isStatic(modifiers)) { // ignore
-		 * static fields continue; } if (!Modifier.isPublic(modifiers)) { return
-		 * false; } }
-		 */
-
 		boolean foundField = false;
 		for (Field f : cls.getFields()) {
 			int modifiers = f.getModifiers();
Repository: opencb/cellbase
Issue: Typo in RegionWS "clinical"

In RegionWSServer we can see the param "phenotpe" (should be "phenotype"):

```
@GET
@Path("/{chrRegionId}/clinical")
public Response getClinicalByRegion(@PathParam("chrRegionId") String query,
                                    @DefaultValue("") @QueryParam("gene") String gene,
                                    @DefaultValue("") @QueryParam("id") String id,
                                    @DefaultValue("") @QueryParam("phenotpe") String phenotpe) {
```

There could be more typos like these in the WS annotations. Should we extract the String literals into Constants?


Changed files:
cellbase-server/src/main/java/org/opencb/cellbase/server/ws/genomic/RegionWSServer.java

diff --git a/cellbase-server/src/main/java/org/opencb/cellbase/server/ws/genomic/RegionWSServer.java b/cellbase-server/src/main/java/org/opencb/cellbase/server/ws/genomic/RegionWSServer.java
index 5bf840a67..6d21c79e0 100755
--- a/cellbase-server/src/main/java/org/opencb/cellbase/server/ws/genomic/RegionWSServer.java
+++ b/cellbase-server/src/main/java/org/opencb/cellbase/server/ws/genomic/RegionWSServer.java
@@ -252,7 +252,7 @@ public class RegionWSServer extends GenericRestWSServer {
     public Response getClinicalByRegion(@PathParam("chrRegionId") String query,
                                         @DefaultValue("") @QueryParam("gene") String gene,
                                         @DefaultValue("") @QueryParam("id") String id,
-                                        @DefaultValue("") @QueryParam("phenotpe") String phenotpe) {
+                                        @DefaultValue("") @QueryParam("phenotype") String phenotype) {
         try {
             parseQueryParams();
             ClinicalDBAdaptor clinicalDBAdaptor = dbAdaptorFactory.getClinicalDBAdaptor(this.species, this.assembly);
@@ -266,8 +266,8 @@ public class RegionWSServer extends GenericRestWSServer {
                 if(id != null && !id.equals("")) {
                     queryOptions.add("id", Arrays.asList(id.split(",")));
                 }
-                if(phenotpe != null && !phenotpe.equals("")) {
-                    queryOptions.add("phenotpe", Arrays.asList(phenotpe.split(",")));
+                if(phenotype != null && !phenotype.equals("")) {
+                    queryOptions.add("phenotype", Arrays.asList(phenotype.split(",")));
                 }
 //                List<QueryResult> clinicalQueryResultList = clinicalDBAdaptor.getAllClinvarByRegionList(regions, queryOptions);
 //                List<QueryResult> queryResultList = new ArrayList<>();
Repository: opencb/cellbase
Issue: Incorrect parameter description in 'build; command line help

The parameter data has this description:

Comma separated list of data to **download**: genome, gene, variation, regulation, protein, conservation, drug, clinvar, cosmic and GWAS CAatalog. 'all' build everything. [null]

'download' has to be replaced by 'build':
Comma separated list of data to **build**: genome, gene, variation, regulation, protein, conservation, drug, clinvar, cosmic and GWAS CAatalog. 'all' build everything. [null]


Changed files:
cellbase-app/src/main/java/org/opencb/cellbase/app/cli/CliOptionsParser.java

diff --git a/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/CliOptionsParser.java b/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/CliOptionsParser.java
index 6e0fb33fa..ae72d14ed 100644
--- a/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/CliOptionsParser.java
+++ b/cellbase-app/src/main/java/org/opencb/cellbase/app/cli/CliOptionsParser.java
@@ -144,7 +144,7 @@ public class CliOptionsParser {
         public CommonCommandOptions commonOptions = commonCommandOptions;
 
 
-        @Parameter(names = {"-d", "--data"}, description = "Comma separated list of data to download: genome, gene, variation, regulation, protein, conservation, drug, clinvar, cosmic and GWAS CAatalog. 'all' build everything.", required = true, arity = 1)
+        @Parameter(names = {"-d", "--data"}, description = "Comma separated list of data to build: genome, gene, variation, regulation, protein, conservation, drug, clinvar, cosmic and GWAS CAatalog. 'all' build everything.", required = true, arity = 1)
         public String data;
 
         @Parameter(names = {"-s", "--species"}, description = "Name of the species to be built, valid format include 'Homo sapiens' or 'hsapiens'", required = false, arity = 1)
Repository: checkmarx-ltd/cx-flow
Issue: CxFlow creates duplicate tickets/issues when ran in batch mode.

### Description

> The original problem is that cxflow is processing the scan results twice if we run it in a batch mode (using --project parameter).
This is evident from the log as well as if there is any bug tracker configured, there are duplicate tickets getting created.

### Expected Behavior

CxFlow should process the latest scan results only once.

### Actual Behavior

Scan Results getting processed twice.

### Reproduction

1) Run cxflow in cmd mode using the --project paramter.

For example : java -jar cxflow.jar --project --cx-team="\\Demo\\CxFlow\\" --cx-project="AnySASTProjectName" --bug-tracker=AnyBugTracker(Sarif or Jira)
--app="AnyAppName"

2) Check the log output and repeated result processing or issue creating can be observed.

**More Details** : 

1) The issue seems to be occurring as a result of the method 'processResults' (From ResultsService) gets called on two different occasions.
2) Refer to the method 'publishLatestScanResults' from CxFlowRunner.java, add the breakpoints, and observe the behavior.


### Environment Details

> CxFlow version : 1.6.17


Changed files:
src/main/java/com/checkmarx/flow/CxFlowRunner.java

diff --git a/src/main/java/com/checkmarx/flow/CxFlowRunner.java b/src/main/java/com/checkmarx/flow/CxFlowRunner.java
index ab6f935f..582cb5d8 100644
--- a/src/main/java/com/checkmarx/flow/CxFlowRunner.java
+++ b/src/main/java/com/checkmarx/flow/CxFlowRunner.java
@@ -584,8 +584,7 @@ public class CxFlowRunner implements ApplicationRunner {
     }
 
     private void publishLatestScanResults(ScanRequest request) throws ExitThrowable {
-        ScanResults scanResults = runOnActiveScanners(scanner -> scanner.getLatestScanResults(request));
-        processResults(request, scanResults);
+        runOnActiveScanners(scanner -> scanner.getLatestScanResults(request));
     }
 
     private void processResults(ScanRequest request, ScanResults results) throws ExitThrowable {
Repository: xenit-eu/dynamic-extensions-for-alfresco
Issue: WebScriptUtil.extractHttpServletResponse() not working.

The extractHttpServletResponse method of the  WebScriptUtil falsy returns null.

Cause:
AnnotationWebscriptResponse
```
	@Override
	public WebScriptResponse getNext() {
		if (response instanceof WrappingWebScriptResponse) {
			return ((WrappingWebScriptResponse) response).getNext();
		} else {
			return null;
		}
	}
```

Changed files:
webscripts/src/main/java/com/github/dynamicextensionsalfresco/webscripts/AnnotationWebscriptResponse.java

diff --git a/webscripts/src/main/java/com/github/dynamicextensionsalfresco/webscripts/AnnotationWebscriptResponse.java b/webscripts/src/main/java/com/github/dynamicextensionsalfresco/webscripts/AnnotationWebscriptResponse.java
index ba7dff76..8eefaa73 100644
--- a/webscripts/src/main/java/com/github/dynamicextensionsalfresco/webscripts/AnnotationWebscriptResponse.java
+++ b/webscripts/src/main/java/com/github/dynamicextensionsalfresco/webscripts/AnnotationWebscriptResponse.java
@@ -41,7 +41,7 @@ public class AnnotationWebscriptResponse implements WrappingWebScriptResponse {
 		if (response instanceof WrappingWebScriptResponse) {
 			return ((WrappingWebScriptResponse) response).getNext();
 		} else {
-			return null;
+			return response;
 		}
 	}
Repository: ibissource/iaf
Issue: Accept value */*;text/html; causes Json2XmlValidator to return XML instead of JSON

**❗ please do not add sensitive information in issues, you can provide extra information via email using issue number as reference ❗**

**Describe the issue**
When having an ApiListener with `produces="JSON"` and using the Json2XmlInputValidator to handle data conversion, we would like to respond with JSON.

When a consumer specifies the following Accept header: `*/*;text/html` the consumes check succeeds due to `*/*` but the following code block fails here and will return `text/html` as outputFormat.

Causing errors when translating response that text/html is not a valid value, should be JSON or XML.

Introduced in #5127:
![image](https://github.com/ibissource/iaf/assets/37303445/24346004-cf33-401c-a130-f825ddac7e7d)

![image](https://github.com/ibissource/iaf/assets/37303445/33f81da3-326f-46a6-b870-db0e3f2b62db)



Changed files:
core/src/main/java/nl/nn/adapterframework/pipes/Json2XmlValidator.java

diff --git a/core/src/main/java/nl/nn/adapterframework/pipes/Json2XmlValidator.java b/core/src/main/java/nl/nn/adapterframework/pipes/Json2XmlValidator.java
index 70d668310..d800e076f 100644
--- a/core/src/main/java/nl/nn/adapterframework/pipes/Json2XmlValidator.java
+++ b/core/src/main/java/nl/nn/adapterframework/pipes/Json2XmlValidator.java
@@ -146,10 +146,10 @@ public class Json2XmlValidator extends XmlValidator implements HasPhysicalDestin
 	}
 
 	/**
-	 * Default format has precedence over the accept header, accept header may be invalid or * slash *, in which case it should be ignored. First accept value wins.
+	 * Default format has precedence over the accept header, accept header may be invalid or * slash *, in case of * slash * it means any content-type is accepted for the consumer, defaults to detected output format.
 	 */
 	private String parseAcceptHeader(DocumentFormat detectedFormat, String acceptHeaderValue) {
-		if(StringUtils.isEmpty(acceptHeaderValue) || "*/*".equals(acceptHeaderValue)) {
+		if(StringUtils.isEmpty(acceptHeaderValue) || acceptHeaderValue.contains("*/*")) {
 			return detectedFormat.name();
 		}
Repository: ibissource/iaf
Issue: AWS S3 List does not work properly when > 1000 items in bucket

**❗ please do not add sensitive information in issues, you can provide extra information via email using issue number as reference ❗**

**Describe the issue**
The current implementation for the folderExists method in AWS S3 Filesystem is incorrect.

By calling `s3Client.listObjects(bucketName)` a truncated list of maximum 1000 items is retrieved, and the next 1000 are never retrieved.

![image](https://github.com/ibissource/iaf/assets/37303445/aaa701f3-99ca-42ed-adf2-56070c2de816)

Resulting in very silly folder not found errors:
![image](https://github.com/ibissource/iaf/assets/37303445/d9bd0ef1-09bc-4f98-8fee-b066562e606f)

Whilst these folders actually exist in s3 bucket, they are just not present in the first 1000 items :/ :/ 

Besides that, it is very in-efficient to iterate over an entire bucket to check if a folder exists.

It's better to call `listObjects` with a prefix to prevent retrieving a truncated list....

**Reporter**
Laurens


Changed files:
core/src/main/java/nl/nn/adapterframework/filesystem/AmazonS3FileSystem.java

diff --git a/core/src/main/java/nl/nn/adapterframework/filesystem/AmazonS3FileSystem.java b/core/src/main/java/nl/nn/adapterframework/filesystem/AmazonS3FileSystem.java
index 05c0df1a7..c3e093794 100644
--- a/core/src/main/java/nl/nn/adapterframework/filesystem/AmazonS3FileSystem.java
+++ b/core/src/main/java/nl/nn/adapterframework/filesystem/AmazonS3FileSystem.java
@@ -348,7 +348,7 @@ public class AmazonS3FileSystem extends FileSystemBase<S3Object> implements IWri
 
 	@Override
 	public boolean folderExists(String folder) throws FileSystemException {
-		ObjectListing objectListing = s3Client.listObjects(bucketName);
+		ObjectListing objectListing = s3Client.listObjects(bucketName, folder);
 		Iterator<S3ObjectSummary> objIter = objectListing.getObjectSummaries().iterator();
 		while (objIter.hasNext()) {
 			S3ObjectSummary s3ObjectSummary = objIter.next();
Repository: sirendii/advancedperipherals
Issue: Inventory manager causes items to stop stacking

### Describe

I have a computer that is supplying me constantly with items. One of witch are apples. Then I noticed that apples in my inventory and apples in the me system don't stack anymore. I looked into the item data and the mod appends "tag:{}" to the data




### Steps to reproduce

1. have an apple in the inventory.
2. have a cc computer and the inventory manager attached and linked
3. put apple in main hand and run this: `/data get entity @s SelectedItem` . See that no `tag:{}` is there 
4. call `manager.getItems()`
5. put apple in main hand and run this: `/data get entity @s SelectedItem`  see that `tag:{}` appeared.
6. after the `tag:{}` got added see that the apple doesn't stack anymore with fresh items from creative inventory

### Multiplayer?

Yes

### Version

1.19.2-0.7.27r (Latest 1.19.2)

### Minecraft, Forge and maybe other related mods versions

Forge 43.2.0; Minecraft 1.19.2

### Screenshots or Videos

![image](https://github.com/SirEndii/AdvancedPeripherals/assets/67194495/9b0bf574-7336-41e0-bee7-c7a43ab1929f)

### Crashlog/log

_No response_

Changed files:
src/main/java/de/srendi/advancedperipherals/common/util/LuaConverter.java

diff --git a/src/main/java/de/srendi/advancedperipherals/common/util/LuaConverter.java b/src/main/java/de/srendi/advancedperipherals/common/util/LuaConverter.java
index cc0e81e4..2b12f1d9 100644
--- a/src/main/java/de/srendi/advancedperipherals/common/util/LuaConverter.java
+++ b/src/main/java/de/srendi/advancedperipherals/common/util/LuaConverter.java
@@ -69,7 +69,7 @@ public class LuaConverter {
     public static Map<String, Object> stackToObject(@NotNull ItemStack stack) {
         if (stack.isEmpty()) return new HashMap<>();
         Map<String, Object> map = itemToObject(stack.getItem());
-        CompoundTag nbt = stack.getOrCreateTag();
+        CompoundTag nbt = stack.copy().getOrCreateTag();
         map.put("count", stack.getCount());
         map.put("displayName", stack.getDisplayName().getString());
         map.put("maxStackSize", stack.getMaxStackSize());
Repository: sirendii/advancedperipherals
Issue: [BUG] BlockReader gives no usefull data

### Descripe

When I use the BlockRader, it only spits out useless data. I don't think this is intentional.

### Steps to reproduce

1. set up BlockReader with chest at the front.
2. put something into the chest as a test.
3. control the block reader with `getBlockData`

### Multiplayer?

Yes

### Version

0.7.8r (Latest)

### Minecraft, Forge and maybe other related mods versions

39.0.10

### Screenshots or Videos

https://imgur.com/a/KrgM9YR

### Crashlog/log

_No response_

Changed files:
src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/BlockReaderPeripheral.java

diff --git a/src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/BlockReaderPeripheral.java b/src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/BlockReaderPeripheral.java
index 8887e60f..350d7f18 100644
--- a/src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/BlockReaderPeripheral.java
+++ b/src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/BlockReaderPeripheral.java
@@ -10,6 +10,7 @@ import de.srendi.advancedperipherals.lib.peripherals.BasePeripheral;
 import net.minecraft.nbt.CompoundTag;
 import net.minecraft.world.level.block.Blocks;
 import net.minecraft.world.level.block.EntityBlock;
+import net.minecraft.world.level.block.entity.BlockEntity;
 import net.minecraft.world.level.block.state.BlockState;
 
 public class BlockReaderPeripheral extends BasePeripheral<BlockEntityPeripheralOwner<BlockReaderTile>> {
@@ -36,8 +37,14 @@ public class BlockReaderPeripheral extends BasePeripheral<BlockEntityPeripheralO
     public final Object getBlockData() {
         if (getBlockInFront().is(Blocks.AIR) && !(getBlockInFront().getBlock() instanceof EntityBlock))
             return null;
-        return NBTUtil.toLua(getLevel().getBlockEntity(getPos().relative(getLevel().getBlockState(getPos()).
-                getValue(APTileEntityBlock.FACING))).save(new CompoundTag()));
+        BlockEntity target = getLevel().getBlockEntity(
+                getPos().relative(
+                        getLevel().getBlockState(getPos()).getValue(
+                                APTileEntityBlock.FACING
+                        )
+                )
+        );
+        return NBTUtil.toLua(target.save(target.saveWithoutMetadata()));
     }
 
     private BlockState getBlockInFront() {
Repository: telstra/open-kilda
Issue: Incorrect WARN messages `violates latency SLA`

Messages like 
`Forward path for flow 'someflow' violates latency SLA 1000/0 ms` shouldn't be logged if maxLatency for flow is 0.
Also latency in log is incorrect. it must be in milliseconds but in fact it is in microseconds 

Changed files:
src-java/flowmonitoring-topology/flowmonitoring-storm-topology/src/main/java/org/openkilda/wfm/topology/flowmonitoring/service/ActionService.java

diff --git a/src-java/flowmonitoring-topology/flowmonitoring-storm-topology/src/main/java/org/openkilda/wfm/topology/flowmonitoring/service/ActionService.java b/src-java/flowmonitoring-topology/flowmonitoring-storm-topology/src/main/java/org/openkilda/wfm/topology/flowmonitoring/service/ActionService.java
index 6b2918ab7..3163453c7 100644
--- a/src-java/flowmonitoring-topology/flowmonitoring-storm-topology/src/main/java/org/openkilda/wfm/topology/flowmonitoring/service/ActionService.java
+++ b/src-java/flowmonitoring-topology/flowmonitoring-storm-topology/src/main/java/org/openkilda/wfm/topology/flowmonitoring/service/ActionService.java
@@ -19,6 +19,8 @@ import org.openkilda.server42.messaging.FlowDirection;
 
 import lombok.extern.slf4j.Slf4j;
 
+import java.util.concurrent.TimeUnit;
+
 @Slf4j
 public class ActionService {
 
@@ -27,9 +29,9 @@ public class ActionService {
      */
     public void checkFlowSla(String flowId, FlowDirection direction, long latency,
                              Long maxLatency, Long maxLatencyTier2) {
-        if (maxLatency != null && latency > maxLatency) {
-            long latencyMs = latency / 1000;
-            long maxLatencyMs = maxLatency / 1000;
+        if (maxLatency != null && maxLatency > 0 && latency > maxLatency) {
+            long latencyMs = TimeUnit.NANOSECONDS.toMillis(latency);
+            long maxLatencyMs = TimeUnit.NANOSECONDS.toMillis(maxLatency);
             log.warn("{} path for flow '{}' violates latency SLA {}/{} ms",
                     direction.name(), flowId, latencyMs, maxLatencyMs);
         }