Repository: languagetool-org/languagetool

Issue #1010: ArrayIndexOutOfBoundsException in GermanWordRepeatRule
Created: 2018-05-28T12:27:46Z
We are allowing LanguageTool for some schools in Switzerland during exams and I just got a call that our Linux based exam environment produced a horrible error message on some students laptops that just really scared them.
I could reproduce the problem by just typing the following words (in German) in LibreOffice: "Hat sie sie"
This caused this big error message with a stack trace that boils down to an ArrayIndexOutOfBoundsException in GermanWordRepeatRule at line 78.
Thank you for your great work on LanguageTool and thanks for fixing this bug.

Duplicate issue #1043: Exception checking German sentence "Behalten sie sie" 
Created: 2018-07-05T11:37:06Z
An error has occurred: 'java.lang.RuntimeException: java.lang.RuntimeException: Could not check sentence (language: German (Germany)): 'Behalten sie sie'', sending HTTP code 500. Access from 127.0.0.1, HTTP user agent: null, User agent param: null, Referrer: null, language: de-DE, h: 1, r: 15, text length: 46, Stacktrace follows:
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: Could not check sentence (language: German (Germany)): 'Behalten sie sie'
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.languagetool.server.TextChecker.checkText(TextChecker.java:151)
at org.languagetool.server.ApiV2.handleCheckRequest(ApiV2.java:84)
at org.languagetool.server.ApiV2.handleRequest(ApiV2.java:58)
at org.languagetool.server.LanguageToolHttpHandler.handle(LanguageToolHttpHandler.java:121)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Could not check sentence (language: German (Germany)): 'Behalten sie sie'
at org.languagetool.JLanguageTool.performCheck(JLanguageTool.java:641)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:580)
at org.languagetool.JLanguageTool.check(JLanguageTool.java:538)
at org.languagetool.server.TextChecker.getRuleMatches(TextChecker.java:252)
at org.languagetool.server.TextChecker.access$000(TextChecker.java:46)
at org.languagetool.server.TextChecker$1.call(TextChecker.java:145)
at org.languagetool.server.TextChecker$1.call(TextChecker.java:138)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
Caused by: java.lang.RuntimeException: Could not check sentence (language: German (Germany)): 'Behalten sie sie'
at org.languagetool.JLanguageTool$TextCheckCallable.getOtherRuleMatches(JLanguageTool.java:1119)
at org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:1022)
at org.languagetool.JLanguageTool$TextCheckCallable.call(JLanguageTool.java:989)
at org.languagetool.JLanguageTool.performCheck(JLanguageTool.java:637)
... 10 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
at org.languagetool.rules.de.GermanWordRepeatRule.ignore(GermanWordRepeatRule.java:78)
at org.languagetool.rules.WordRepeatRule.match(WordRepeatRule.java:77)
at org.languagetool.JLanguageTool.checkAnalyzedSentence(JLanguageTool.java:667)
at org.languagetool.JLanguageTool$TextCheckCallable.getOtherRuleMatches(JLanguageTool.java:1077)
... 13 more

Closing comment (2018-07-05T15:55:31Z): That's a duplicate of #1010 (fixed in 4.2)