Project: JDT
Bug 133488 SIOOBE in NLSSearchResultRequestor.findKey(NLSSearchResultRequestor.java:200)
Reported: 2006-03-28 05:13:51 | Status: verified fixed

I20060328-0010. Steps to reproduce: 1. add T.java as follows: ----------- %< --------- package traditional; public class T { String s= "traditional" } ----------- %< --------- Externalize the string using default arguments. Then change T.java to: ----------- %< --------- package traditional; public class T { String s= "traditional" String s= "traditional" } ----------- %< --------- Observe the compile error. Now execute the Find Broken NLS Keys action ==> error dialog plus .log entry: !ENTRY org.eclipse.core.jobs 4 2 2006-03-28 12:08:09.212 !MESSAGE An internal error occurred during: "Search for Broken NLS Keys". !STACK 0 java.lang.StringIndexOutOfBoundsException: String index out of range: -13 at java.lang.String.substring(String.java:1444) at java.lang.String.substring(String.java:1411) at org.eclipse.jdt.internal.ui.refactoring.nls.search.NLSSearchResultRequestor.findKey(NLSSearchResultRequestor.java:200) at org.eclipse.jdt.internal.ui.refactoring.nls.search.NLSSearchResultRequestor.acceptSearchMatch(NLSSearchResultRequestor.java:111) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.report(MatchLocator.java:1658) at org.eclipse.jdt.internal.core.search.matching.TypeReferenceLocator.matchReportReference(TypeReferenceLocator.java:532) at org.eclipse.jdt.internal.core.search.matching.TypeReferenceLocator.matchReportReference(TypeReferenceLocator.java:308) at org.eclipse.jdt.internal.core.search.matching.TypeReferenceLocator.matchReportReference(TypeReferenceLocator.java:280) at org.eclipse.jdt.internal.core.search.matching.TypeReferenceLocator.matchReportReference(TypeReferenceLocator.java:319) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2247) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2376) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:2141) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:1548) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1033) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1074) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1195) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:94) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:212) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:498) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:538) at org.eclipse.jdt.internal.ui.refactoring.nls.search.NLSSearchQuery.run(NLSSearchQuery.java:89) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:89) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

Files changed in fix:
org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchResultRequestor.java