From cc052d780fe0ca88edaf3475ae99341ab0860e22 Mon Sep 17 00:00:00 2001 From: Ryan Slominski Date: Mon, 4 May 2026 09:41:18 -0400 Subject: [PATCH 1/5] Apply suggested fix to src/main/java/org/jlab/mya/stream/MySamplerStream.java from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- src/main/java/org/jlab/mya/stream/MySamplerStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jlab/mya/stream/MySamplerStream.java b/src/main/java/org/jlab/mya/stream/MySamplerStream.java index 4f83427..f50a389 100644 --- a/src/main/java/org/jlab/mya/stream/MySamplerStream.java +++ b/src/main/java/org/jlab/mya/stream/MySamplerStream.java @@ -239,7 +239,7 @@ public static MySamplerStream getMySamplerStream( * return the same results. * * @return The next sampled event or null if end of stream is reached. - * @throws IOException If trouble sapling data or an unsupported strategy is attempted. + * @throws IOException If trouble sampling data or an unsupported strategy is attempted. */ @Override public T read() throws IOException { From 997d473a0e8ba15184713445b1ade87f0621fc32 Mon Sep 17 00:00:00 2001 From: Ryan Slominski Date: Mon, 4 May 2026 09:41:19 -0400 Subject: [PATCH 2/5] Apply suggested fix to src/main/java/org/jlab/mya/stream/MySamplerStream.java from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- src/main/java/org/jlab/mya/stream/MySamplerStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jlab/mya/stream/MySamplerStream.java b/src/main/java/org/jlab/mya/stream/MySamplerStream.java index f50a389..07c490e 100644 --- a/src/main/java/org/jlab/mya/stream/MySamplerStream.java +++ b/src/main/java/org/jlab/mya/stream/MySamplerStream.java @@ -87,7 +87,7 @@ private MySamplerStream( if (nexus == null || metadata == null) { throw new IllegalArgumentException( - "Both nexus and metadata are required non-null the N_QUERIES strategy"); + "Both nexus and metadata must be non-null for the N_QUERIES strategy"); } this.intervalMillis = intervalMillis; this.sampleCount = sampleCount; From 5cd92cb586e95218e4f69287ff2ba5c317582a67 Mon Sep 17 00:00:00 2001 From: Ryan Slominski Date: Mon, 4 May 2026 09:41:19 -0400 Subject: [PATCH 3/5] Apply suggested fix to src/main/java/org/jlab/mya/stream/MySamplerStream.java from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- src/main/java/org/jlab/mya/stream/MySamplerStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jlab/mya/stream/MySamplerStream.java b/src/main/java/org/jlab/mya/stream/MySamplerStream.java index 07c490e..fbe7ad6 100644 --- a/src/main/java/org/jlab/mya/stream/MySamplerStream.java +++ b/src/main/java/org/jlab/mya/stream/MySamplerStream.java @@ -12,7 +12,7 @@ * This is a class mimics the command line mySampler application. It implements two different * strategies, sampling from the data as it is streamed through the library (STREAM), and repeatedly * querying the database for each sampled point (N_QUERIES). Different constructors create streams - * that use either of these two strategy Previous versions attempted a hybrid approach, but that did + * that use either of these two strategies. Previous versions attempted a hybrid approach, but that did * not work well since processing a ResultSet cannot be cleanly cancelled partway through. * *

For streams where the Event update rate is less than the requested sample rate, then it is From 9b5b7dfd15b4005bcdeccc8831a45f1f91f18f5b Mon Sep 17 00:00:00 2001 From: Ryan Slominski Date: Mon, 4 May 2026 09:41:20 -0400 Subject: [PATCH 4/5] Apply suggested fix to src/main/java/org/jlab/mya/stream/MySamplerStream.java from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- src/main/java/org/jlab/mya/stream/MySamplerStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jlab/mya/stream/MySamplerStream.java b/src/main/java/org/jlab/mya/stream/MySamplerStream.java index fbe7ad6..057cc47 100644 --- a/src/main/java/org/jlab/mya/stream/MySamplerStream.java +++ b/src/main/java/org/jlab/mya/stream/MySamplerStream.java @@ -9,7 +9,7 @@ import org.jlab.mya.nexus.DataNexus; /** - * This is a class mimics the command line mySampler application. It implements two different + * This class mimics the command line mySampler application. It implements two different * strategies, sampling from the data as it is streamed through the library (STREAM), and repeatedly * querying the database for each sampled point (N_QUERIES). Different constructors create streams * that use either of these two strategies. Previous versions attempted a hybrid approach, but that did From edb3f94b06b5d8c81c962a0bd80a69c37025d3e8 Mon Sep 17 00:00:00 2001 From: ryans Date: Mon, 4 May 2026 09:43:23 -0400 Subject: [PATCH 5/5] CodeQL --- src/main/java/org/jlab/mya/stream/MySamplerStream.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/jlab/mya/stream/MySamplerStream.java b/src/main/java/org/jlab/mya/stream/MySamplerStream.java index 057cc47..f4b65ef 100644 --- a/src/main/java/org/jlab/mya/stream/MySamplerStream.java +++ b/src/main/java/org/jlab/mya/stream/MySamplerStream.java @@ -9,11 +9,11 @@ import org.jlab.mya.nexus.DataNexus; /** - * This class mimics the command line mySampler application. It implements two different - * strategies, sampling from the data as it is streamed through the library (STREAM), and repeatedly - * querying the database for each sampled point (N_QUERIES). Different constructors create streams - * that use either of these two strategies. Previous versions attempted a hybrid approach, but that did - * not work well since processing a ResultSet cannot be cleanly cancelled partway through. + * This class mimics the command line mySampler application. It implements two different strategies, + * sampling from the data as it is streamed through the library (STREAM), and repeatedly querying + * the database for each sampled point (N_QUERIES). Different constructors create streams that use + * either of these two strategies. Previous versions attempted a hybrid approach, but that did not + * work well since processing a ResultSet cannot be cleanly canceled partway through. * *

For streams where the Event update rate is less than the requested sample rate, then it is * obviously better to make one query and stream all the underlying data. For streams where the