This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch fix/CAMEL-24909
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/fix/CAMEL-24909 by this push:
     new 06c5dab2afc1 CAMEL-24909: a miss shows the nearest lines more often (a 
quarter of them matching is enough)
06c5dab2afc1 is described below

commit 06c5dab2afc160b8e63cf52f7ff497610fe592e7
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Sep 22 19:45:46 2026 +0200

    CAMEL-24909: a miss shows the nearest lines more often (a quarter of them 
matching is enough)
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
    Claude-Session: https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
---
 .../org/apache/camel/dsl/jbang/core/commands/ai/AuthoringTools.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/AuthoringTools.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/AuthoringTools.java
index e94bc52344fb..34f1b2ccab8b 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/AuthoringTools.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/AuthoringTools.java
@@ -511,8 +511,8 @@ public final class AuthoringTools {
                 bestAt = i;
             }
         }
-        if (bestAt < 0 || bestScore * 2 < size) {
-            return null; // less than half the lines match: naming a place 
would mislead
+        if (bestAt < 0 || bestScore * 4 < size) {
+            return null; // hardly anything matches: naming a place would 
mislead
         }
         StringBuilder sb = new StringBuilder();
         for (int j = 0; j < size; j++) {

Reply via email to